App shell scaffold with section views (#82) #84

Merged
crowmaki merged 7 commits from issue-82-app-shell-scaffold into main 2026-10-08 02:59:34 +00:00
Owner

Closes #82.

Builds the ADR-0006 workbench and moves the temporary UI into it. Every feature ticket can now add its UI to a real Section instead of src/routes/+page.svelte.

What's in it

  • Shell: menu bar, activity rail, Section sidebar trees, up to two Panes (left in the path, right in ?right=), a Queue dock placeholder (Bottom / Right / Hidden) and a status bar. Shortcuts: Ctrl+1…9, Ctrl+B, Ctrl+J, Ctrl+, Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y.
  • Library and tokens: Bits UI and PaneForge, with the ADR-0006 tokens on :root in src/app.css. No Tailwind.
  • Routes: every path lands on src/routes/[...path]. A pure, tested module (src/lib/shell/routes.ts) parses the route map, and the shell renders the Panes. src/routes/+page.svelte is deleted.
  • Start screen with New / Open when no Project is open.
  • Views:
    • Script: import with progress and summary, subtitles.
    • Entities: Characters with Looks and Wardrobe items, Locations and folders, Props, Source sheets with the crop editor (#35).
    • Scenes: cast and Lighting.
    • Project settings: Lighting and the slug table.
    • Sections with no feature yet show placeholders that link their tickets.
  • Right-click menus throughout. The Entities sidebar is the list; right-click to create, merge, move, rename or delete, or to open to the side or in a new window. In the Script, right-click selected text for Copy and New character / New prop from the selection. Looks, Wardrobe items, cast rows, the Scenes list, Lighting and slug rows have menus too. New names are asked for in one shared dialog.
  • Second windows: open_window now takes the app path to open. A secondary window (?window=secondary) shows one Pane, the menu bar and the status bar, and closes itself when the Project closes.
  • Shared UI in src/lib/ui: Button (red danger variant), TrashButton, TextInput, TextArea, Select, Menu, ContextMenu, Checkbox, Field, FormGrid, Badge, Table, ListRow, ListGroup, Block, Dialog, AskDialog, Tooltip, EmptyState, TicketLink.
  • Ticket links open in the user's browser through tauri-plugin-opener.

Changes to ADR-0006

There is no References Section. A Reference set always belongs to one Entity and is edited in its inspector. Source sheets are a group in the Entities sidebar (/entities/sheets). The route map and the Ctrl+1…9 shortcuts in ADR-0006 are updated to match.

Not in this PR

  • The global inspector panel and Ctrl+I.
  • "Follow main window" for per-Scene views in a secondary window.
  • Location Reference sets per Lighting. The backend has none yet; they belong to #37, and the Location inspector has a placeholder that links it.

Testing

  • bun run check: 0 errors, 0 warnings.
  • bun run test: route-map tests (10) pass.
  • cargo test --workspace --all-features: all pass. The new adapter test covers open_window(path).
  • bun run build succeeds.
  • Checked in a browser against a mocked backend (screenshots). Not yet run inside Tauri, so second windows, the clipboard Copy and the opener links still need a check in the real app.
Closes #82. Builds the ADR-0006 workbench and moves the temporary UI into it. Every feature ticket can now add its UI to a real Section instead of `src/routes/+page.svelte`. ## What's in it - **Shell:** menu bar, activity rail, Section sidebar trees, up to two Panes (left in the path, right in `?right=`), a Queue dock placeholder (Bottom / Right / Hidden) and a status bar. Shortcuts: Ctrl+1…9, Ctrl+B, Ctrl+J, Ctrl+\, Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y. - **Library and tokens:** Bits UI and PaneForge, with the ADR-0006 tokens on `:root` in `src/app.css`. No Tailwind. - **Routes:** every path lands on `src/routes/[...path]`. A pure, tested module (`src/lib/shell/routes.ts`) parses the route map, and the shell renders the Panes. `src/routes/+page.svelte` is deleted. - **Start screen** with New / Open when no Project is open. - **Views:** - Script: import with progress and summary, subtitles. - Entities: Characters with Looks and Wardrobe items, Locations and folders, Props, Source sheets with the crop editor (#35). - Scenes: cast and Lighting. - Project settings: Lighting and the slug table. - Sections with no feature yet show placeholders that link their tickets. - **Right-click menus throughout.** The Entities sidebar is the list; right-click to create, merge, move, rename or delete, or to open to the side or in a new window. In the Script, right-click selected text for Copy and New character / New prop from the selection. Looks, Wardrobe items, cast rows, the Scenes list, Lighting and slug rows have menus too. New names are asked for in one shared dialog. - **Second windows:** `open_window` now takes the app path to open. A secondary window (`?window=secondary`) shows one Pane, the menu bar and the status bar, and closes itself when the Project closes. - **Shared UI** in `src/lib/ui`: Button (red danger variant), TrashButton, TextInput, TextArea, Select, Menu, ContextMenu, Checkbox, Field, FormGrid, Badge, Table, ListRow, ListGroup, Block, Dialog, AskDialog, Tooltip, EmptyState, TicketLink. - **Ticket links** open in the user's browser through `tauri-plugin-opener`. ## Changes to ADR-0006 There is no References Section. A Reference set always belongs to one Entity and is edited in its inspector. Source sheets are a group in the Entities sidebar (`/entities/sheets`). The route map and the Ctrl+1…9 shortcuts in ADR-0006 are updated to match. ## Not in this PR - The global inspector panel and Ctrl+I. - "Follow main window" for per-Scene views in a secondary window. - Location Reference sets per Lighting. The backend has none yet; they belong to #37, and the Location inspector has a placeholder that links it. ## Testing - `bun run check`: 0 errors, 0 warnings. - `bun run test`: route-map tests (10) pass. - `cargo test --workspace --all-features`: all pass. The new adapter test covers `open_window(path)`. - `bun run build` succeeds. - Checked in a browser against a mocked backend (screenshots). **Not yet run inside Tauri**, so second windows, the clipboard Copy and the opener links still need a check in the real app.
Build the ADR-0006 workbench and move the temporary UI into it.

- Bits UI + PaneForge, design tokens on :root (src/app.css), no Tailwind.
- Shell: menu bar, activity rail, Section sidebar trees, up to two Panes
  (left in the path, right in ?right=), Queue dock placeholder
  (bottom / right / hidden), status bar. Ctrl+1..0, Ctrl+B, Ctrl+J,
  Ctrl+\, Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y.
- Route map parsed by a pure, tested module (src/lib/shell/routes.ts);
  every path lands on [...path] and the shell renders the Panes.
- Start screen with New / Open when no Project is open.
- Views: Script (import, progress, summary, selection to Character /
  Prop, subtitles), Characters / Looks / Wardrobe items, Locations and
  folders, Props, merges, Scene cast and Lighting, Lighting and slug
  table, Reference sets, Source sheets with the crop editor (#35).
  Sections without features show placeholders linking their tickets.
- open_window takes the app path to open, so a second window opens on a
  chosen view (?window=secondary: one Pane, menu bar, status bar).
- Shared UI in src/lib/ui: Button, TextInput, TextArea, Select, Menu,
  Checkbox, Field, FormGrid, Badge, Table, ListInspector, ListRow,
  ListGroup, Block, Dialog, Tooltip, EmptyState, TicketLink.
- src/routes/+page.svelte removed; ticket links open in the browser
  through tauri-plugin-opener.
A Reference set always belongs to one Entity and is already edited in
that Entity's inspector, so a References Section listed every set twice.

- Drop the References Section and its Reference sets list; the rail now
  has nine Sections (Ctrl+1..9).
- Source sheets and their crop editor move to /entities/sheets, a group
  in the Entities sidebar.
- The Lock snapshots placeholder (#37) moves into each Reference set panel.
- ADR-0006: update the route map and record why.
- Shared ContextMenu (Bits UI) and MenuEntries, with submenus, used by
  both right-click and dropdown menus.
- Entities: the inner list column and the "New …" text boxes are gone.
  The sidebar tree is the list; right-click a Character, Location, folder,
  Prop, Source sheet or group heading to create, merge, move, rename or
  delete, or to open it to the side or in a new window. Empty states keep
  a create button for when the sidebar is hidden.
- New names are asked for in one shared dialog (asker / AskDialog).
- Entity actions live in views/entities/actions.ts, shared by menus,
  inspectors and empty states.
- Script: right-click offers Copy, New character / New prop from the
  selection, and Open Scene / Open <Character>; the selection bar is gone.
- Looks, Wardrobe items, cast rows, the Scenes list, Lighting and slug
  rows have right-click menus.
- ListInspector is removed (unused).
- The danger Button is a red fill when enabled and a red outline when
  disabled, so destructive actions read as such in both states.
- Delete is disabled (with the reason) for a Character with dialogue and
  a Location used by Scenes, in the inspector and the right-click menu,
  instead of failing after the click.
- Drop the "Merge into…" buttons from the Character and Location
  inspectors; merging stays in the sidebar's right-click menu.
A shared TrashButton (red icon, tooltip naming the row) replaces the red
Remove buttons in the Lighting and slug tables, so the full red Delete
button is kept for deleting Entities.
- Fix the panel closing itself on first expand: `open={…}` was re-applied
  whenever the summary's tile count changed, so it now binds its state.
  Panels start expanded and load on mount.
- Tiles sit side by side, four columns or two when the panel is narrow
  (the container query lives on a div; it doesn't apply inside <details>).
- Labelled sets add Tiles with "Add tile…" and the naming dialog instead
  of a text box.
- The Location inspector names the Reference sets per Lighting that #37
  will add; the backend has none yet.
crowmaki deleted branch issue-82-app-shell-scaffold 2026-10-08 02:59:34 +00:00
Sign in to join this conversation.
No description provided.