fix(penpal): filter ANCHORS.md from anchors source - #533
Conversation
ANCHORS.md is an empty marker file with only frontmatter — not interesting to display. Add RequireSibling field to SourceType so the scanner only includes files from directories containing a specified sibling file. The anchors source sets RequireSibling: "ANCHORS.md", which both hides the marker and excludes stray files (e.g. a PRODUCT.md without a sibling ANCHORS.md) at scan time rather than in GroupFiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d8ae94a44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return "dependencies" | ||
| default: | ||
| return "" // skip non-ANCHORS files | ||
| return "" // skip ANCHORS.md and non-ANCHORS files |
There was a problem hiding this comment.
Prevent manual sources from resurfacing ANCHORS.md
Returning "" for ANCHORS.md means the anchors source no longer claims that path, so scanProjectSources never marks it as seen and a later overlapping manual tree source (for example, path: "." in project sources) will include ANCHORS.md again. In that configuration, the marker file reappears in the sidebar/search despite this change’s goal of hiding it globally, because deduplication in scanProjectSources is first-claim-wins and this source now opts out of claiming the file.
Useful? React with 👍 / 👎.
…-file-dis * origin/main: fix(penpal): ensure repo badges are generated when repos are added (#534) fix(penpal): show agent selector dropdown below trigger button (#532) fix(penpal): filter ANCHORS.md from anchors source (#533) fix(penpal): show wave animation in sidebar when run phase is unknown (#531) fix(penpal): anchor stability improvements and code block highlights (#530) refactor(penpal): decompose Layout.tsx into focused components (#528) # Conflicts: # apps/penpal/frontend/src/components/Layout.tsx
Summary
RequireSiblingfield toSourceTypeso the scanner pre-filters files at walk time: only files in directories containing the specified sibling are includedRequireSibling: "ANCHORS.md", which hides the marker itself (ClassifyFile returns "") and excludes stray files (e.g. aPRODUCT.mdwithout a siblingANCHORS.md) without relying on GroupFiles for module-membership checks🤖 Generated with Claude Code