Skip to content

Fix stale menu rows and menu commands lost in the same frame - #103

Merged
seaweeduk merged 1 commit into
masterfrom
fix/menu-updates
Nov 22, 2026
Merged

seaweeduk merged 1 commit into
masterfrom
fix/menu-updates

Conversation

@seaweeduk

Copy link
Copy Markdown
Owner

The menu draws a click's frame before the app has applied the command, so a row the click changes only shows its new value if the next view's change redraws it. Two rows never did. Separately, the menu kept one pending command, and a second one in the same frame replaced it.

  • Anti-shimmer (Video settings > Display): choosing Off, On or Strong, or applying a preset that changes it, left the old level lit. antiShimmer moves from MenuViewQuiet to MenuViewPage, and the Display page redraws when it changes.
  • Media server (Settings > Stash / XBVR): choosing Off left the old server, its address and its fields on the page. Menu::update() now compares what the section shows of the setup (in use, kind, address, key, folders, its toggles, the card) instead of the card alone.
  • Commands the menu sends by itself now go into a queue. main.cpp drains it in order, and the vector keeps its capacity between frames. Before, a sign-in finishing in the same update() as a new server's folder search lost its SetStashServer to the SetStashFolders written after it, so the login was never saved.
  • Folder mappings stay with their server. The menu remembers the server (kind and StashAddress::server) a queued SetStashFolders was found at. StashCommands::restart() drops it when Stash starts for another server, or for none because the address was cleared. A sign-in to the same server keeps it, and so does switching Stash off (the address stays in the setup).
  • A new address for a server kind (SetStashServer to another server, or connecting another server in first-run setup) no longer keeps the last server's saved mappings. The new server's own folders are looked for after its first sync, as before. Retyping the same server and going back to another kind's saved setup keep theirs.
  • Subtitle settings in settings.conf are clamped on read to their sliders' ranges in value_ranges.h: subtitle_size 50 to 200 %, subtitle_height −100 to 100, subtitle_distance_cm 25 to 600. A hand-edited 999 used to stay 999.
  • Held stick seek: opening a photo now cancels the hold and its strip, as opening a video already did, instead of running the hold's release on the photo's next frame.
Probe, the frame after the click Before After
Anti-shimmer On → Strong no redraw, On still lit redraw, Strong lit
Media server Stash → Off no redraw, address still shown redraw, Off chosen

A probe drains the queued commands through StashCommands::handle() and reads settings.conf back. The sign-ins use a password, so the key in the sign-in's result is the one that should be saved, and the probe checks it is. The folder search starts from a server with no mappings and finds one.

Case Commands run Read back
Sign-in to the same server, same frame as the search SetStashServer, SetStashFolders its new key, 1 mapping
Sign-in to another server, same frame SetStashServer the new server and its key, no mappings
Address cleared, then the search's result SetStashServer no address, no mappings
Switched off, then the search's result UseServer, SetStashFolders the same address, off, 1 mapping
New address for the kind, mapping saved before SetStashServer no mappings (same server retyped: 1)
Setup connects another server, then the search's result SetupStash the new server and its key, no mappings

Known and left as is

  • Subtitle values use the existing integer parser before clamping. A hand-edited number outside the range of int can clamp to the wrong end.
  • The menu can compare Stash folder mappings twice in a frame, even off the settings page. Neither comparison allocates.

Important

AI disclosure

Model Variant Role
anthropic/claude-opus-5-5 high Implementation
openai/gpt-6.2-astra high Independent review

Agent harness OpenCode 2.3.2

@seaweeduk seaweeduk added the fix Bug fix (release notes: Fixes) label Nov 22, 2026
@opencode-agent

Copy link
Copy Markdown

LGTM 👍

The menu now redraws when the displayed anti-shimmer level or media-server settings change. Draining commands in order preserves both a same-server sign-in and its folder-search result, while restarting for a different server drops the stale mappings. The subtitle clamps use the sliders’ existing limits, and opening a photo cancels a held seek before its release can act on the new media.

github run

@seaweeduk
seaweeduk force-pushed the refactor/wave-5 branch 2 times, most recently from 53e2f9e to e635c6a Compare November 22, 2026 20:59
@seaweeduk
seaweeduk changed the base branch from refactor/wave-5 to master November 22, 2026 21:00
@seaweeduk
seaweeduk merged commit 5230d20 into master Nov 22, 2026
1 check passed
@seaweeduk
seaweeduk deleted the fix/menu-updates branch November 22, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix (release notes: Fixes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant