Repository navigation
Description
Overview
Add a "Schema Types" item to the navigation sidebar, positioned below Collections. Clicking it opens a panel listing all available node types — built-in types first (currently only task), followed by user-defined custom schema types. Clicking a schema type opens it as a new tab in the active panel using BaseNodeViewer.
Problem Statement
There is currently no way for users to browse or access schema type definitions from the sidebar. Schema types are stored as nodes in the database and should be navigable like any other content.
Proposed Solution
Add a new sidenav item "Schema Types" with a custom icon (see below). When clicked, it opens a panel that queries all schema nodes via getAllSchemas(), groups them (built-in first, then custom), and lists them. Clicking a schema opens it in a new tab using BaseNodeViewer.
Icon Specification
The icon follows the same style as other sidenav icons: viewBox="0 0 24 24", fill="none", stroke="currentColor", stroke-width="2", stroke-linecap="round", stroke-linejoin="round".
Inspired by the Google Material "Interests" icon pattern (4-quadrant shapes), but with these specific shapes and layout:
| Position | Shape |
|---|---|
| Top-left | Triangle |
| Top-right | Square |
| Bottom-left | Square |
| Bottom-right | Diamond (rotated square) |
The icon should use the same size and visual weight as the existing Collections folder icon in the sidebar.
Schema Data
Schemas are fetched via backendAdapter.getAllSchemas() which returns SchemaNode[]. Each has:
id: string— the schema identifier (e.g."task","person")content: string— display nameisCore: boolean— true for built-in types, false for user-definednodeType?: 'schema'— always schema (may be implicit)
Grouping logic:
- Built-in types (
isCore === true): show first. Currently onlytaskis displayed from built-ins; others will be added later as individual built-in types are promoted to the list. - Custom types (
isCore === false): show below built-ins, in the order returned by the API.
A visual separator or section label should distinguish the two groups when both are present.
Tab Behavior
Clicking a schema type opens it as a new tab in the active panel. For now, render the schema using BaseNodeViewer with the schema's id as the nodeId. The interface for schema type viewing will be defined in follow-up issues.
Acceptance Criteria
- "Schema Types" sidenav item appears below Collections with the specified 4-shape icon
- Clicking the sidenav item opens a Schema Types panel/list
- Panel queries all schemas via
getAllSchemas()and renders them grouped (built-in first, then custom) - Only the
taskbuilt-in type is shown from built-in schemas (others filtered out for now) - Clicking a schema type opens it as a new tab in the active panel using
BaseNodeViewer - Panel handles empty state (no custom schemas defined)
- Tests pass (
bun run test:all) - Code passes
bun run quality:fix
Technical Specifications
Reference Files
- NavigationSidebar:
packages/desktop-app/src/lib/components/layout/navigation-sidebar.svelte— add new sidenav item below Collections section - BackendAdapter:
packages/desktop-app/src/lib/services/backend-adapter.ts—getAllSchemas(): Promise<SchemaNode[]>(line 115) - SchemaNode type:
packages/desktop-app/src/lib/types/schema-node.ts—SchemaNode,isSchemaNode() - BaseNodeViewer:
packages/desktop-app/src/lib/design/components/base-node-viewer.svelte— use for rendering opened schema tab - Tab system: reference existing tab-open patterns in the codebase for opening a new tab in the active panel
Built-in Filter
Until more built-in types are promoted, filter isCore === true schemas to only show id === 'task'.
Non-Goals
- Defining the full schema type UI/editor (follow-up issues will cover this)
- Creating, editing, or deleting schema types from this panel
- Expanding schema items to show fields inline
Related Issues
- Collections sidenav folder icon should reflect expanded/collapsed state #939 (sibling sidenav item — Collections folder icon state)
Activity
malibio commentedon Mar 14, 2026
Baseline: 117 test files, 3704 tests passed. Implementation complete — Schema Types sidenav item added with 4-shape icon, SchemaTypesSubPanel component created with built-in/custom grouping. All tests still passing at 117 files, 3704 tests.
Add Schema Types sidenav item with panel listing available node types (…
Schema Types sidenav item listing available node types (#946)