The rig-library sidebar now presents shipped starter rigs under their
FactoryRigCategory headers (Shoegaze Walls, Dreampop, Classic, Ambient,
Experimental) in fixed catalog order, with the user's own rigs under a
"My Rigs" header. Starter rows show a "Starter rig" subtitle and are not
reorderable; user rows keep drag-to-reorder and Move Up/Down (now scoped to
the user's own rigs). Grouping is presentational, so it stays correct
regardless of underlying library order.
Adds FactoryRigLibrary.category(for:) and rigs(in:) with tests.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add ChainRouter persistence so routed multi-board rigs survive save/load —
previously captureState/loadRig only handled plain boards, so any A/B router
rig was silently lost on save (a latent gap this fixes for user rigs too).
- New ChainRouterState (Codable): each router's two linear branches as
[PedalState] plus splitter branch levels and merger output levels.
- ShoeGazeState gains an additive `routers` field decoded with
decodeIfPresent (nil for old rigs) — no format-version bump; routerless
rigs stay byte-identical (nil, not []).
- captureState snapshots routers; rebuildAllBoards reconstructs each via
makeChainRouter/addTo{A,B}/finalize and restores the blend.
FactoryRig gains a session-scoped builder variant (FactoryRigBuild enum) so
a rig can create its own boards/routers; makeEntries branches on it.
Ships the Garcia OBEL Clean/Effects Split: an effects/lead board (octave,
envelope filter, overdrive, phaser, delay, amp) vs a clean direct board,
selectable via the router — showcasing the multi-board capability.
Tests: full router capture -> JSON -> load round-trip with structure and
branch-level assertions plus a render check, backward-compat (no routers
key when routerless), and the Garcia rig via the factory load+render suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Saving over a currently-loaded factory rig now shows a confirmation dialog
instead of silently replacing the shipped original: Overwrite (destructive),
Save as New Rig… (new id, keeps the original), or Cancel. The pending
follow-up (e.g. the Save & Clear clear step) is threaded through all three
paths.
Adds FactoryRigLibrary.factoryIDs / isFactory(_:) so the UI can tell a
shipped rig from a user rig by id, with a test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a factory rig library: 8 curated starter pedalboard rigs seeded into
an empty rig library on first launch. Rigs are compile-checked builders
(construct concrete pedals, set typed @UIParam values, board.add) rather
than hand-written JSON, so a renamed pedal control is a build error, not a
silently corrupted preset.
Seeding builds each rig in a throwaway offline (never-started) engine,
captures a RigEntry with a stable per-rig UUID (idempotent re-seed), and
saves to the store. Bootstrap rolls back this run's saves if any store.save
fails, so a partial library can't freeze future seeding (gated on isEmpty).
Rigs are named/described by sound, not trademarked products or artists; a
test guards against brand names leaking into names/blurbs. Full ship-path
test loads and renders every rig to non-silent output.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>