Skip to content

Commit 8d8884e

Browse files
hongyi-chenoz-agent
andcommitted
Collapse nested sidebar groups by default
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>
1 parent 1e7482a commit 8d8884e

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/sidebar.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
3232
'getting-started/quickstart/customizing-warp',
3333
{
3434
label: 'Migrate to Warp',
35+
collapsed: true,
3536
items: [
3637
{ slug: 'getting-started/migrate-to-warp', label: 'Overview' },
3738
'getting-started/migrate-to-warp/migrate-to-warp-from-claude-code',
@@ -54,6 +55,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
5455
'terminal/input/classic-input',
5556
{
5657
label: 'Blocks',
58+
collapsed: true,
5759
items: [
5860
{ slug: 'terminal/blocks', label: 'Overview' },
5961
{ slug: 'terminal/blocks/block-basics', label: 'Block basics' },
@@ -67,6 +69,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
6769
},
6870
{
6971
label: 'Modern text editing',
72+
collapsed: true,
7073
items: [
7174
{ slug: 'terminal/editor', label: 'Overview' },
7275
{ slug: 'terminal/editor/alias-expansion', label: 'Alias expansion' },
@@ -77,6 +80,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
7780
},
7881
{
7982
label: 'Command entry',
83+
collapsed: true,
8084
items: [
8185
{ slug: 'terminal/entry', label: 'Overview' },
8286
{ slug: 'terminal/entry/command-corrections', label: 'Command corrections' },
@@ -88,6 +92,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
8892
},
8993
{
9094
label: 'Command completions',
95+
collapsed: true,
9196
items: [
9297
{ slug: 'terminal/command-completions', label: 'Overview' },
9398
{ slug: 'terminal/command-completions/completions', label: 'Tab completions' },
@@ -96,6 +101,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
96101
},
97102
{
98103
label: 'Windows and Tabs',
104+
collapsed: true,
99105
items: [
100106
{ slug: 'terminal/windows', label: 'Overview' },
101107
'terminal/windows/tabs',
@@ -109,6 +115,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
109115
},
110116
{
111117
label: 'Sessions',
118+
collapsed: true,
112119
items: [
113120
{ slug: 'terminal/sessions', label: 'Overview' },
114121
{ slug: 'terminal/sessions/session-navigation', label: 'Session navigation' },
@@ -117,6 +124,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
117124
},
118125
{
119126
label: 'Terminal appearance',
127+
collapsed: true,
120128
items: [
121129
{ slug: 'terminal/appearance', label: 'Overview' },
122130
{ slug: 'terminal/appearance/themes', label: 'Themes' },
@@ -133,13 +141,15 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
133141
},
134142
{
135143
label: 'Settings file',
144+
collapsed: true,
136145
items: [
137146
{ slug: 'terminal/settings', label: 'Overview' },
138147
{ slug: 'terminal/settings/all-settings', label: 'All settings reference' },
139148
],
140149
},
141150
{
142151
label: 'Warpify overview',
152+
collapsed: true,
143153
items: [
144154
{ slug: 'terminal/warpify', label: 'Overview' },
145155
{ slug: 'terminal/warpify/subshells', label: 'Warpify subshells' },
@@ -149,6 +159,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
149159
},
150160
{
151161
label: 'More Features',
162+
collapsed: true,
152163
items: [
153164
{ slug: 'terminal/more-features', label: 'Overview' },
154165
'terminal/more-features/accessibility',
@@ -168,6 +179,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
168179
'terminal/command-palette',
169180
{
170181
label: 'Terminal comparisons',
182+
collapsed: true,
171183
items: [
172184
{ slug: 'terminal/comparisons', label: 'Overview' },
173185
{ slug: 'terminal/comparisons/performance', label: 'Performance benchmarks' },
@@ -183,6 +195,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
183195
{ slug: 'code/overview', label: 'Code overview' },
184196
{
185197
label: 'Built-in code editor',
198+
collapsed: true,
186199
items: [
187200
{ slug: 'code/code-editor', label: 'Overview' },
188201
{ slug: 'code/code-editor/language-server-protocol', label: 'Language Server Protocol (LSP)' },
@@ -201,6 +214,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
201214
items: [
202215
{
203216
label: 'Warp Drive overview',
217+
collapsed: true,
204218
items: [
205219
{ slug: 'knowledge-and-collaboration/warp-drive', label: 'Overview' },
206220
{ slug: 'knowledge-and-collaboration/warp-drive/notebooks', label: 'Notebooks' },
@@ -238,6 +252,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
238252
{ slug: 'agent-platform/local-agents/overview', label: 'Warp Agents overview' },
239253
{
240254
label: 'Capabilities',
255+
collapsed: true,
241256
items: [
242257
{ slug: 'agent-platform/capabilities', label: 'Overview' },
243258
{ slug: 'agent-platform/capabilities/slash-commands', label: 'Slash commands' },
@@ -258,6 +273,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
258273
},
259274
{
260275
label: 'Interacting with agents',
276+
collapsed: true,
261277
items: [
262278
{ slug: 'agent-platform/local-agents/interacting-with-agents', label: 'Overview' },
263279
'agent-platform/local-agents/interacting-with-agents/terminal-and-agent-modes',
@@ -268,6 +284,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
268284
},
269285
{
270286
label: 'Agent context',
287+
collapsed: true,
271288
items: [
272289
{ slug: 'agent-platform/local-agents/agent-context', label: 'Overview' },
273290
{ slug: 'agent-platform/local-agents/agent-context/blocks-as-context', label: 'Blocks as context' },
@@ -302,6 +319,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
302319
{ slug: 'agent-platform/cloud-agents/platform', label: 'Oz platform' },
303320
{
304321
label: 'Triggers',
322+
collapsed: true,
305323
items: [
306324
{ slug: 'agent-platform/cloud-agents/triggers', label: 'Overview' },
307325
{ slug: 'agent-platform/cloud-agents/triggers/scheduled-agents-quickstart', label: 'Quickstart' },
@@ -310,13 +328,15 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
310328
},
311329
{
312330
label: 'Integrations',
331+
collapsed: true,
313332
items: [
314333
{ slug: 'agent-platform/cloud-agents/integrations', label: 'Overview' },
315334
{ slug: 'agent-platform/cloud-agents/integrations/quickstart', label: 'Quickstart' },
316335
'agent-platform/cloud-agents/integrations/slack',
317336
'agent-platform/cloud-agents/integrations/linear',
318337
{
319338
label: 'GitHub Actions',
339+
collapsed: true,
320340
items: [
321341
{ slug: 'agent-platform/cloud-agents/integrations/github-actions', label: 'Overview' },
322342
{ slug: 'agent-platform/cloud-agents/integrations/quickstart-github-actions', label: 'Quickstart' },
@@ -339,6 +359,7 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
339359
{ slug: 'agent-platform/cloud-agents/deployment-patterns', label: 'Deployment patterns' },
340360
{
341361
label: 'Self-hosting',
362+
collapsed: true,
342363
items: [
343364
{ slug: 'agent-platform/cloud-agents/self-hosting', label: 'Overview' },
344365
{ slug: 'agent-platform/cloud-agents/self-hosting/quickstart', label: 'Quickstart' },
@@ -387,10 +408,12 @@ export const sidebarTopics: StarlightSidebarTopicsUserConfig = [
387408
'reference/api-and-sdk/demo-sentry-monitoring-with-sdk',
388409
{
389410
label: 'API Troubleshooting',
411+
collapsed: true,
390412
items: [
391413
{ slug: 'reference/api-and-sdk/troubleshooting', label: 'API Troubleshooting' },
392414
{
393415
label: 'Errors',
416+
collapsed: true,
394417
items: [
395418
{ slug: 'reference/api-and-sdk/troubleshooting/errors', label: 'Errors' },
396419
'reference/api-and-sdk/troubleshooting/errors/insufficient-credits',

0 commit comments

Comments
 (0)