Skip to content

ALI-2358: The player's controls, music view and screen-reader support - #8

Merged
michaelaguiar merged 28 commits into
mainfrom
ali-2358-player-ui
Dec 3, 2026
Merged

michaelaguiar merged 28 commits into
mainfrom
ali-2358-player-ui

Conversation

@michaelaguiar

@michaelaguiar michaelaguiar commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Part of ALI-2358: Alias View plays video and music. Stacked: #6 (tokens) and #7 (playback) are merged into main; this ← #9 (MPRIS).

This PR builds the player UI from the design canvas (the Player rows and the "Player · Keys, screen reader, questions" board), following Mike's decisions of 2026-12-02.

What changes

The control bar sits on an overlay subsurface above the video: premultiplied ARGB, clear where nothing is drawn, and unmapped while the bar is hidden, so a playing video is the only thing over the window. The bar, toasts and the key list are drawn there with the same Canvas and ui code, in opaque copies of the theme colours. canvas::blend now carries the alpha byte; the alpha is ignored on the window's own XRGB frame.

  • The bar is opaque panel, controls-height 64 px tall. It holds Previous, Play, Next, the time ("1:23" in foreground, " / 4:56" in muted), Position, Mute, Volume (volume-width) and Full screen (videos only).
  • Every target is 44 px, with controls-gap between buttons and controls-group-gap before Mute and Full screen.
  • Icons are control-icon 20 px, in foreground.
  • Hover fills a button with border. The focus ring is the grid's: focus-ring in accent, ring-gap outside the control, rounded.
  • Sliders: the part still to come is seek-track 2 px in muted, the played or set part is seek-played 4 px in accent, and the thumb is seek-thumb 14 px in foreground.

Hiding. The bar hides controls-hide (2 s) after the last pointer move or key press while a video plays, in a window and in full screen. It stays while the video is paused, ended or opening, for music, and while the keyboard focus or a slider drag is in it. When a file can't play, only its reason shows, as on the canvas.

The mouse pointer hides with the bar while a video plays, and comes back on any pointer motion, or with anything else that brings the bar back (a key, a pause, the video ending), in the shape it would have. It's hidden with wl_pointer.set_cursor and no surface at the last enter's serial, and stays hidden if it enters the window again until the bar returns. It only hides where cursor-shape-v1 is offered, since without it the shape couldn't be set again. Music, a paused or ended video, and keyboard focus or a drag in the bar never hide it. Keyboard focus and what the screen reader hears don't change.

Keys are the canvas's list:

  • Space and k;
  • Left and Right seek (seek-step); Up and Down change the volume (volume-step);
  • m; f and double-click (double-click) for full screen;
  • n, p, Page Up and Page Down;
  • Home; t;
  • Tab and Shift+Tab move through the bar, and focus leaves it past either end so it can hide again;
  • Enter or Space presses a button, and the arrows move a focused slider;
  • the media keys work while the window has the keyboard;
  • ? shows the player's key list.

Pictures keep Left and Right for changing file. i and zoom do nothing on a video or song.

The pointer. Clicking a button presses it; clicking or dragging a slider seeks or sets the volume. A click on a hidden bar only shows it.

End of a video: it stops on its last frame, Play becomes the Replay icon, and Space plays it again from the start. It never moves on by itself.

Music:

  • The cover art is drawn by the helper into a box of at most cover-art (320 px), smaller in a small window. The overlay rounds its corners in base.
  • With no cover art, a panel square shows a cover-icon (96 px) note in muted.
  • Under it, cover-gap below, the title in foreground and "artist · album" in muted. The text comes from the helper's cleaned meta tags (alias-playback#3), or the file name when there are none.
  • A song plays on to the next song in the folder and stops after the last.

