Collapse nested sidebar groups by default#24
Merged
hongyi-chen merged 1 commit intomainfrom May 5, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Auto-collapse the nested groups inside each top-level sidebar section (e.g. 'Capabilities', 'Interacting with agents', 'Agent context', 'Triggers', 'Integrations', 'Self-hosting') so the H2 section headers stay visible on first load but their inner groups don't push the rest of the sidebar below the fold. Top-level groups (which render as the H2 section headers like 'GETTING STARTED', 'WARP AGENTS', 'THIRD-PARTY CLI AGENTS', 'OZ CLOUD AGENTS & ORCHESTRATION') stay expanded by default \u2014 those are the section anchors users scan first. Inventory (23 nested groups across Terminal, Agents, Reference): - Terminal: Migrate to Warp, Blocks, Modern text editing, Command entry, Command completions, Windows and Tabs, Sessions, Terminal appearance, Settings file, Warpify overview, More Features, Terminal comparisons, Built-in code editor, Warp Drive overview - Agents: Capabilities, Interacting with agents, Agent context, Triggers, Integrations, GitHub Actions, Self-hosting - Reference: API Troubleshooting, Errors Starlight's SidebarSublist still auto-expands the ancestor group of the current page (via the 'isCurrent' inside the group check), so deep links continue to highlight context. Co-Authored-By: Oz <oz-agent@warp.dev>
9666df0 to
8d8884e
Compare
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-collapses nested sidebar groups (e.g.
Capabilities,Triggers,Integrations,Self-hosting) on first load so the H2 section headers (GETTING STARTED,WARP AGENTS,THIRD-PARTY CLI AGENTS,OZ CLOUD AGENTS & ORCHESTRATION, etc.) stay visible at the top of the sidebar instead of getting pushed below the fold.Preview: https://docs-git-hyc-collapse-sidebar-by-default-warpdotdev.vercel.app/agent-platform/
Problem
On
/agent-platform/and other topic pages today, every nested group renders fully expanded. The result is a long sidebar where the lower H2 sections (e.g.OZ CLOUD AGENTS & ORCHESTRATION) sit below the fold and have to be scrolled to.Change
Adds
collapsed: trueto the 23 nested groups insrc/sidebar.ts. Top-level groups (the H2 section headers) are intentionally untouched so the section anchors remain the first thing users see.collapsedis part of Starlight's native sidebar schema and flows straight throughstarlight-sidebar-topics. Starlight'sSidebarSublistopens a group via:…so any group containing the current page still auto-expands. Deep links (e.g.
/agent-platform/capabilities/skills) land with their ancestor group expanded — only siblings stay closed.Inventory (23 nested groups)
Migrate to Warp,Blocks,Modern text editing,Command entry,Command completions,Windows and Tabs,Sessions,Terminal appearance,Settings file,Warpify overview,More Features,Terminal comparisons,Built-in code editor,Warp Drive overviewCapabilities,Interacting with agents,Agent context,Triggers,Integrations,GitHub Actions,Self-hostingAPI Troubleshooting,ErrorsSupport & Community / Enterprise / Guides have no nested groups (only flat link lists), so nothing to add there.
Out of scope
The standalone Scalar API reference at
/apiis a separate bundle with its own sidebar and is intentionally left as-is for this PR.Validation
npx astro check— clean (no new errors/warnings)./agent-platform/matches the requested screenshot — H2 sections expanded, inner groups (Capabilities,Interacting with agents, etc.) collapsed./agent-platform/capabilities/skillsauto-expandsCapabilities.Conversation
Co-Authored-By: Oz oz-agent@warp.dev