feat(packages/config,packages/cli): source group card descriptions from overview pages - #156
Draft
zrosenbauer wants to merge 1 commit into
Draft
feat(packages/config,packages/cli): source group card descriptions from overview pages#156zrosenbauer wants to merge 1 commit into
zrosenbauer wants to merge 1 commit into
Conversation
…om overview pages Auto-generated group landings left nested-group cards blank unless an explicit config `description` was set — even when the group had an `overview.md`. Resolve a group's description once in the sync resolve layer (config > overview page > entry-slug overview child > probed overview file) and reuse it for both the parent card and the group's own landing intro. - config: new `discover.descriptionFallback: 'firstParagraph' | 'none'` on Page/Workspace discover and the top-level discover; export `DescriptionFallback`. Regenerated schemas/schema.json. - cli: shared resolve/description.ts (extractFileDescription, findEntrySlugChild, resolveGroupDescription); populate entry.description for groups in resolve/index.ts and recursive.ts; inject.ts consumes entry.description (drops findConfigSection); section cards now honor card.description. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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
Auto-generated group landing pages left nested-group cards blank unless an explicit config
descriptionwas set — even when the group had anoverview.md(orindex.md/readme.md). This wires up automatic description sourcing from a group's overview/root page, plus a config knob to control the inference.The gap: a group's card/landing description was only ever sourced from the group's own
page.sourcefrontmatter or a config-leveldescription. Auto-derived groups (globinclude, no explicitdescription) never adopted their in-group overview, so their card fell back to an unsetentry.descriptionand rendered nothing.Fix
Resolve a group's description once in the sync resolve layer and reuse it for both the parent card and the group's own landing intro. Precedence (highest first):
card.description→Page.description→ group overview frontmatterdescription→ overview first paragraphChanges
@ciderpress/configdiscover.descriptionFallback: 'firstParagraph' | 'none'onPage.discover,Workspace.discover, and the top-leveldiscover. Defaults to'firstParagraph';'none'requires an explicit frontmatterdescriptionand skips first-paragraph inference.DescriptionFallback. Regeneratedschemas/schema.json.@ciderpress/cliresolve/description.ts:extractFileDescription,findEntrySlugChild,resolveGroupDescription(shared extraction, moved out oflanding.ts).resolve/index.ts+recursive.tspopulateentry.descriptionfor group entries from the overview page / entry-slug child / probed overview file.inject.tsnow consumes the resolvedentry.description(drops the fragilefindConfigSection+configSectionsthreading).card.description, matching workspace cards.Docs
docs/references/configuration.md— documents the new field and the card-description precedence.Testing
resolve/description.test.ts(16 cases): frontmatter vs first-paragraph vsnonefallback, entry-slug child selection/priority,resolveGroupDescriptionprecedence.sidebar.test.tsupdated for the newinjectLandingPagessignature.@ciderpress/cli243 tests,@ciderpress/config48 tests.pnpm typecheckclean; targetedoxlint/oxfmtclean.APIgroup withdocs/api/overview.mdnow renders<SectionCard ... description="Typed REST endpoints for the platform." />on its parent's landing (previously nodescriptionprop).Related
Fixes blank nested-group cards on auto-generated landings.