feat(music): song detail dialog with full prompt, lyrics, and settings
Closes the detail-dialog row of the chat#1992 PR matrix.
Clicking a song in Your music opens its full record.
What it shows
| Prompt | In full. The card truncates it to one line, and seeing the whole of it is the reason this dialog exists. Copy button. |
| Lyrics | Every line, wrapped and scrollable within its own block so long lyrics do not push the settings off screen. Copy button. |
| Settings | Model, status, duration, seed. |
| Failure reason | Verbatim, for a failed generation. |
Why four settings and not seven
The row asked for "full settings from the API response". Checking fal before building it, most of them do not survive the round trip: its result payload is { audio, seed, duration }, its status endpoint returns only queue metadata, and /input and /request both 405.
num_inference_steps and guidance_scale are consumed at submit and never echoed anywhere, so they are not recoverable. Rather than mirror them into columns of our own, the dialog reports the settings that genuinely exist. seed comes from recoupable/api#850, which reads it live from fal.
Interaction
The card is clickable, but the player and the download sit inside it, so their clicks stop at the controls row. Without that, pressing play or saving a song would also pop the dialog open. Both cases are covered by tests.
Keyboard users get a real <button> on the title rather than a role="button" on the card, which would have meant nesting the player and the download link inside a button.
The dialog opens populated from the summary the card already holds, so it does not show an empty shell while the seed is fetched. The detail read is enabled only while the dialog is open: it costs a fal round trip on the API side, and firing one per song on gallery load would be wasteful.
Tests
18 new assertions, TDD (RED confirmed before implementing). 42/42 green across components/MusicPage and lib/music; tsc --noEmit and eslint clean.
Prompt and lyrics assertions compare against full textContent, so they fail if the dialog ever reuses the card's truncate treatment or slices the string.
Also fixes a genuine a11y gap surfaced while testing: Radix was warning about a DialogContent with no description, so the generation date now fills that role.
Depends on
recoupable/api#850 for the seed field. Until it merges, seed reads Not available rather than breaking; the dialog treats a missing seed as a normal state.
🤖 Generated with Claude Code
https://claude.ai/code/session_017fSvwazBitPfsTQvVqpi8q
Summary by cubic
Adds a song detail dialog showing the full prompt, full lyrics, and run settings, and standardizes copy-to-clipboard with a shared CopyButton. Previously cards truncated text with no detail view; now clicking a song opens the dialog, and player/download clicks do not.
- Prompt and Lyrics render in full with per-block copy buttons; the dialog is the only scroll context (removed inner lyrics scroller).
- Settings show Model, Status, Duration, and Seed; omit
num_inference_stepsandguidance_scalebecause the provider never returns them. - Seed loads on demand via
useMusicGeneration(built on@tanstack/react-queryand@privy-io/react-auth) calling GET /api/music/:id; shows Loading until settled, then a value or Not available; depends onrecoupable/api#850but degrades gracefully. - Accessibility/interaction: the title is a real button for keyboard access; the card opens the dialog on click; the player and Download stop propagation.
- Refactor: extract a shared
CopyButtonand use it in the dialog,app/access, and the API key modal; placeCopyButtonin its own folder with an index so imports remain@/components/CopyButton.
Summary by CodeRabbit
- New Features
- Added detailed music-generation views showing status, prompt, lyrics, settings, creation time, and failure details.
- Added copy controls for prompts and lyrics with accessible labels and success feedback.
- Music generation cards can now be opened via click or keyboard to view details.
- Added display of duration and seed values, including unavailable-state messaging.
- Bug Fixes
- Improved download behavior when audio is unavailable.