Skip to content

fix: derive folder path from direct child for correct sorting#72

Merged
rsbh merged 1 commit into
mainfrom
fix/folder-sort-nested
May 14, 2026
Merged

fix: derive folder path from direct child for correct sorting#72
rsbh merged 1 commit into
mainfrom
fix/folder-sort-nested

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented May 14, 2026

Summary

  • getFolderPath now checks direct child pages first, then recurses into subfolders using parentPath — fixes wrong path for deeply nested folder structures
  • Extract parentPath util to avoid duplication
  • Use NodeType.Page/Folder constants instead of string literals

Test plan

  • Folders with subfolders sort correctly by meta.json order
  • Folders with only nested subfolders (no direct pages) still sort

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chronicle Ready Ready Preview, Comment May 14, 2026 9:59am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@rsbh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 199e26c6-2b20-44ad-a96b-faac6c9cebec

📥 Commits

Reviewing files that changed from the base of the PR and between 44d6e27 and 96d7eb1.

📒 Files selected for processing (3)
  • packages/chronicle/src/lib/folder-utils.ts
  • packages/chronicle/src/lib/source-utils.test.ts
  • packages/chronicle/src/lib/source.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/folder-sort-nested

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.

- getFolderPath now checks direct child pages first, then recurses
  into subfolders using parentPath — fixes wrong path for deeply
  nested folder structures
- Extract parentPath util to avoid duplication
- Use NodeType.Page/Folder constants instead of string literals

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rsbh rsbh merged commit a48b7d4 into main May 14, 2026
4 checks passed
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.

2 participants