Repository navigation
Description
Overview
Follow-up to #940. Two improvements to the Schema Types sidenav item:
- Part 1 (no dependencies): Replace the current slide-out sub-panel with an inline expand/collapse list — matching exactly how Collections works in the sidenav.
- Part 2 (depends on QueryNodeViewer with Multi-View Rendering Support #441): When a schema type is clicked, open a new tab in the active panel routed to
QueryNodeViewer, passing the schema'snodeId.
Part 1: Inline Expand/Collapse (no dependency on #441)
Problem
The current Schema Types sidenav item opens a SchemaTypesSubPanel that slides out to the right — inconsistent with the Collections section which expands inline (vertically) using Collapsible.Root from bits-ui.
Solution
Replace the sub-panel approach with the same Collapsible.Root pattern used by Collections in navigation-sidebar.svelte (lines 347–454).
Structure:
▼ Schema Types ← toggle header (click to expand/collapse)
◆ Task ← built-in types (isCore === true, only 'task' shown for now)
───────────── ← separator when both groups present
◆ My Custom Type ← user-defined types (isCore === false)
◆ Another Type
- Uses
Collapsible.Rootwithopenstate persisted in layout store (same ascollectionsExpanded) - Indentation matches Collections item depth (
padding-left: 1.25rem) - Icon: existing 4-shape Schema Types icon (unchanged)
- Filter: only show
isCore === trueschemas whereid === 'task'(same rule as Schema Types sidenav item listing available node types #940) - Empty state for custom types: show a subtle "No custom types" message or nothing
Files to Modify
packages/desktop-app/src/lib/components/layout/navigation-sidebar.svelte— replace schema types section withCollapsible.Rootinline patternpackages/desktop-app/src/lib/stores/layout.js— addschemaTypesExpandedpersisted state (parallel tocollectionsExpanded)packages/desktop-app/src/lib/components/layout/schema-types-sub-panel.svelte— delete this file (no longer needed)
Part 2: Open QueryNodeViewer on Type Click (depends on #441)
Problem
Currently handleSchemaClick() in navigation-sidebar.svelte opens a tab with nodeType: 'schema', which routes to the schema editor viewer. It should instead open the QueryNodeViewer to show all nodes of that type.
Solution
Update handleSchemaClick(schemaId: string) to open a new tab in the active panel passing the schema's nodeId. Since every schema is a node, and QueryNodeViewer accepts a nodeId, no synthetic config is needed — the schema node IS the entry point.
function handleSchemaTypeClick(schemaId: string) {
// schemaId is the schema node's id (e.g. 'task', or a custom schema's node id)
// QueryNodeViewer will load the schema node, derive targetType and columns from it
navigationService.openNodeInActivePane(schemaId, 'query');
}The tab opens in the active panel (same pane, new tab). Clicking a row in the resulting table opens the node in another panel — that behavior is handled inside QueryNodeViewer via navigateToNodeInOtherPane() (implemented in #441).
Files to Modify
packages/desktop-app/src/lib/components/layout/navigation-sidebar.svelte— updatehandleSchemaClick()to usenodeType: 'query'
Acceptance Criteria
Part 1
- Schema Types section expands/collapses inline (vertically) — no slide-out panel
- Expanded state persisted in layout store (
schemaTypesExpanded) - Built-in types shown first (only
taskfor now), custom types below with a separator - Empty state handled when no custom types exist
-
schema-types-sub-panel.sveltedeleted - Visual style matches Collections section exactly (indentation, icon weight, toggle arrow)
Part 2 (implement after #441 is merged)
- Clicking a schema type opens a new tab in the active panel routed to
QueryNodeViewer - The schema's
nodeIdis passed — no synthetic query config - Tab title shows the schema type's name (e.g. "Task")
- Clicking a node row in the table opens it in the other panel (handled by QueryNodeViewer with Multi-View Rendering Support #441)
Both Parts
- Tests pass (
bun run test:all) - Code passes
bun run quality:fix
Technical References
- Collections expand/collapse pattern:
navigation-sidebar.sveltelines 347–454 — replicate exactly - Layout store:
packages/desktop-app/src/lib/stores/layout.js— addschemaTypesExpandedalongsidecollectionsExpanded - Schema data:
backendAdapter.getAllSchemas()returnsSchemaNode[]withid,content,isCore - Navigation:
packages/desktop-app/src/lib/services/navigation-service.ts—navigateToNodeInOtherPane()for row clicks (in QueryNodeViewer with Multi-View Rendering Support #441),openNodeInActivePane()for tab open
Dependencies
- Part 1: none
- Part 2: QueryNodeViewer with Multi-View Rendering Support #441 (QueryNodeViewer must be implemented and registered first)
Related Issues
- Schema Types sidenav item listing available node types #940 — original Schema Types sidenav implementation (closed)
- QueryNodeViewer with Multi-View Rendering Support #441 — QueryNodeViewer implementation
Activity
malibio commentedon Mar 16, 2026
Frontend baseline: 118 test files, 3719 tests passed
Schema Types sidenav: inline expand/collapse (closes #960 Part 1)
Schema Types sidenav: inline expand/collapse + QueryNodeViewer integr…
fix: schema type click opens QueryNodeViewer instead of schema editor
fix: schema-driven QueryNodeViewer with reactive table and no type ha…
fix: reactive QueryNodeViewer table + schema sidenav (closes #960)
fix: prevent BaseNodeViewer fallback during async viewer load (freeze…
Schema Types sidenav: inline expand/collapse + QueryNodeViewer integr…
fix: prevent BaseNodeViewer fallback during async viewer load (freeze…