Pass per-stem name/description through to the stems payloads#1013
Conversation
feedpak 1.16.0 (spec §5.3) added two OPTIONAL presentational fields to a
stems[] entry: `name` (display label, Readers fall back to the id) and
`description` (free text). The server dropped both while normalizing
manifest stems, so no client could ever display them.
Pass them through at the one place stem descriptors are built
(sloppak.load_song) and let both payload builders — the WS `ready` stems
list and the REST `/api/song/{f}?stems=1` preload list, which are pinned
against each other by test — carry them forward. Omit-when-absent, so a
stem without the fields does not grow null keys; non-string or blank
values are dropped rather than surfaced.
No behaviour change for existing packs or clients: the fields are
additive and every consumer that reads {id,url,default} keeps working
unchanged. The stems plugin / stem mixer display work lands separately.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: topkoa <topkoa@gmail.com>
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR preserves and exposes per-stem display metadata (name/description) from feedpak manifests by keeping those fields through sloppak.load_song normalization and passing them through to both the WebSocket ready payload and the REST /api/song/{f}?stems=1 preload payload, with tests pinning REST and WS outputs to the same shape.
Changes:
- Normalize
stemsentries insloppak.load_songto optionally include non-blank stringname/descriptionwhile omitting absent/invalid values. - Pass
name/descriptionthrough in both WS (ws_highway.py) and REST (routers/song.py) stem payload builders without adding null keys. - Extend stem payload parity tests to cover
name/descriptionpassthrough and omission behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/test_song_info_stems.py |
Updates WS-payload mirror and adds a test validating name/description passthrough/omission while keeping REST↔WS parity. |
lib/sloppak.py |
Retains optional per-stem name/description during manifest stem normalization, dropping invalid/blank values. |
lib/routers/ws_highway.py |
Includes optional name/description fields in the WS ready stems payload when present. |
lib/routers/song.py |
Includes optional name/description fields in the REST stem preload payload when present. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Part 1 of 3 for per-stem display metadata (feedpak 1.16.0, spec §5.3
name/description—got-feedBack/feedpak-spec#59): the server currently drops both fields while normalizing
manifest stems, so no client can display them.
What
sloppak.load_songstem descriptors keepname/descriptionwhen the manifest carriesthem (omit-when-absent — no null keys; non-string/blank values dropped).
readystems list (ws_highway.py) and REST/api/song/{f}?stems=1preload list (song.py). The two stay pinned against each other bytest_song_info_stems.py, whose mirror is updated and which gains a passthrough test.Compatibility
Additive. Every consumer reading
{id, url, default}is unchanged; stems without the fieldsserialize exactly as before.
Follow-ups
stems:state/getState()name(fallback: built-in label → capitalized id) + description tooltipVerification
pytest tests/test_song_info_stems.py— 6 passed (incl. new passthrough test)privilege, tailwind runtime config) — identical failures on the unmodified tree.
🤖 Generated with Claude Code