Skip to content

feat(gui): Svelte app shell + Prepare/Machine workspace redesign (#216) - #223

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/svelte-shell
Jun 26, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/svelte-shell

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #216. Builds the real Svelte app shell + the restrained desktop redesign, replacing the #215 dev scaffold. Part of epic #214 (strangler-on-main: React still ships; Svelte lives behind the dev-only index.svelte.html and is tree-shaken out of vite build).

What changed

  • Shell owns its regions directly. The React shell assembled every region as element trees and threaded them through MainTab as four ReactNode props; src/App.svelte now composes region components (MenuBar, WorkspaceTabs, PrepareWorkspace/MachineWorkspace, UtilityDrawer, StatusBar) that each own their layout. Indirection gone.
  • Prepare / Machine workspaces (renamed from Main / Stream around user intent). Alt+1 / Alt+2 preserved; the unsaved-changes beforeunload guard preserved (via <svelte:window>).
  • Layer list consolidated into the left inspector — the config forms (Mandrel/Tow/Machine from Svelte 5 foundation + config-forms vertical slice (decision gate) #215) and a Layers section now live together in the left project hierarchy (was a separate bottom panel in React), freeing viewport width.
  • Collapsible bottom Utility drawer, closed by default (for width-hungry surfaces: console/G-code/diagnostics later).
  • Restrained desktop redesign via component-scoped styles over the existing design tokens — calm and dense: 1px borders not shadows, compact section headers, no gradients/decoration. The shared global CSS (used by the live React app) is untouched.
  • Shell UI state — src/state/ui-state.svelte.ts runes module (active workspace + panel/drawer flags), separate from the project document.

Scope boundaries (placeholders, by design)

The viewport, real layer list/editors, machine/streaming, and dialogs are later slices. Their regions render clear placeholders; menu items whose slices haven't landed (Open/Save/Export, layer ops, About) are present but disabled so the menu structure is faithful without dead-ends. Wired now: New Project, workspace switch, panel/drawer toggles.

Verification

  • Local gate green: tsc, svelte-check (0 errors), 661 vitest tests (+18 shell tests), coverage 82/74/80/82 (> 60/65/50/60), stylelint, lint:css:vars, vite build, bundle budget.
  • Production bundle unchanged: index-*.js is 595.75 kB — byte-identical to before (Svelte shell not in the rollup input; index.svelte.html not emitted).
  • Visual + functional parity confirmed in-browser: Prepare/Machine switch, File dropdown (New Project resets; file-ops disabled), drawer toggle, status bar derivations — all working in the restrained redesign.
  • Adversarially reviewed by an independent agent before commit (findings folded in).

Notes for reviewers

  • No change to the Python backend, OpenAPI contract, Rust shell, or the shipped React app.
  • Preview: http://localhost:5173/index.svelte.html.

Part of #214.

Replaces the #215 dev scaffold with the real Svelte shell (epic #214,
strangler-on-main: React still ships; Svelte stays behind the dev-only entry
and out of the production bundle).

- Shell owns its regions directly (App.svelte composes MenuBar / WorkspaceTabs /
  Prepare+Machine workspaces / UtilityDrawer / StatusBar), retiring the React
  MainTab ReactNode-prop composition.
- Prepare / Machine workspaces (renamed from Main / Stream); Alt+1/2 and the
  beforeunload dirty guard preserved.
- Layer list consolidated into the left inspector (was a separate bottom panel);
  collapsible bottom Utility drawer, closed by default.
- Restrained desktop redesign via component-scoped styles over existing tokens
  (1px borders not shadows, compact headers, no decoration); shared global CSS
  used by the live React app is untouched.
- Shell UI state in src/state/ui-state.svelte.ts (runes), separate from the
  project document.

Viewport / layer editing / streaming / dialogs are later slices and render
placeholders; menu items for unmigrated actions are present but disabled.

Production bundle unchanged (595.75 kB; Svelte not in the rollup input).
Extends the css-var guard to scan .svelte scoped styles.

Refs #214
@CameronBrooks11 CameronBrooks11 added the gui Pull requests that update GUI components label Jun 26, 2026
@CameronBrooks11
CameronBrooks11 merged commit 68b7919 into main Jun 26, 2026
18 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/svelte-shell branch June 26, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gui Pull requests that update GUI components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI shell: Prepare/Machine workspace, regions, menu + status bar, restrained desktop redesign

1 participant