Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
songs: lead the View tab with sheet music, metronome & recorder
[._.]/ Adam Eivy2cad2bb44680
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 142f0270c7..5942ec4b97 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -19,6 +19,7 @@## Changed+- **Songs: the practice tools now lead the View tab** — the sheet music, metronome, and vocal recorder are grouped at the top of a song's performance view (just under the meta line and round-stack toggle), instead of the recorder sitting at the very bottom below the lyrics and references. So when you open a song to play it, you read the chart, set the tempo, and record against it without scrolling — the lyrics and reference videos follow underneath.- **Universe Builder now stores universes in PostgreSQL** — your universes (canon bibles, categories, composite sheets, locks, influences, and the per-universe render-run history) moved out of the per-record `data/universes/{id}/index.json` files into dedicated `universes` and `universe_runs` tables, one row per universe. Existing installs are migrated automatically and losslessly on first boot — the legacy `data/universes/` directory is renamed aside (`data/universes.imported`) as a one-release recovery source. Nothing changes in how you create, edit, delete, render, or sync universes: the Universe Builder UI and the cross-machine federation wire format are unchanged (no schema-version bump — the sync payload is storage-independent, so a machine on this version syncs universes cleanly with a peer still on the old file storage). This is the first implementation slice (#1014) of the Create relational-schema migration designed in #999. Universes still persist to the per-record file store under the `MEMORY_BACKEND=file` dev/test escape hatch.- **Create relational schema design (Postgres-first plan, #999)** — a design doc ([`docs/plans/2026-06-07-create-relational-schema-design.md`](../docs/plans/2026-06-07-create-relational-schema-design.md)) now specifies the PostgreSQL data model for the remaining file-backed Create domains: universes, pipeline series/issues, Story Builder sessions, and Writers Room metadata, plus how `catalog_ingredient_refs` will resolve to DB-native targets. It's design-only (no behavior change): one row per record with the record body in a `data` JSONB column and only queryable fields promoted to columns (mirroring the Creative Director #997 and catalog-user-types #1001 swaps), zero hard FKs (so a federated ref can still arrive before its target), Writers Room draft `.md` bodies staying file-backed with only their metadata indexed, and — crucially — no change to the existing snapshot/push federation model, so each store's file→DB move stays invisible to peers with no schema-version bump. Five implementation slices are tracked as #1014–#1018.- **Catalog user-defined types now live in PostgreSQL** — the user-defined ingredient types you create in Settings → Catalog (the registry that defines what fields a custom catalog type has) moved out of the `data/settings.json` blob into a dedicated `catalog_user_types` table, one row per type, so type definitions version and federate alongside the catalog data they govern instead of riding the unrelated settings file. Existing installs are migrated automatically and losslessly on first boot — the legacy `catalogUserTypes` slice is renamed aside (`catalogUserTypes_imported`) as a one-release recovery source. Nothing changes in how you create, edit, delete, or sync types: the `/api/catalog/types` UI and the cross-machine federation wire format are unchanged (no schema-version bump — the sync payload is storage-independent), so a machine on this version syncs types cleanly with a peer still on the old one. This is the Phase 4 lead-in of the Postgres-first plan (#1001), unblocking typed catalog references. Types still persist to the settings slice under the `MEMORY_BACKEND=file` dev/test escape hatch.diff --git a/client/src/pages/SongEditor.jsx b/client/src/pages/SongEditor.jsxindex 7a95b7f6e6..a7adeebac0 100644--- a/client/src/pages/SongEditor.jsx+++ b/client/src/pages/SongEditor.jsx@@ -729,7 +729,9 @@ function ReadView({ song, setField, onRefreshTemplate, refreshing, partnerSongs<RoundStack songs={[song, ...partnerSongs]} />)}- {/* Sheet music — the rendered staff, full-width so a row of bars fits. */}+ {/* Sheet music — the rendered staff, full-width so a row of bars fits.+ Kept at the top with the metronome + recorder so the practice tools+ (read the chart, set the tempo, record against it) lead the view. */}{!showingStack && hasScore && (<section className="space-y-2"><h2 className="text-sm font-semibold text-white">Sheet music</h2>@@ -739,6 +741,17 @@ function ReadView({ song, setField, onRefreshTemplate, refreshing, partnerSongs</section>)}+ {/* Vocal takes — metronome + recording/playback, front-and-centre with the+ sheet music. Recording stays available in read mode (it mutates the+ draft; the header Save persists it). */}+ <SongRecordings+ recordings={song.recordings || []}+ layers={song.layers || []}+ tempo={song.tempo ?? null}+ score={song.score}+ onChange={(recordings) => setField('recordings', recordings)}+ />+{!showingStack && (<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">{/* Lyrics — the main reading surface, given the most width. */}@@ -809,15 +822,6 @@ function ReadView({ song, setField, onRefreshTemplate, refreshing, partnerSongs</div></section>)}-- {/* Vocal takes — recording/playback stays available in read mode. */}- <SongRecordings- recordings={song.recordings || []}- layers={song.layers || []}- tempo={song.tempo ?? null}- score={song.score}- onChange={(recordings) => setField('recordings', recordings)}- /></div>);}