Repository navigation
fix(oas:sync): don't create empty category pages for tags whose pages live elsewhere - #54
Merged
Merged
Conversation
… live elsewhere The category-page pass created `<info.title>/<tag>/index.md` for every tag in the spec, whether or not any of the tag's operations would live in that folder. When a reference had been reorganized (tag folders moved into other categories, or folders spelled differently from the CLI's slug, e.g. `site-api-v10` vs. `site-api-v1-0`), every sync created an empty, childless category page and new `_order.yaml` entries, which lint then flagged as empty pages. Only create a tag's category page when at least one of its operations will end up in that folder this run: a new page is created there, an existing page already lives there, or `apply-tag-changes` will move one in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
[Medium impact] The PR appears safe to merge; no actionable new bugs remain. Reviews (2) · Last reviewed commit: "fix(oas:sync): restore a tag landing pag..." · Reviewed by Greptile |
…nder the folder A page living in a subfolder of its tag was treated as outside the tag, so a missing index.md and its order entries were not restored. Co-authored-by: Cursor <[email protected]>
erunion
approved these changes
Oct 20, 2026
greptile-apps
Bot
dismissed
their stale review
October 20, 2026 22:41
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Contributor
Author
|
@erunion after some testing, I think your PR changes are good. I think there is a bug with the lint function where it sometimes flags empty index.md files which are valid in the fs, but at least now we're not creating a ton of them incorrectly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
syncOneOascreated<info.title>/<tag>/index.md(plus_order.yamlentries) for every tag in the spec, without checking whether any of that tag's operations would actually live in that folder.Applications/) and folders spelled differently from the CLI's slug (e.g. a platform-createdsite-api-v10vs. the CLI'ssite-api-v1-0for tagSite API v1.0). Endpoint pages were matched correctly byapi.file+operationId, so only these empty parents were added, andlintthen flagged each one asEmpty page: non-hidden page has no content.lintconsidered clean (no reference issues),oas:syncreported29 added, 0 deleted, and every addition was an emptyindex.md.apply-tag-changeswill move one in. A tag with none of those, and no existingindex.md, is skipped entirely: no category page, no category folder, no_order.yamlentries.Test plan
npm test: 225/225 passing_order.yamluntouched); pages in a differently spelled folder in the same category (no-v1-0duplicate); the same "pages elsewhere" case withapply-tag-changes(still nothing created); and a tag with pages elsewhere plus a brand-new operation (folder +index.mdstill created). The first three fail without the fix.Reference pages are already in sync., no file changes, andlintshows no new warningsalready in sync, no changesdist-gha/withnpm run build:gha🤖 Generated with Claude Code