Screen reader (AccessKit):

  • The video is a Video node, and a song's art is "Cover art of Night Drive" or "No cover art".
  • The controls group lists, in Tab order:
    • "Previous: beach.mkv" and "Next: sunset.webm" (buttons);
    • Play (a toggle button; "Play again from the start" once ended);
    • Position (a slider, "1:23 of 4:56", step 5);
    • Mute (a toggle);
    • Volume (a slider, "80%" or "Muted, 80% when unmuted");
    • Full screen (a toggle).
  • Click, Focus, Increment, Decrement and SetValue work on them.
  • Announced politely:
    • "Opening clip.mp4", then "Playing clip.mp4, 4:56";
    • "Paused at 1:23" and "Playing";
    • a seek by key, once the keys stop (seek-announce);
    • "Ended at 4:56, on the last frame. Space plays it again.";
    • "Volume 85%" and "Muted";
    • failures, as on screen;
    • t says the position.
  • Nothing is announced by itself while a video plays.

Wording. Toasts say "file" rather than "picture" once the list has videos or songs.

Tokens

Mike approved the player tokens on 2026-12-02: #6's, and time-pad 12px, controls-group-gap 8px, cover-icon 96px, seek-announce 500ms and double-click 400ms. Their usage notes no longer say "Proposed", and the player clauses on border, muted and accent read as plain fact. src/tokens.rs is regenerated, and design/build --check passes.

Contrast (WCAG 2.2 formula, design/build --check)

Pair What aliasos light dark Min
foreground on panel icons, the time, the thumb 10.64 12.99 10.08 4.5
muted on panel " / 4:56" 5.39 4.60 5.20 4.5
muted on panel the 2 px track 5.39 4.60 5.20 3
accent on panel the played part, the focus ring 4.70 3.76 4.96 3
foreground on border an icon under the pointer 6.49 9.05 6.12 3
foreground on base a song's title, the opening and failure lines 12.83 15.14 12.16 4.5
muted on base "artist · album" 6.50 5.37 6.27 4.5

Every pair passes in every theme aliasOS ships, as well as the three shown. There are no misses.

Licence

The icons are Lucide's paths, as on the canvas, rendered with resvg into coverage masks (src/player/icons.rs). Only the nine used are included, and the ISC notice is in LICENSE.

Checks

  • cargo clippy --all-targets -D warnings is clean, and all tests pass (127 unit tests, 6 CLI tests). New tests cover:
    • the bar at the canvas's 1296×864 size;
    • every target at least 44 px with no overlaps, at 560 px and at ×2;
    • Tab order;
    • slider maths;
    • played thicker than the rest;
    • the cover's size in big and small windows, and its rounded corners;
    • the icons;
    • when the bar may hide;
    • when the pointer hides with it (only while a video plays with the bar hidden, back on motion; never for music, paused, ended or with focus in the bar);
    • the AccessKit roles, values and focus;
    • premultiplied blending.
  • Visual, in a private headless weston (desktop, NVIDIA): playing with the bar; the bar hidden after 2 s; ended with the replay icon; opening; a song with and without cover art. The focus ring, hover and muted states were rendered offscreen and compared with the canvas.
  • Not checked visually: the pointer hiding. Headless weston offers no seat and no cursor-shape-v1, so the unit tests cover the state, and the Wayland requests are unchecked until a live run.
  • Not yet run: a screen-reader probe over a private AT-SPI bus, and a live run on Hyprland. Both need Mike's OK, and the live run needs his hands-on check before this leaves draft.

Mike's decisions (2026-12-02)

  • The pointer hides with the bar. While a video plays, the mouse pointer hides together with the control bar and comes back on any pointer motion, the same events that bring the bar back. (This was the open question here: mpv hides its pointer with its controls, and the canvas didn't say.)
  • The player tokens are approved, as listed under Tokens.

New tokens for the player design on the Alias View canvas, for Mike to
review before any player code is written:
- spacing: controls-gap, cover-gap;
- sizes: controls-height, control-icon, seek-track, seek-played, seek-thumb,
  volume-width, cover-art;
- motion: controls-hide, seek-step;
- scale: volume-step.

The colours stay the seven theme roles. New contrast pairs: an icon on a
hovered button (foreground on border, 3:1), the music view's artist line
(muted on base, 4.5:1) and the seek bar's unplayed part (muted on panel,
3:1). They pass in every shipped theme and the built-in two.
- A video or song in the list opens in alias-playback's GPU helper: libmpv in a
  bubblewrap jail, drawing on the card the compositor uses (from linux-dmabuf feedback)
  and handing its frames over as dmabufs. They show in a subsurface above the window, so
  they never pass through this process. Sound goes through the session's PulseAudio
  socket, bound into the jail read-only.
