Adds a third studio app next to Flow and Action. Pick a source playlist
from a thumbnail-grid modal, name the output, choose the upscale and
interpolation factors, and press one button to create the derived
playlist and start it. The new playlist opens in a new tab.
No backend work was needed: createPlaylistSchema already accepts a
prompt, and POST /v1/playlist/{uuid}/run already syncs and enqueues.
Notable details:
- The uprez prompt shape is built in one place (buildUprezPlaylistPrompt)
with a test pinning the exact field names the backend's
isUprezPlaylistPrompt checks, so the two can't drift.
- Create and run are two calls and only the first has a lasting effect,
so a failed run returns runError on an otherwise-successful result
rather than throwing. The user gets a playlist that exists plus a
pointer to "Run uprez" on its page, instead of an error implying
nothing happened. This also fixes the same case in the flow's
save-to-playlist modal, which reported "creating the uprez playlist
failed" for a playlist it had in fact created.
- The factor toggles and the create+run call were inline in
save-to-playlist-modal; both are extracted and shared rather than
copied.
- The picker modal reuses the reference-image modal's shell, extracted
to select-modal.styled so the two stay visually identical.
- Dream counts come from GET /v1/playlist/{uuid} (the list endpoint
carries none). useApiQuery sets keepPreviousData, so the count is
gated on the returned uuid matching the selection; without that,
switching playlists captions the new one with the old one's count.
- Duration reads totalDurationSeconds via secondsToTimeFormat.
totalDurationFormatted is declared on the frontend Playlist type but
the backend never sends it, so reading it type-checked and silently
rendered nothing.
- usePlaylist gained an optional `enabled` arg, defaulting to true;
without it a missing uuid requests /v1/playlist/.
- ModeBadge in session-switcher was hardcoded to "flow" | "action" and
is now typed on StudioMode.
Verified in the browser against staging: picker grid, dream counts
updating across selections, name auto-fill, and no regression in the
My Image Library or Generate Reference Frames modals after the style
extraction. Create & run itself was not exercised (it queues real GPU
jobs). type-check, lint and build clean; 214 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RgLt64MRFehw4sTvcuiZtU
No description provided.