Skip to content

Start runs from the operation pill instead of the Dashboard header - #225

Merged
Brandon-Haney merged 2 commits into
StudioNirin:mainfrom
Brandon-Haney:pr/pill-run-button
Oct 6, 2026
Merged

Brandon-Haney merged 2 commits into
StudioNirin:mainfrom
Brandon-Haney:pr/pill-run-button

Conversation

@Brandon-Haney

Copy link
Copy Markdown
Collaborator

Follow-up to #218, as discussed there with @StudioNirin and @DeLo1585: the operation pill becomes the single place to start a run.

The Dashboard header had its own Verbose / Run Now / Dry Run controls that duplicated the pill and had a few issues of their own: they were only disabled when the page loaded, so they went stale during or after a run; Dry Run looked clickable while disabled; and the header Verbose toggle saved to a different setting (plexcache_dashboard_verbose) than the pill's checkbox (verbose_mode), so the two Run Now buttons could start runs with different verbosity.

Change

  • Dashboard header: the Verbose / Run Now / Dry Run controls and their preference script are removed, along with the now-unused stats value in the route.
  • Idle pills: both the "Next run" countdown pill and the no-schedule "Ready" pill get a labelled ▶ Run button, styled as the pill's existing primary button (black on Plex orange in both themes), with a larger target on touch screens. Hovering the button keeps the pill compact so it can be clicked; hovering or clicking the rest of the pill opens it with Verbose, Run Now and Dry Run as before.
  • Keyboard: every clickable pill is focusable. Enter or Space opens it, Escape closes it and returns focus to the pill, and aria-expanded follows the expand state.
  • Verbose: the pill's checkbox is the only setting and the Run button uses it. A saved Dashboard Verbose preference is carried over to it once.

With the header controls gone the pill stays centred on top of the Dashboard down to roughly 1060px when idle, so starting a run no longer pushes the page down at normal widths.

Tests

tests/test_idle_pill_run_button.py: the Run button is on both idle pills and does not trigger the pill's own click handler, the opened pill still has Verbose and Dry Run, every clickable pill is focusable, and the Dashboard header has no run controls. The tests render the templates directly rather than through web.config, which some test modules replace with a mock at import time.

How to test

  1. Open the Dashboard: the header shows only the title, and the pill reads Next run … ▶ Run (or PlexCache ▶ Run with no schedule).
  2. Hover the Run button: the pill stays compact. Click it: a run starts.
  3. Hover the rest of the pill: it opens with Verbose, Run Now and Dry Run. Tick Verbose, close it, then use the compact Run button: the run is verbose.
  4. Tab to the pill and press Enter to open it, Escape to close it.
  5. On a phone: tap Run to start a run, tap elsewhere on the pill to open it.

The Dashboard header duplicated the pill's run controls with its own
Verbose setting (saved under a different key) and a disabled state that
was only evaluated at page load. The header controls are removed, and
both idle pills carry a labelled Run button so starting a run stays one
click. Hovering the button does not open the pill; hovering or clicking
the rest of the pill still opens Verbose, Run Now and Dry Run.

Clickable pills are now keyboard focusable: Enter or Space opens them,
Escape closes them, and aria-expanded follows the expand state. A saved
Dashboard Verbose preference is carried over to the pill's setting once.
The Ready pill's play icon was a hint that runs start from the pill. With a
Run button on the pill it read as a second play action, so the label and
the opened pill's header now use the hard-drive icon from the sidebar.
@Brandon-Haney
Brandon-Haney merged commit 00c6eb5 into StudioNirin:main Oct 6, 2026
2 checks passed
@Brandon-Haney
Brandon-Haney deleted the pr/pill-run-button branch October 6, 2026 21:52
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.

2 participants