Repository navigation
fix(web): keep the Featured hero paused after pressing Pause - #4923
Conversation
Hovering or focusing the hero and pressing its Pause button shared one paused flag. Pointing at the button flipped it to "Play slideshow", so a click started the slideshow, and leaving the hero cleared a pause the user had chosen. The hover/focus hold and the button's choice are now separate: the button label follows the choice, the timer and progress rail follow both, and reduced motion still starts stopped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 1 minute. View limit details
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
…w-pause-sticks # Conflicts: # web/src/components/HeroBanner.tsx
Problem
Related issue: N/A
Validation tasks: none
Other clients: Apple N/A (the macOS Featured hero already tracks hover and the pause button separately); Android N/A (no slideshow pause control); Roku N/A (no slideshow pause control)
The Pause button on the web Featured hero can't keep the slideshow paused. The hero stops itself while the pointer is over it or focus is inside it, and the Pause button shared that state:
Web users with normal motion settings hit this with a mouse, a keyboard, or touch.
Approach
The hero now keeps the hover/focus hold and the button's choice in separate state. The button label and icon follow the user's choice. The slide timer and the progress rail follow both. As a result:
playRequestedflag.The change is confined to
HeroBanner.tsx. It reuses the existing translation keys, and the API is unchanged.Validation
main(e2e4ab8b), then rerun on this branch (bebfb57a) with the same steps at 1440×900. On main, the button read "Play slideshow" under the pointer, and one click left the slideshow playing. After a pause, the slide advanced within 10 s of the pointer leaving. With the fix, the button reads "Pause slideshow" under the pointer and one click pauses. The hero is still on the same slide 10 s after the pointer and focus leave.pnpm run lint(0 errors),format:check,build,budget:check,make test-web(3094 tests),verify-local-paths,verify-case-collisions,verify-size-ratchet, andverify-bidi. No Go changed. The PR adds no test, because the change is UI state that the repository's testing rules leave to the live check.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/hero-slideshow-pause/
Risks
While hover or focus holds the slideshow, the button now reads "Pause slideshow", because it shows the user's choice rather than the hold. Pressing it records a pause. That matters in two places. On touch screens, tapping inside the hero (a slide arrow, for example) emulates hover and focus, so the hero holds until you tap outside it, as it already did. With the keyboard, focus on the button holds the slideshow. To resume right away from either hold, press Pause then Play, or move out of the hero. Before, one press restarted it, but that same press also made Pause start the slideshow, which is the bug this fixes. The ARIA carousel pattern instead treats keyboard focus as a lasting stop and offers Play. Adopting that would be a separate design change.
The pause still lives in component state, so it resets when the Home page remounts, as before.
Follow-ups
Two hero defects that predate this change turned up in review and are filed separately:
Checklist
Council review
Background review: 1 round, reviewed bebfb57
Visual review: 2 rounds, captures from
bebfb57aand maine2e4ab8bBackground review: Sol's finding (with keyboard focus holding the slideshow, resuming takes two presses) is answered under Risks. Opus found nothing to post.
Visual review: nothing fixed in the code. The round 1 evidence gaps (keyboard, phone, a hover hold starting mid-cycle, reduced motion on first load) were captured for round 2. Answered: every visual finding also shows on main and is outside this change. The slide arrow over the title is covered by a separate fix. Contrast over bright artwork is #4838. The compact button is 28 px, above WCAG 2.5.8's 24 px minimum.
AI Disclosure
high(three finders on the diff; no change needed, two pre-existing defects filed, one trade-off disclosed under Risks), a simplify pass (moved one comment), and no plan round, because the fix is a few lines at the root cause and adds nothing. Council results are in Council review above.🤖 Generated with Claude Code
Note
Fix
HeroBannerso Pause choice persists after hover or focuswantsPlayis derived from the choice and reduced-motion preference, andautoplayingfromwantsPlayand heldwantsPlay, so it still shows Pause when playback is wanted but heldMacroscope summarized 581a6b8.