- The folder list takes videos and songs, so n, p, Page Up and Page Down move between
  them and pictures.
- Space plays and pauses (after the end, plays from the start), Left and Right seek 5 s
  (seek-step), f toggles full screen and Escape leaves it.
- While a file opens, the window says so; a file that can't play says why.
- alias-playback is a git dependency on the branch of its PR #3 until #2 and #3 merge.
- The control bar from the design canvas, on an overlay subsurface above the video:
  Previous, Play (pause and replay icons), Next, the time, Position, Mute, Volume and
  Full screen, every target 44 px, with the focus ring and a border-coloured hover fill.
  The played part of a slider is thicker than the rest.
- It hides 2 s after the last pointer move or key while a video plays, and stays while
  paused, ended, opening, for music, and while the keyboard focus is in it.
- Keys from the canvas: Space and k, Left and Right seek, Up and Down volume, m, f and
  double-click, Home, t, Tab through the bar, and the media keys.
- The music view: cover art at up to 320 px with rounded corners, or a panel with a note,
  and the title with "artist · album" under it. A song plays on to the next song in the
  folder and stops after the last.
- AccessKit: named buttons, toggle buttons and sliders with values, and polite
  announcements for opening, play and pause, the end, failures, volume and seeks.
- Tokens: time-pad, controls-group-gap, cover-icon, seek-announce and double-click,
  proposed with #6's. Lucide's ISC notice for the icons is in LICENSE.
…IFOs, full screen

- A buffer the helper sends is checked before it reaches the compositor: its format and
  modifier must be one the compositor listed (dmabuf feedback's table, or v3's events) and
  its planes must fit in the dmabuf. A bad one was a protocol error that closed the window;
  now the file can't play and says why.
- A buffer replaced while on screen is destroyed with the video layer if it's never let go.
- A buffer the compositor lets go while still on screen goes back to the helper once the
  next frame replaces it; before, the slot was lost, and after three the video froze.
