fix(#2969): use frontmatter title for directory sidebar entries and exclude non-content files - #4020
Conversation
…xclude non-content files The getMarkdownFiles function had two bugs: (1) directory entries with README.md only checked for H1 headings, ignoring frontmatter title: which standalone .md files already respected, and (2) non-content files like AGENTS.md, CLAUDE.md, CODEOWNERS, LICENSE, and template directories like 0000-experiment-template appeared as sidebar items. Add fmTitleMatch extraction to the directory branch so frontmatter title takes priority over H1, matching the standalone file branch. Add exclusion sets for non-content files and directories (including dot-directories) to prevent them from appearing in the sidebar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
Site previewPreview: https://60a4de16-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
waynesun09
left a comment
There was a problem hiding this comment.
Review squad (3 agents: Claude, Gemini) found 2 MEDIUM findings worth addressing before merge — both inline below. No CRITICAL/HIGH issues; the core fix (frontmatter title priority, exclusion of AGENTS.md/CLAUDE.md/etc.) is correct. Remaining LOW/INFO items (dead CODEOWNERS/LICENSE entries, duplicated title-extraction logic, unrelated formatting churn) omitted per posting threshold.
|
/fs-fix Please address the two MEDIUM review findings posted as inline comments:
|
|
🤖 Finished Fix · ✅ Success · Started 12:23 PM UTC · Completed 12:35 PM UTC |
Replace excludeFiles/excludeDirs sets with an isNonContent() helper that uses two patterns: /^0000-.*-template/ catches template placeholders (fixes 0000-adr-template.md leak), and /^[A-Z][A-Z0-9_-]*$/ catches ALL-CAPS repo-metadata files. This eliminates the need for manual denylist updates when new non-content files are added. Addresses review feedback on #4020
🔧 Fix agent — iteration 1 (human-triggered)Addressed both review findings by replacing hardcoded excludeFiles/excludeDirs sets with a pattern-based isNonContent() helper function. This fixes the 0000-adr-template.md sidebar leak and eliminates the need for manual denylist patches when new non-content files are added. Fixed (2):
Tests: passed Decision points
Updated by fullsend fix agent |
waynesun09
left a comment
There was a problem hiding this comment.
Both MEDIUM findings from the review squad (0000-adr-template.md sidebar leak, hardcoded exclusion list maintainability) are resolved in the latest commit via a pattern-based isNonContent() helper. Verified against the live site preview build (60a4de16-site.fullsend-ai.workers.dev): no template/repo-metadata leak in the Architecture Decisions or Experiments sidebars, real ADR pages render correctly. CI green.
|
🤖 Finished Retro · ✅ Success · Started 1:35 PM UTC · Completed 1:43 PM UTC |
|
PR #4020 fixed two bugs in the VitePress sidebar config: directory entries ignoring frontmatter titles and non-content files leaking into the sidebar. The code agent faithfully implemented the detailed suggested fix from issue #2969, but the suggestion itself had a gap — it listed specific files/directories to exclude but missed Proposals filed
|
Summary
getMarkdownFiles()inwebsite/.vitepress/config.tsto check frontmattertitle:for directory entries (README.md), matching the existing behavior for standalone.mdfilesAGENTS.md,CLAUDE.md,CODEOWNERS,LICENSE,CONTRIBUTING.md) and non-content directories (.github,0000-experiment-template, dot-directories) to prevent them from appearing in the sidebarCloses #2969
Test plan
title:in their README.md now display the frontmatter title instead of the H1 headingAGENTS.md,CLAUDE.md,CODEOWNERS,LICENSE, andCONTRIBUTING.mdno longer appear as sidebar entries0000-experiment-templatedirectory no longer appears as a sidebar entry.github) are excluded from sidebar