feat(cli): propagate collapsed config from API reference to child package nodes#16245
feat(cli): propagate collapsed config from API reference to child package nodes#16245cadesark wants to merge 1 commit into
Conversation
…kage nodes Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
Test Results:
|
|
Awesome — looks great! All 16 endpoint groups expanded by default, exactly as intended. Thanks for verifying on the live site. |

Description
Setting
collapsed: open-by-defaultorcollapsed: trueon an- apientry indocs.ymlnow cascades to all auto-generated endpoint group sections (API package nodes) in the sidebar.Previously, the
collapsedvalue was only set on the top-levelApiReferenceNodebut not propagated to childApiPackageNodes — every child hadcollapsed: undefinedhardcoded. The frontend already handlescollapsedon any node viagetInitiallyCollapsedNodes/getInitiallyOpenByDefaultNodes, so the only gap was the CLI not passing the value through.Changes Made
ApiReferenceNodeConverter.ts, changed 7 locations whereapiPackagenodes hadcollapsed: undefinedto inheritthis.apiSection.collapsedsectionentries in the layout that set their owncollapsedare unchanged (line 464)Testing
pnpm --filter @fern-api/docs-resolver test— 44/44 passedpnpm --filter @fern-api/configuration-loader test -- --testPathPattern collapsible— 13/13 collapsed tests + 252 total passedpnpm check— biome lint cleanLink to Devin session: https://app.devin.ai/sessions/f50b384f315b4bb8975f66c337f5fdb4
Requested by: @cade-fern