- The frame on screen moves to the middle of the window when it changes size, even with
  no new frame coming (paused, ended, a song's cover).
- A helper that dies mid-play takes its last frame with it, so the reason shows.
- Session::failure ends the helper before waiting for it: the socket can fail with the
  helper still running, and the wait froze the window.
- A path that isn't a regular file (a FIFO) is refused before it's opened, which waited
  for a writer.
- Full screen carries from one video to the next, and ends for a song or a picture.
- Left and Right change file when the file can't play, as for pictures.
…ay, Ctrl+C

Merges ali-2358-player-video (its review round: buffer checks, re-centring, failures, FIFOs,
full screen). Conflicts resolved to keep both: the player's keys stay in media_key, which
now lets Left and Right change file when the file can't play.

Review fixes for this PR:
- The keyboard focus in the bar stays on the same control from file to file (Next
  pressed again goes on); close_media had reset it before it was read.
- Announcements are said once: each goes in one of two alternating status nodes and is
  gone from the next tree, so the same words twice (t) are said again, and a stale one
  is never read back when a toast ends.
- A position or volume report redraws only the bar on the overlay, not all of it.
- Ctrl+C on a video or song offers the file only; it offered a PNG the picture
  decoders would have tried to make from the media file.
- The music view's fallback line height comes from the type tokens.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 1 (fresh-context reviewer, code-review high), against ali-2358-player-video. Fixes are in 6c90566. That commit also merges #7's review fixes; the conflicts and this PR's fixes were resolved together.

Fixed:

  1. P2: keyboard focus in the bar was lost on every file change, because close_media reset it before it was read. Focus now stays on the same control, so pressing Next again goes on. Full screen is dropped when the next file is a song.
  2. P2: every file change left full screen. Fixed in ALI-2358: Videos and songs play, in the jailed GPU helper #7 and merged: full screen carries from video to video, and ends for a song or a picture.
  3. P2: a helper that died left a frozen frame over the failure message. Fixed in ALI-2358: Videos and songs play, in the jailed GPU helper #7, where the code is: the video goes, so the reason shows, with no bar, as on the canvas.
  4. P2: announcements were unreliable. They're now said once each: an announcement goes in one of two alternating polite status nodes and is gone from the next tree. So t twice is said twice, and a stale announcement is never read back when a toast ends. Covered by a new test.
  5. P3: a one-second position report redrew the whole overlay. It now redraws only the bar. The whole overlay is redrawn only when the phase, the art or the tags change.
  6. P3: Ctrl+C on a video or song offered image/png, which would have run the picture decoders on the media file in this process. It now offers the file only.
  7. P3 (part of the literals finding): the music view's fallback line height now comes from the type tokens.
  8. Also, from ALI-2358: Videos and songs play, in the jailed GPU helper #7's round: Left and Right change file when the file can't play.

Declined:

  • Optimistic values overwritten by Said::State. At worst the thumb shows the old position for one report (at most 100 ms) after a seek or volume change, because the helper applies a seek before its next report. Holding a separate "pending" value would add state for no visible gain.
  • child.wait() in Drop. The helper is killed first. The wait on failure() is fixed in ALI-2358: Videos and songs play, in the jailed GPU helper #7: it kills before waiting.
  • The other literals: the .max(1) and .max(2) clamps, Lucide's stroke widths, and the 7680×4320 window placeholder. These aren't design values. The clamps keep a 1 px minimum at tiny scales, the stroke widths are part of the icons' source data, and the placeholder only means "as big as the screen share allows" before a video's size is known.

Checks:

  • cargo +1.100 clippy --all-targets -D warnings is clean, and 130 tests pass.

…kept

- A file that can't play (a refused buffer, or the helper saying it can't) ends its
  helper, so no sound plays on under the reason, and frames that still arrive are
  given back, not shown.
- A helper that closed its socket cleanly is waited for, not killed, so its exit code
  says why (libmpv missing, the sandbox not set up). Only after a read error is it ended
  first.
- The format table comment says what the table is now used for.
- Session::send waited for nothing: the socket is non-blocking (for reading), so a full
  one dropped the command, and a lost release left the helper a buffer short for good. A
  full socket is now waited on briefly.
- Video is shown only where the compositor has viewporter, which places a frame at any
  window scale; without it the frame would be drawn at the wrong size.
… player keys in --help

- Opening the grid closes the player; back from it, the same video or song picks up at
  the position it had, playing or paused as it was, instead of from the start.
- The hover fill keeps the icon at 3:1 in any theme: a theme whose border is too close to
  its text gets a fill moved toward the panel until it passes (with a test).
- The key-list fit test covers the player's list too, at 100%, 125% and 200%.
- --help lists the player's keys, and the usage and folder messages say videos and songs.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 2 (fresh-context reviewer, code-review high), on 6c90566. Fixes are in this push and in #7's 5648de2 and its send and viewporter fix, merged in.

The reviewer confirmed all eight round-1 fixes hold: focus carried across files, full screen, the reason shown on a helper's death, announcements said once (t twice is re-announced and nothing stale is re-read), bar-only redraws, Ctrl+C on media, the token fallback, and Left and Right on a failed file.

Fixed:

  1. P2: a refused buffer left the helper playing sound under "Can't play". Fixed in ALI-2358: Videos and songs play, in the jailed GPU helper #7 (5648de2) and merged: the session ends and late frames are given back.
  2. P3: opening the grid during a video restarted it from 0:00 when the grid closed. It now picks up at the same position, playing or paused as it was. This was checked by reading the code only; headless weston can't send g.
  3. P3: list_folder's comment and the "no pictures in" message were stale. They now say pictures, videos and songs, and so does the usage text.
  4. From the skill's list:

Declined: Said::State overwriting the optimistic value once (as before). Session::failure killing before the wait is already changed in #7: a cleanly closed helper is now waited for, not killed.

Checks: clippy (1.100) is clean, and 131 tests pass.

…reset

- alias-playback e11d5f4: #2's requests and reads that never wait, and #3's tags read
  with them (a song's cover played 12 of 12 times in the private weston, tags each time).
- A helper whose socket ends in a reset rather than a clean close (it exited with
  commands unread) gets 100 ms to finish before it's ended, so its exit code still says
  why it stopped.
…me stays paused

- The place kept for the file the grid closed was dropped only when another video or
  song opened, so after closing the grid onto a picture, the file could open much later
  at the old place. It now lasts only until the grid closes: onto that file it's used,
  onto any other it's dropped.
- A file paused before the grid is asked to pause as it opens, so it no longer plays
  briefly from the start before the seek.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 3 (narrow: b2f1106). The reviewer confirmed:

  • the hover fill holds 3:1 and keeps the overlay's alpha;
  • the key-list fit test covers the player's list;
  • --help and the messages are updated, with no tests depending on the old strings.

Fixed in b5c527b:

  1. P2: the grid's kept place outlived the grid. After closing the grid onto a picture, the video could later reopen at its old place. The place now lasts only until the grid closes: onto that file it's used, and onto any other it's dropped.
  2. P3: a file paused before the grid played briefly from 0:00 before the seek. It's now asked to pause as it opens.

These two fixes get one more narrow review, since 1 was a P2.

With no list (the table couldn't be read), any modifier was taken; now nothing is, so a
buffer from the helper is never one the compositor hasn't said it takes.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 4 (final, narrow: b5c527b). No findings.

The reviewer confirmed:

  • the grid's kept place is dropped when the grid closes onto any other file, and used when it closes onto that file;
  • a paused resume is asked to pause right after Volume, Mute and Play, in that order on the same session.

Since then: #7's pin and validation changes are merged in (alias-playback a314208; a buffer's modifier must be one the compositor listed for its format).

Review is done for this PR. It stays a draft until Mike has checked it hands-on.

@michaelaguiar
michaelaguiar marked this pull request as ready for review December 2, 2026 22:43
Base automatically changed from ali-2358-player-video to main December 2, 2026 22:44
main's tree is the same as ali-2358-player-video's c4eeb7d, which this branch
already merged, so the branch's side is kept as it is.
Mike approved the player's tokens on 2026-12-02 (the ones from #6, and
time-pad, controls-group-gap, cover-icon, seek-announce and double-click
added after it). Their usage notes, the player's contrast pairs, and the
player clauses on border, muted and accent now read as plain fact.
src/tokens.rs regenerated with design/build.
Mike's decision of 2026-12-02: once the bar hides by itself over a playing
video, the pointer hides with it, and whatever brings the bar back (any
pointer motion, a key, a pause) brings the pointer back with the shape it
would have. Music, a paused or ended video, and keyboard focus in the bar
never hide it, as they never hide the bar.

The pointer is hidden with wl_pointer.set_cursor and no surface, at the
serial of the last enter, and kept hidden when it enters the window again.
Only where cursor-shape-v1 is offered: without it the shape can't be set
again, so the pointer is never hidden there.
The pointer comes back with the bar on a key, a click or a pause as well as on
pointer motion, and hides only where cursor-shape-v1 is offered. Review round
5 on #8.
@michaelaguiar

Copy link
Copy Markdown
Member Author

Review round 5 (fresh-context reviewer), on the commits since round 4:

The code-review skill ran against a stale local ref that lacked these commits, so the reviewer discarded its output and reviewed the worktree by hand.

Fixed in 2fec5ed (P3, docs):

  1. The README said the pointer comes back "on any pointer motion". Because it is tied to the bar, it also comes back on a key, a click or a pause. The README now says so.
  2. The README didn't say the pointer hides only where the compositor offers cursor-shape-v1. Without that protocol, the shape couldn't be set again. The README now says so.

Not taken up this round: the stale-ref run also listed five notes on earlier commits that the reviewer didn't check against this head:

  • key repeat on toggle keys;
  • the seek slider at minimum width;
  • helper State overwriting local state (declined in round 2);
  • resume before the duration is known;
  • the bar hiding while the pointer rests on it.

Earlier rounds covered that code, and this round's scope was the new commits. "The bar hides while the pointer rests on it" is the approved behaviour: the bar hides 2 s after the last motion.

The reviewer confirmed these hold:

  • Hiding and restoring the pointer:
    • Hiding sends wl_pointer.set_cursor(serial, None) at the last enter's serial.
    • Showing it again sets the shape cursor_now holds, which is kept current while the pointer is hidden.
    • On re-entering the window, the pointer is hidden again until the bar returns.
  • Seat changes: losing or re-adding the seat's pointer leaves nothing stuck.
  • Timing: the loop wakes at hide_at, and the request is flushed in the same turn.
  • When it never hides: for music; for a paused, ended, opening or failed video; with keyboard focus in the bar; in the grid; and with no media open.
  • Accessibility: keyboard focus and the screen-reader tree are untouched.
  • Tokens: design/build --check passes, and no "Proposed" text is left.

Checks: cargo +1.100 clippy --all-targets -D warnings is clean, and all 127 unit tests and 6 CLI tests pass. The two new pointer tests fail when hides_pointer never hides. CI is green on bf75c8e. The pointer hiding has not been checked visually: headless weston offers no seat and no cursor-shape-v1.

This review is clean. #9 has the merge as of 00a3ae4.

The jailed GPU helper's branch (ali-2358-gpu-media) merged as fef4a47, with the same code as
the 4a05f2c this was pinned to.
@michaelaguiar

Copy link
Copy Markdown
Member Author

caa95f4 points the alias-playback dependency at main (fef4a47), since alias-playback #2 and #3 are merged. fef4a47 has the same code as the 4a05f2c this was pinned to. make check (127 unit and 6 CLI tests) and clippy 1.100 pass. #9 has this merged in (78335bc).

@michaelaguiar
michaelaguiar merged commit a9ce309 into main Dec 3, 2026
2 checks passed
michaelaguiar added a commit that referenced this pull request Dec 3, 2026
…work (#9)

* ALI-2358: Proposed design tokens for the video and music player

New tokens for the player design on the Alias View canvas, for Mike to
review before any player code is written:
- spacing: controls-gap, cover-gap;
- sizes: controls-height, control-icon, seek-track, seek-played, seek-thumb,
  volume-width, cover-art;
- motion: controls-hide, seek-step;
- scale: volume-step.

The colours stay the seven theme roles. New contrast pairs: an icon on a
hovered button (foreground on border, 3:1), the music view's artist line
(muted on base, 4.5:1) and the seek bar's unplayed part (muted on panel,
3:1). They pass in every shipped theme and the built-in two.

* ALI-2358: Videos and songs play, in the jailed GPU helper

- A video or song in the list opens in alias-playback's GPU helper: libmpv in a
  bubblewrap jail, drawing on the card the compositor uses (from linux-dmabuf feedback)
  and handing its frames over as dmabufs. They show in a subsurface above the window, so
  they never pass through this process. Sound goes through the session's PulseAudio
  socket, bound into the jail read-only.
- The folder list takes videos and songs, so n, p, Page Up and Page Down move between
  them and pictures.
- Space plays and pauses (after the end, plays from the start), Left and Right seek 5 s
  (seek-step), f toggles full screen and Escape leaves it.
- While a file opens, the window says so; a file that can't play says why.
- alias-playback is a git dependency on the branch of its PR #3 until #2 and #3 merge.

* ALI-2358: The player's controls, music view and screen-reader support

- The control bar from the design canvas, on an overlay subsurface above the video:
  Previous, Play (pause and replay icons), Next, the time, Position, Mute, Volume and
  Full screen, every target 44 px, with the focus ring and a border-coloured hover fill.
  The played part of a slider is thicker than the rest.
- It hides 2 s after the last pointer move or key while a video plays, and stays while
  paused, ended, opening, for music, and while the keyboard focus is in it.
- Keys from the canvas: Space and k, Left and Right seek, Up and Down volume, m, f and
  double-click, Home, t, Tab through the bar, and the media keys.
- The music view: cover art at up to 320 px with rounded corners, or a panel with a note,
  and the title with "artist · album" under it. A song plays on to the next song in the
  folder and stops after the last.
- AccessKit: named buttons, toggle buttons and sliders with values, and polite
  announcements for opening, play and pause, the end, failures, volume and seeks.
- Tokens: time-pad, controls-group-gap, cover-icon, seek-announce and double-click,
  proposed with #6's. Lucide's ISC notice for the icons is in LICENSE.

* ALI-2358: MPRIS, so media controllers and playerctl work (work in progress)

* alias-playback: follow #3 to 6afd318 (#2's warm start, Intel and review fixes)

* Review fixes: buffers the helper sends, frames on resize, failures, FIFOs, full screen

- A buffer the helper sends is checked before it reaches the compositor: its format and
  modifier must be one the compositor listed (dmabuf feedback's table, or v3's events) and
  its planes must fit in the dmabuf. A bad one was a protocol error that closed the window;
  now the file can't play and says why.
- A buffer replaced while on screen is destroyed with the video layer if it's never let go.
- A buffer the compositor lets go while still on screen goes back to the helper once the
  next frame replaces it; before, the slot was lost, and after three the video froze.
- The frame on screen moves to the middle of the window when it changes size, even with
  no new frame coming (paused, ended, a song's cover).
- A helper that dies mid-play takes its last frame with it, so the reason shows.
- Session::failure ends the helper before waiting for it: the socket can fail with the
  helper still running, and the wait froze the window.
- A path that isn't a regular file (a FIFO) is refused before it's opened, which waited
  for a writer.
- Full screen carries from one video to the next, and ends for a song or a picture.
- Left and Right change file when the file can't play, as for pictures.

* alias-playback: follow #3 to 74c8c87 (cover art always drawn, warm-load fixes)

* Review round 2: a failed file's helper ends; a helper's exit code is kept

- A file that can't play (a refused buffer, or the helper saying it can't) ends its
  helper, so no sound plays on under the reason, and frames that still arrive are
  given back, not shown.
- A helper that closed its socket cleanly is waited for, not killed, so its exit code
  says why (libmpv missing, the sandbox not set up). Only after a read error is it ended
  first.
- The format table comment says what the table is now used for.

* MPRIS review fixes: play and pause while opening, Seeked, signals, the bus off the loop

- Play and Pause do what they say while a file opens (Play no longer toggled it to paused;
  Pause no longer did nothing), and Opening reads as Playing.
- Seeked is sent for each real seek (keys, the slider, Seek, SetPosition, the screen
  reader) with where it went, not guessed from jumps in position.
- Each property is signalled once and only when it changed: Metadata not on a pause, and
  CanSeek once.
- Volume reads 0 while muted, and a Volume set is known at once, so its change signal
  carries the new value.
- Seek past the end goes to the next track; SetPosition is ignored when stopped or past
  the end, as the spec says.
- Next and Previous (and CanGoNext and CanGoPrevious) go to the next video or song, past
  pictures, going round.
- A volume set or seek from a controller is announced as a key's would be.
- The session bus is joined on a thread, so a slow bus never holds up the window; what
  MPRIS says is rebuilt only when it changed, with Position stored on each wake.
- The zbus comment is back above its own line.

* Commands to the helper wait out a full socket; video needs viewporter

- Session::send waited for nothing: the socket is non-blocking (for reading), so a full
  one dropped the command, and a lost release left the helper a buffer short for good. A
  full socket is now waited on briefly.
- Video is shown only where the compositor has viewporter, which places a frame at any
  window scale; without it the frame would be drawn at the wrong size.

* Review round 2: back from the grid where it was; hover contrast held; player keys in --help

- Opening the grid closes the player; back from it, the same video or song picks up at
  the position it had, playing or paused as it was, instead of from the start.
- The hover fill keeps the icon at 3:1 in any theme: a theme whose border is too close to
  its text gets a fill moved toward the panel until it passes (with a test).
- The key-list fit test covers the player's list too, at 100%, 125% and 200%.
- --help lists the player's keys, and the usage and folder messages say videos and songs.

* Follow alias-playback #3 to e11d5f4; a helper's exit code survives a reset

- alias-playback e11d5f4: #2's requests and reads that never wait, and #3's tags read
  with them (a song's cover played 12 of 12 times in the private weston, tags each time).
- A helper whose socket ends in a reset rather than a clean close (it exited with
  commands unread) gets 100 ms to finish before it's ended, so its exit code still says
  why it stopped.

* Review round 3: the grid's kept place can't outlive it; a paused resume stays paused

- The place kept for the file the grid closed was dropped only when another video or
  song opened, so after closing the grid onto a picture, the file could open much later
  at the old place. It now lasts only until the grid closes: onto that file it's used,
  onto any other it's dropped.
- A file paused before the grid is asked to pause as it opens, so it no longer plays
  briefly from the start before the seek.

* MPRIS review round 2: tags as they arrive, Seeked after Position, pause while opening

- What MPRIS says is rebuilt when any tag changes, not only the first: tags arrive one by
  one, and the artist or album could go unsignalled.
- On a seek, Position is stored before Seeked is sent, so a controller reading it then
  gets the new place.
- A pause while a file opens is kept (it stays paused once loaded, and reads Paused),
  and Play or Play/Pause undoes it.
- Seek past the end with no next track goes to the end.
- A Volume set with nothing playing isn't stored.
- Replay from the end sends Seeked to 0.
- The file's URL is made from its bytes, so a name that isn't UTF-8 still names it.
- The next and previous video or song are kept while the list and the place are the
  same, not looked for on every wake.

* MPRIS review round 3: Next opens at once, replay's Seeked, paused resume

- A controller's requests are handled before the player syncs, so Next and Previous
  open the next file on the same turn, not on the next input.
- Replay from the end shows the start at once, so the Position read on its Seeked is 0.
- A file reopened paused after the grid is paused the way a controller's pause is, so it
  reads Paused while it opens and Play/Pause plays it.
- A seek made before the bus joined isn't sent late; a SeekTo while a file opens isn't
  announced, as it can't happen.

* Follow alias-playback #3 to a314208 (#2's late-Loaded fixes; no picture confirmed by the loading file)

* A buffer's modifier must be one the compositor listed for its format

With no list (the table couldn't be read), any modifier was taken; now nothing is, so a
buffer from the helper is never one the compositor hasn't said it takes.

* MPRIS: the player syncs before and after a controller's requests

So requests act on the file that's open (not one a key just left), a Next opens the
next file on this turn, and MPRIS starts on the turn the first video or song opens.

* Follow alias-playback #3 to its merge of 6c0187c (GPU setup freed on failure)

* Player tokens approved: their usage notes drop "Proposed"

Mike approved the player's tokens on 2026-12-02 (the ones from #6, and
time-pad, controls-group-gap, cover-icon, seek-announce and double-click
added after it). Their usage notes, the player's contrast pairs, and the
player clauses on border, muted and accent now read as plain fact.
src/tokens.rs regenerated with design/build.

* Hide the pointer with the control bar while a video plays

Mike's decision of 2026-12-02: once the bar hides by itself over a playing
video, the pointer hides with it, and whatever brings the bar back (any
pointer motion, a key, a pause) brings the pointer back with the shape it
would have. Music, a paused or ended video, and keyboard focus in the bar
never hide it, as they never hide the bar.

The pointer is hidden with wl_pointer.set_cursor and no surface, at the
serial of the last enter, and kept hidden when it enters the window again.
Only where cursor-shape-v1 is offered: without it the shape can't be set
again, so the pointer is never hidden there.

* README: what brings the pointer back, and where it hides

The pointer comes back with the bar on a key, a click or a pause as well as on
pointer motion, and hides only where cursor-shape-v1 is offered. Review round
5 on #8.

* Use alias-playback from main, now that #2 and #3 are merged

The jailed GPU helper's branch (ali-2358-gpu-media) merged as fef4a47, with the same code as
the 4a05f2c this was pinned to.
@michaelaguiar
michaelaguiar deleted the ali-2358-player-ui branch December 3, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant