Skip to content

[8358][4.x] PathNavigatorTreeItem - childrenByParentPath LookupTable wrong validation#4795

Open
jvega190 wants to merge 2 commits intocraftercms:support/4.xfrom
jvega190:bugfix/4.x/8358
Open

[8358][4.x] PathNavigatorTreeItem - childrenByParentPath LookupTable wrong validation#4795
jvega190 wants to merge 2 commits intocraftercms:support/4.xfrom
jvega190:bugfix/4.x/8358

Conversation

@jvega190
Copy link
Member

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved loading state indicator in the path navigator tree to display more accurately for individual paths.

Walkthrough

This change fixes a bug in the tree children loading state detection by replacing a global array length check with a per-path nullish-checked access, ensuring the loading indicator only displays when appropriate for the specific path being evaluated.

Changes

Cohort / File(s) Summary
Tree Children Loading State
ui/app/src/components/PathNavigatorTree/PathNavigatorTreeItem.tsx
Modified conditional from !childrenByParentPath.length to !childrenByParentPath[path]?.length to perform per-path check instead of checking total array length, fixing loading state logic for tree children.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Possibly related PRs

  • [4.x][8441] Add items translation #4746: Both PRs modify PathNavigatorTree component logic; this PR refines the children-loading check while the related PR enhances i18n integration for PathNavigator/PathNavigatorTree components.

Suggested reviewers

  • rart
  • russdanner
🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains a GitHub issue link without additional context, failing to meet the template requirement for a ticket reference or full description of PR contents. Expand the description to include a summary of what the fix addresses, why the validation was incorrect, and what the corrected behavior achieves.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the specific file and the nature of the fix (correcting validation logic for childrenByParentPath lookup table), directly matching the code changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jvega190 jvega190 marked this pull request as ready for review February 11, 2026 15:53
@jvega190 jvega190 requested a review from rart as a code owner February 11, 2026 15:53
@jvega190 jvega190 changed the title [8358] PathNavigatorTreeItem - childrenByParentPath LookupTable wrong validation [8358][4.x] PathNavigatorTreeItem - childrenByParentPath LookupTable wrong validation Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments