Files
yuriy.pandClaude Opus 5.5 e2ac2de9f4 feat: Now Playing view like the Apple TV app's
The cover large over a blurred copy of itself, what's playing beside it with the
line being sung, and the transport along the bottom; the queue and lyrics drawer
opens at its right edge. Opens from the player bar's cover, its expand button or
⌘P; closes with the chevron, Esc, ⌘P or Back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 14:39:22 +06:00

498 lines
21 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: Musyx
description: A dark-first desktop player for Yandex Music, built with iced.
colors:
bg: "#1C1A22"
panel: "#23202B"
raised: "#2D2937"
line: "#3A3546"
fg: "#EEEAF3"
muted: "#A39CB0"
accent: "#F0B23E"
accent-ink: "#2A1D04"
like: "#F27286"
ok: "#7FCB9B"
bg-light: "#F3F1F6"
panel-light: "#FFFFFF"
raised-light: "#EAE6F0"
line-light: "#DCD6E4"
fg-light: "#1F1B27"
muted-light: "#686178"
accent-light: "#A86C05"
accent-ink-light: "#FFF7E6"
like-light: "#D2405A"
ok-light: "#2E8A55"
typography:
display:
fontFamily: "Unbounded"
fontSize: "46px"
fontWeight: 600
display-l:
fontFamily: "Unbounded"
fontSize: "40px"
fontWeight: 600
display-m:
fontFamily: "Unbounded"
fontSize: "34px"
fontWeight: 600
display-s:
fontFamily: "Unbounded"
fontSize: "30px"
fontWeight: 600
wordmark:
fontFamily: "Unbounded"
fontSize: "20px"
fontWeight: 600
section:
fontFamily: "Onest"
fontSize: "19px"
fontWeight: 600
body:
fontFamily: "Onest"
fontSize: "14px"
fontWeight: 400
lineHeight: 1.45
body-medium:
fontFamily: "Onest"
fontSize: "14px"
fontWeight: 500
meta:
fontFamily: "Onest"
fontSize: "13px"
fontWeight: 400
small:
fontFamily: "Onest"
fontSize: "12.5px"
fontWeight: 400
rounded:
small-cover: "6px"
control: "8px"
cover: "10px"
card: "14px"
hero: "16px"
pill: "999px"
spacing:
xs: "4px"
s: "8px"
m: "12px"
l: "18px"
xl: "22px"
gutter: "28px"
section: "34px"
components:
button-primary:
backgroundColor: "{colors.accent}"
textColor: "{colors.accent-ink}"
typography: "{typography.body-medium}"
rounded: "{rounded.pill}"
padding: "10px 18px"
button-ghost:
backgroundColor: "transparent"
textColor: "{colors.fg}"
rounded: "{rounded.pill}"
padding: "10px 18px"
button-ghost-hover:
backgroundColor: "{colors.raised}"
chip:
textColor: "{colors.fg}"
rounded: "{rounded.pill}"
padding: "7px 13px"
chip-selected:
backgroundColor: "{colors.accent}"
textColor: "{colors.accent-ink}"
icon-button:
textColor: "{colors.muted}"
rounded: "{rounded.control}"
size: "34px"
icon-button-hover:
backgroundColor: "{colors.raised}"
textColor: "{colors.fg}"
nav-item-active:
backgroundColor: "{colors.raised}"
textColor: "{colors.fg}"
rounded: "{rounded.control}"
search-field:
backgroundColor: "{colors.panel}"
textColor: "{colors.fg}"
rounded: "{rounded.pill}"
padding: "10px 16px"
width: "420px"
track-row:
textColor: "{colors.fg}"
rounded: "{rounded.control}"
height: "52px"
track-row-lit:
backgroundColor: "{colors.raised}"
context-menu:
backgroundColor: "{colors.panel}"
rounded: "{rounded.cover}"
padding: "6px"
width: "280px"
context-menu-item:
textColor: "{colors.fg}"
typography: "{typography.body}"
rounded: "{rounded.control}"
height: "32px"
card:
textColor: "{colors.fg}"
rounded: "{rounded.cover}"
width: "168px"
dialog:
backgroundColor: "{colors.panel}"
rounded: "{rounded.card}"
padding: "18px"
width: "380px"
toast:
backgroundColor: "{colors.fg}"
textColor: "{colors.bg}"
rounded: "{rounded.pill}"
padding: "10px 18px"
key-cap:
backgroundColor: "{colors.raised}"
textColor: "{colors.fg}"
typography: "{typography.meta}"
rounded: "{rounded.small-cover}"
padding: "2px 8px"
---
# Design System: Musyx
The source of truth is the build. The tokens above map 1:1 to
[`crates/musyx/src/ui/theme.rs`](crates/musyx/src/ui/theme.rs), so change both together. Keys
without a suffix are the dark theme. The `-light` keys are the same roles in the light theme.
[`design/mockup.html`](design/mockup.html) is the original exploration (see [History](#history)).
It is no longer the authority.
## Overview
**Creative North Star: "The Late-Night Tape Deck"**
Musyx looks like a piece of dark hardware playing in a dim room late at night. The casing is
aubergine graphite. The controls are quiet and almost the same colour as the casing. Exactly
one thing glows: an amber lamp that marks what is playing, what you chose and what you can
press next. People leave the window open for hours, so nothing moves or competes for attention
unless the music asks for it.
The layout is the familiar desktop player shell: sidebar, content, player bar, and an optional
drawer. Its brand shows in the details, not the structure. There is one display face for titles
and one plain face for everything else. Depth comes from three close tonal steps, not from
shadows. Interactions follow desktop rules: right-click menus at the pointer, keyboard shortcuts,
and drag to reorder. The My Wave hero is the one place that animates. Its amber lines drift only
while My Wave is actually playing.
The theme is dark first. The light theme follows the system setting, or the choice in Settings,
and keeps every role.
**Key Characteristics:**
- One amber accent on an aubergine ground. Amber means "this one, now".
- Three tonal surfaces (bg, panel, raised) do the layering. Shadows appear only on things that float.
- Unbounded for titles, Onest for everything else. Icons are Lucide at 18pt.
- Dense, scannable lists with 52pt track rows.
- Desktop-native interaction: context menus, shortcuts, drag reorder, media keys, and a macOS
menu-bar mini player.
## Colors
A near-monochrome violet-grey palette with a single warm amber and two quiet status colours.
### Primary
- **Indicator Amber** (`accent`): the playing track's title, the progress fill, primary buttons,
selected chips, the active nav icon, the active tab underline, the focused search border, the
wordmark dot, the My Wave hero lines, and on Now Playing the play disc and the line being sung.
The Lossless quality badge also turns amber when Yandex
serves FLAC.
- **Amber Ink** (`accent-ink`): text and icons placed on amber.
### Secondary
- **Heart Rose** (`like`): a filled heart, a falling chart position, destructive menu entries
("Remove from this playlist", "Delete…") and the player's error notice line.
- **Signal Green** (`ok`): subscription status and a rising chart position.
### Neutral
- **Aubergine Graphite** (`bg`): the window, the content area and the sidebar.
- **Casing Panel** (`panel`): the player bar, the drawer, cards that need separation, the search
field, dialogs and the context menu.
- **Raised Plate** (`raised`): hover and selected rows, lit track rows, chip hover, the slider
rail and key caps.
- **Seam** (`line`): 1px dividers, outlines on ghost buttons and chips, the menu border and the
scrollbar thumb.
- **Label White** (`fg`): primary text, the play/pause disc, the volume fill and the toast fill.
- **Faded Label** (`muted`): secondary text, idle icons, column headers and placeholders.
Covers with no artwork yet get a placeholder: a diagonal gradient between two hues derived from
the item's id.
### Named Rules
**The One Lit Lamp Rule.** Amber marks state (playing, selected, primary, focused) and nothing
else. Never use it to decorate. If a screen has two amber things, they must be the same "now".
**The Light-Theme Contrast Rule.** In the light theme, amber text on `bg` measures 3.9:1 and
`ok` text measures 3.8:1. Both are below AA for body text. Until the light accent is darkened,
keep amber text in light mode to titles of 14pt medium or larger, and never use it for small
meta text.
## Typography
**Display Font:** Unbounded SemiBold (bundled, OFL)
**Body Font:** Onest Regular / Medium / SemiBold (bundled, OFL)
**Character:** Unbounded's wide geometric letters give titles the look of a label on hardware.
Onest is a neutral grotesque that holds dense lists and covers Cyrillic well.
### Hierarchy
- **Display** (600, 46 / 40 / 34 / 30): the My Wave hero, detail page titles, the sign-in
headline and screen titles ("Collection", "Settings").
- **Wordmark** (600, 20): `musyx` followed by the amber dot.
- **Section** (Onest 600, 19): section headings ("Made for you"), sheet titles, and settings card
titles.
- **Body** (400–500, 14; 1.45 for running text): row titles (medium), menu entries (regular),
buttons (medium/semibold) and paragraphs.
- **Meta** (400, 13): artist lines, album columns, durations and help text.
- **Small** (400, 12.5): column headers, sidebar section labels and the player's times.
### Named Rules
**The Two Faces Rule.** Unbounded appears only at display sizes and in the wordmark. Everything
interactive is Onest.
## Layout
The window is a fixed desktop shell. The minimum size is 960×620 and the default is 1280×800.
- **Shell:** a 232pt sidebar, a 1px seam, then the content column, which holds the top bar and
the scrolling page. An optional 320pt drawer sits at the right edge and narrows the content
while it is open. An 80pt player bar spans the full width at the bottom.
- **Content gutter:** 28pt. Sections are 34pt apart.
- **Spacing steps:** 4 · 8 · 12 · 18 · 22 · 28 · 34 are the named tokens. Tight in-component gaps
use 2, 6, 10 and 14. About 50 one-off values (16, 9, 24 and others) predate the scale and should
move onto it when touched.
- **Lists:** track rows are 52pt tall with 2pt between rows. Cards are 168pt wide and wrap, with
12pt between cards and 14pt between rows.
- **Overlays:** the toast floats 96pt above the bottom edge. Menus are pinned to the pointer or to
their button. Dialogs are centred in the window.
## Elevation & Depth
The resting UI is flat. Depth comes from tonal steps: `bg` → `panel` → `raised`, about one
lightness step apart, with `line` seams where two surfaces meet. Shadows are kept for elements
that float above the content.
### Shadow Vocabulary
- **Primary lift** (0 4px 12px, black 18%): primary pill buttons only, so the amber action sits
slightly proud of the page.
- **Menu float** (0 10px 28px, black 30%): the context menu and its submenu.
- **Toast float** (0 6px 18px, black 30%): the status pill above the player bar.
- **Dialog float** (0 18px 50px, black 35%), over a 45% black backdrop: dialogs only.
- **Stage float** (0 18px 50px, black 35%), no backdrop: the large cover on Now Playing, which
floats over its own blurred copy.
### Named Rules
**The Float-Only Shadow Rule.** If it isn't floating above the content (menu, toast, dialog, the
Now Playing cover) and it isn't a primary button, it has no shadow.
**The No-Dim Rule.** Only dialogs dim the window. Menus, the drawer and toasts never do.
## Shapes
Shapes are soft and functional. Controls are pills or gently rounded squares, and covers have
rounded corners.
- **Pills** (999): primary, ghost and chip buttons, the search field, the toast and the
play/pause disc.
- **Controls** (8): icon buttons, nav items, track rows and menu entries.
- **Covers** (10) and **small covers** (6): album and playlist art at card and row size. Artist
covers are round. The context menu also uses the cover radius.
- **Cards** (14): settings cards, the empty-state card and dialogs. **Hero** (16): the My Wave hero.
- **Key caps** (6): the shortcut list in Settings.
## Components
### Buttons
- **Primary:** an amber pill with amber-ink label, medium or semibold, padded 10×18, with the
primary lift. On hover it mixes 12% toward `fg`. When pressed it mixes 12% toward `bg`. When
disabled it is `raised` with a `muted` label.
- **Ghost:** a transparent pill with a 1px `line` outline and an `fg` label. It fills `raised` on
hover. It pairs with Primary, as in Play + Shuffle.
- **Icon button:** a 34pt square holding an 18pt icon. Idle it is `muted`. On hover the icon turns
`fg` on a `raised` fill. A toggle that is on is tinted `accent`, and a liked heart is `like`.
- **Play disc:** a 40pt `fg` circle with a `bg` glyph. When nothing is queued it becomes a
`raised` circle with a `muted` glyph.
### Chips
- **Style:** pills padded 7×13, with a `line` outline and an `fg` label.
- **State:** a selected chip fills `accent` with an `accent-ink` label, and can't be clicked
again. Chips are used for quality, appearance, language and the My Wave mood, character and
language settings.
### Tabs
- Text only: `muted` labels that turn `fg` on hover or when selected, with a 2pt amber underline
under the selected tab. Collection tabs are Liked tracks, Albums, Artists, Playlists and Clips.
A count appears next to a tab once its list has loaded.
### Cards / Containers
- **Cover cards:** a 168pt cover with a medium title and a muted subtitle. A raised fill shows on
hover. Clicking opens the page. Right-click opens a menu for albums, playlists and artists:
Play, Shuffle, and add to or remove from the collection. Your own playlists get Rename… and
Delete… instead of the collection item. Clips have a heart instead of a menu.
- **Settings cards:** a `panel` fill, 1px `line`, card radius, 24pt padding, and a section title.
### Inputs / Fields
- **Search:** a 420pt pill with a `panel` fill and a 1px `line` border that turns `accent` on
focus. Selected text is highlighted in amber at 35%. Suggestions float in a list under it.
Opening Search, ⌘F or `/` puts the cursor in it with the text selected.
- **Dialog inputs:** use the same style.
### Navigation
- **Sidebar:** sits on `bg`, not `panel`, and is separated from the content by a seam. From top
to bottom: the wordmark, five nav items (Home, My Wave, Search, Collection, Podcasts), Playlists
with a + button, the playlist list, and an account chip with a settings gear. The active item
has a `raised` fill, an `fg` label and an amber icon. Idle items are `muted`.
- **Top bar:** a back chevron, disabled when there is no history, and the search field.
### Player bar
- `panel` fill, 80pt tall, in three zones.
- **Left:** a 52pt cover with the title and artist, then like and dislike buttons. Clicking the
cover or title opens Now Playing; right-clicking it opens the track's menu.
- **Centre:** shuffle, previous, the play disc, next and repeat, above a 4pt seek rail with an
amber fill. The rail's handle appears only on hover or drag. Times sit on either side.
- **Right:** the quality badge, Now Playing (expand), lyrics, queue, and a volume rail with an
`fg` fill.
### Track row
- 52pt tall, built as a button. Columns in order:
- a grip (your own playlists only)
- the index, or an amber `audio-lines` glyph for the playing track (static; it doesn't show
pause)
- a 40pt cover
- title and artist
- album
- the heart
- the duration
- "…"
- **Playing:** the title turns amber.
- **Unavailable:** the title is `muted` and clicking does nothing.
- Clicking plays the row and replaces the queue.
- Right-click, or "…", opens the context menu.
- A row stays lit (`raised`) while its menu is open, and while it is being dragged.
- The heart and "…" are always visible.
- **Dragging (your own playlists):** press the grip and move. The list reorders live to show
where the row will land. Drop to save, or press Esc to cancel. The wheel scrolls during a drag.
The list doesn't auto-scroll near its edges yet.
### Context menu (signature)
- A 280pt `panel` card with a 1px `line` border, cover radius, 6pt padding and the menu float.
There is no backdrop.
- **Placement:** it opens at the pointer on right-click, or hangs under "…" with the right edges
lined up. Near a window edge it flips left or up, and it always stays 8pt inside the window.
- **Entries:** 32pt tall, with an 18pt `muted` icon and a 14pt `fg` label. The entry under the
pointer, or chosen with the arrow keys, gets a `raised` fill. Destructive entries are `like`.
Disabled entries are `muted` and skipped by the arrow keys.
- **Groups:** separated by hairlines.
- **Track menus:** play actions (Play next or Next track, Add to queue, Play similar tracks);
library actions (Liked tracks, Add to playlist ▸, Don't recommend); go-to (album, then up to
three artists by name). Your own playlists add Move to top, Move to bottom, and Remove from
this playlist. In the queue the first group is Play now, Play next and Remove from queue.
- **Card menus:** Play and Shuffle; then the collection item, or Rename… and Delete… for your
own playlists; then go-to artist for albums.
- **Add to playlist ▸:** opens a submenu beside the menu on hover, click or →. The submenu holds
New playlist… and your own playlists, and scrolls after 10 rows.
- **Closing:** every action closes the menu, and a toast confirms what happened. Clicking outside,
scrolling or Esc also closes it. ↑/↓ move, Enter picks, → and ← open and close the submenu.
### Drawer
- 320pt on `panel`, with Queue | Lyrics tabs and a close button.
- **Queue:** shows Now playing, then Next up with a count. It lists up to 100 rows, then
"and N more". Clicking a row jumps to it. Right-click opens the queue version of the track menu.
- **Lyrics:** synced lyrics follow playback.
### Now Playing
- Follows the Apple TV app's Now Playing. It covers the whole window, player bar included, until
closed with the chevron at its top left, Esc, ⌘P or Back. Going to an album or artist from its
menu closes it too.
- **Backdrop:** the cover shrunk to 32px, blurred and stretched over the window, washed with
`bg` from 55% at the top to 92% at the bottom. Until the cover loads, its placeholder gradient
stands in.
- **Stage:** the cover at hero radius with the stage float, as large as the window allows between
160 and 520pt, and beside it the quality badge, the title in display-m (wrapping), the artists in
section `fg`, and the album in `muted`. A playback notice shows in `like`. With synced lyrics, the
line being sung shows under them in section amber.
- **Seek:** a 6pt rail with an amber fill across the stage, the times under its ends.
- **Controls:** shuffle, previous, a 56pt amber play disc (the primary style), next and repeat at
20pt; then the heart, "…", Queue and Lyrics pills (chip style, filled while their panel is open)
and the volume. Below 820pt of stage width the pills lose their labels.
- **Drawer:** opens at the right edge as in the main window, and Esc closes it before Now Playing.
### Dialogs
- 380pt `panel` card with card radius and the dialog float over a dimmed window.
- Used only when you type or confirm: New playlist, Rename playlist, and Delete playlist.
- Cancel is a ghost button. Confirm is primary, or `like` for Delete. Delete's white label on
`like` measures 2.8:1 in the dark theme, which is below AA, and is a known issue.
### Toast
- An `fg` pill with `bg` text, 96pt above the bottom edge. It reports every action from menus,
likes and edits, and clears itself after a few seconds.
### My Wave hero
- A 16pt-radius panel holding a canvas of 14 amber sine lines, the title, a line describing how
the wave is tuned, and Play / Pause / Resume.
- It is the same hero on Home and on My Wave, larger on My Wave.
- The lines drift only while My Wave plays. Otherwise they hold still at reduced energy.
### Keyboard shortcuts
- Listed in Settings → Keyboard shortcuts as label + key caps. The list is capped at 560pt wide so
the caps sit near their labels.
- The shortcuts:
- Space: play/pause
- ⌘←/→: previous/next
- ⇧←/→: seek 10s
- ⌘↑/↓: volume
- ⌘L: like
- ⌘F or `/`: search
- ⌘[ or ⌥←: back
- ⌘P: Now Playing
- Esc: closes a drag, menu, dialog, suggestions, the drawer or Now Playing, in that order
- ⌘1–5: nav sections
- ⌘,: Settings
- ⌘ is Ctrl on Windows and Linux.
- Letter shortcuts follow the key's position on non-Latin layouts.
## Do's and Don'ts
### Do:
- **Do** take every colour from `Tokens` in `theme.rs`, and change DESIGN.md in the same commit.
- **Do** use Lucide 0.460 icons at 18pt, tinted with the colour of the text they sit beside. New
icons go in `assets/icons` with the Lucide license header.
- **Do** put routine actions on an item in its context menu, and confirm them with a toast.
- **Do** give every new action a keyboard path, and add it to the Settings shortcut list.
- **Do** translate every string through `tr`/`trf` with a Russian entry in `i18n/ru.rs`. The test
suite fails otherwise.
- **Do** test new screens in both themes and both languages with the snapshot tool
(`MUSYX_SNAPSHOT_*`, see `snapshot.rs`). Russian labels run about 30% longer.
### Don't:
- **Don't** use amber for decoration, borders or illustrations other than the My Wave hero.
- **Don't** open a dialog for anything that doesn't need typing or a destructive confirmation.
- **Don't** dim the window for menus, the drawer or toasts.
- **Don't** fade icons with `scale_alpha`. iced's SVG tint drops alpha, so a faded icon renders at
full strength. Disabled previous/next already do this. Pre-mix the colour with the surface.
- **Don't** add hardcoded colours outside `theme.rs`. About 19 still exist (sign-in, genre tiles,
dialogs) and should move into tokens when touched.
- **Don't** add shadows to resting surfaces. Depth comes from `bg` → `panel` → `raised`.
## History
`design/mockup.html` (published at https://claude.ai/artifact/2gmswtceJM61fcE2F5uYYM) was the
first approved exploration, and it set the palette, type and shell. The build kept those and
deliberately dropped or replaced these parts of it:
- the hero's Tune button and the separate My Wave copy
- the hover play button on cards
- the display-face, two-column chart ranks
- the Podcasts and Disliked collection tabs (Clips was added)
- the Continue listening shelf for podcasts
- the drag grip with an edit bar (replaced by a grip column and live drag)
- Artist wave
- the hover-only "…"
- the animated equaliser on the playing row
- the live sign-in canvas
Treat the mockup as history. Where it and this file disagree, this file and the build win.