Skip to content

fix(web): keep the Featured hero held until both hover and focus leave - #5076

Merged
Quick104 merged 6 commits into
Silo-Server:mainfrom
Rhainland:fix/4924-hero-pause-hover-focus
Nov 22, 2026
Merged

Quick104 merged 6 commits into
Silo-Server:mainfrom
Rhainland:fix/4924-hero-pause-hover-focus

Conversation

@Rhainland

@Rhainland Rhainland commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #4924
Related issue: N/A
Validation tasks: none

Other clients: N/A (web-only fix to the web hero's pointer and focus handling; no API or shared behavior changes)

On the web Home page, the Featured hero stops its slideshow while the pointer is over it or keyboard focus is inside it. Both shared one flag, so whichever left first restarted the slideshow while the other still held it. A keyboard user on the Next slide button who brushed the mouse across the hero saw slides change and heard the live region announce new titles. Tabbing out of the hero while the pointer rested on it also restarted the slideshow under the pointer. This change keeps the slideshow held until both have left.

Approach

HeroBanner now tracks the hover hold and the focus hold separately, and the slideshow and progress rail resume only when both are off. The Pause/Play choice from #4923 is unchanged.

Hover comes from pointer events and ignores touch, since a touch has no hover. A tap that moves focus onto a control holds as a focus, and ends when focus leaves.

Two cases keep the old behavior for mouse users. Clicking a slide control with the mouse focuses that button, and a plain focus hold would then keep the slideshow stopped after the pointer leaves. Instead, a primary-button press while the pointer is over the hero turns a focus hold into a hover hold, and the focus that press causes holds as hover. The slideshow stays held under the pointer and resumes when the pointer leaves. A right or middle click leaves a keyboard user's focus hold in place. A press with no pointer over the hero, such as a screen reader's simulated click, leaves the focus hold alone.

A browser can remove a focused control (the hero's Translate button, once pressed) without a blur; Firefox does. While a focus hold is on, the next focus or press outside the hero ends it once focus is no longer inside, and the pointer leaving rechecks where focus is.

The progress rail restarts whenever the slideshow starts running, from committed state, so it stays in step with the fresh 8 s interval.

Known limits:

  • Dragging the Play or More Info link ends the hover hold during the drag in Chromium, which fires a pointer leave when a drag starts. The dragged link is unaffected.
  • A tap on the hero's artwork or text no longer holds the slideshow, since it moves no focus. On main, a tap held it until the next tap elsewhere.

Validation

  • Web unit tests: all pass. The hover tests send pointer and mouse boundary events together, as a browser does. Against main, the two reported-direction tests fail, along with the drag and right-click tests. Each review-fix test fails on the head before its fix.
  • Web lint, format check, production build (typecheck), and bundle budget: pass.
  • verify-local-paths, verify-size-ratchet, verify-bidi, verify-case-collisions: pass.
  • Go checks not run: no Go files changed.
  • Local build on synthetic movies, headless Chromium at 1440px and 390px, focus moved with real Tab presses: before and after results below.
  • Review build at the final head, headless Chromium with real mouse, keyboard and touch input: both reported directions hold; Pause, Play, Tab and a click on Next stay held under the pointer and resume once it leaves; a right-click on the focused control keeps the hold; a mouse click on Next then leaving resumes; a tap on Next followed by Tab out resumes.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-5076/

Surface and build: web Home, Featured hero with four synthetic movies. Before is main at 1bbc479; after is this branch. The same steps ran on the same data at 1440px and 390px. Each list is the live-region title read once a second.

Tab to Next slide, pointer outside; then hover in and out; watch 12 s
  before: Delta x8, Charlie x5  (advanced with focus still on Next)
  after:  Delta x13             (held)

Pointer over the hero, Tab to Next, Tab out of the hero; watch 12 s
  before: Delta x8, Charlie x5  (advanced under the pointer)
  after:  Delta x13             (held)

After the fix, the neighboring behavior still works:
  nothing holding: advances after 8 s
  Pause, then pointer and focus leave: stays paused
  Tab focus, hover in and out, then Tab out: resumes after 8 s
  Pause, Play, Next, then pointer out: runs
  Mouse clicks on Next, then pointer out: runs

Risks

Low. The change is limited to the web hero's hold logic. Mouse-only use behaves as on main.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

Council review

Maintainer review rounds: 4, last reviewed bb619b3

Member Round 1 (f669338) Round 2 (dc2ded8) Round 3 (9be19ef) Round 4 (bb619b3)
Sol (gpt-6.2-sol, xhigh) 7/10 8/10 8/10 8.5/10
Opus (claude-opus-5-5, high) 7/10 7.5/10 7.5/10 8/10
Gemini (gemini-4-neon, xhigh) 6/10 7.5/10 8.5/10 9/10

Fixed: a mouse press restarting the slideshow under the pointer after Play; a drag leaving a press pending; a tap's emulated hover outlasting focus; the rail restart read from stale state; a right or middle click ending a keyboard hold; tests that no longer failed on main; a focus hold left behind by a control removed without a blur, including presses that stop propagation and taps inside the hero. Answered: a click before the pointer has entered the hero (unverified, low), Enter or Space on a mouse-focused control and the rail ignoring visibility (both on main too), and a Tab pressed while a mouse button is held (contrived).

AI Disclosure

  • Harness: Claude Code (via T3 Code); Codex CLI for code review
  • Tool(s): Claude Code, Codex CLI, Playwright (headless Chromium), Vitest
  • Model(s): claude-opus-5-5; gpt-6.2-sol and gemini-4-neon (code review)
  • Involvement: Fully AI-generated, human verified; review fixes by Claude Code (claude-opus-5-5) during maintainer review
  • Adversarial review: dual-code-review by the author before review, then the maintainer review council above.

Note

Hold Featured hero slideshow until both hover and focus leave

  • Splits the single held state in HeroBanner into separate hover and focus holds, tracked via a Holds record and the releaseHold helper in HeroBanner.tsx
  • The slideshow now stays paused while the pointer is over the hero or keyboard focus is inside it, and resumes only when both leave. Play clears both holds, and mouse-enter/leave handlers are replaced with pointer handlers
  • Adds press tracking: a primary-button press transfers an existing focus hold to a hover hold, and touch pointer entry does not set a hover hold
  • Adds document-capture focus-in and pointer-down listeners while a focus hold is active, so a hold releases when the active element moves outside without a blur event
  • Adds a comprehensive test suite in HeroBanner.hold.test.tsx covering hover/focus combinations, clicks, right-clicks, drags, taps, and outside presses
  • Behavioral Change: starting autoplay now resets the progress rail play-cycle value; check the rail-running state in HeroBanner.tsx

Macroscope summarized bb619b3.

The hero's hover and focus holds shared one flag, so whichever left first
restarted the slideshow while the other still held it: hovering in and
out with focus on a hero control, or tabbing out under the pointer, made
slides advance. Hover and focus are now tracked separately, and the
slideshow resumes only once both have left.

A mouse press inside the hero ends the focus hold, and the focus it
moves onto a button does not start one, so clicking a slide control and
moving the pointer away still resumes the slideshow, as before. The
pointer leaving also ends a focus hold whose focus is gone, for a
control removed without a blur.

Closes Silo-Server#4924
@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@silo-kody

silo-kody Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

HeroBanner now tracks hover and focus as separate slideshow holds. Playback remains held while either condition is active. Tests cover pointer, focus, and control interactions that set or release holds.

Changes: Hero slideshow holds

Layer / File(s) Summary
Separate hover and focus holds
web/src/components/HeroBanner.tsx, web/src/components/HeroBanner.hold.test.tsx
HeroBanner tracks hover and focus holds separately. Releasing one hold preserves the other when its condition remains active. Play clears both holds. Tests cover pointer and focus transitions, control clicks, and slideshow advancement.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: quick104

Merge Risk: Minimal · up to f6693

The Featured hero now stays held until both pointer hover and keyboard focus have left, and Pause/Play is unchanged. The change is limited to web UI behavior and I found no remaining merge risk.

Security architecture risk: Minimal · up to f6693

This changes only how the web slideshow pauses and resumes. No introduced or worsened risk to security, ownership, rollback, or failure containment was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Featured hero stays held until both hover and focus leave. The changeset tracks hover and focus holds separately in HeroBanner.tsx and adds tests for that behavior…
Linked Issues check Passed Directly linked issue #4924 requires that the Featured hero hold its slideshow while the pointer is over it or focus is inside it, release only when both have left, and keep manual Pause separate unti…
Out of Scope Changes check Passed The changes are limited to web/src/components/HeroBanner.tsx and its new test file, HeroBanner.hold.test.tsx, per the PR summary. The extra mouse-press handling (pressing ref, onMouseDown, onMouseUp, …
Description check Passed The description states the problem, approach, validation, evidence, and risks for the HeroBanner hover and focus hold change. It matches the changeset's files and behavior, so it is related and on-top…
Full details: Title check

Explanation

The title names the main change: the Featured hero stays held until both hover and focus leave. The changeset tracks hover and focus holds separately in HeroBanner.tsx and adds tests for that behavior, so the title matches the changeset. The title uses the fix(web) prefix and is 70 characters long, which fits the concise-title guidance.

Full details: Linked Issues check

Explanation

Directly linked issue #4924 requires that the Featured hero hold its slideshow while the pointer is over it or focus is inside it, release only when both have left, and keep manual Pause separate until Play. At the reviewed head, web/src/components/HeroBanner.tsx replaces the single shared flag with a Holds record (hover, focus). The effective hold is held = holds.hover || holds.focus. autoplaying = wantsPlay && !held drives the interval and the progress rail. onMouseEnter sets the hover hold. onMouseLeave calls release('hover'), which keeps the focus hold when focus is still inside the section. onFocus sets the focus hold. onBlur releases the focus hold only when relatedTarget is outside the section. The issue's reproduction (focus on Next, pointer in and out, focus stays inside) keeps the hold. Leaving focus with the pointer still over the hero also keeps the hover hold. The Pause/Play choice is stored in choice, separate from the holds, so hover and focus do not change it. The PR description reports new hero tests (HeroBanner.hold.test.tsx) covering both reported directions. I did not run those tests. The whole-PR diff tool was unavailable, so the verdict rests on the reviewed head file read and the PR summary.

Full details: Out of Scope Changes check

Explanation

The changes are limited to web/src/components/HeroBanner.tsx and its new test file, HeroBanner.hold.test.tsx, per the PR summary. The extra mouse-press handling (pressing ref, onMouseDown, onMouseUp, onContextMenu, and the pointerInside ref) serves the hold behavior of #4924. It keeps mouse clicks on slide controls from holding the slideshow after the pointer leaves. This is a direct consequence of splitting the holds, not an unrelated change. Pause/Play behavior is kept as the issue requires. The PR description's Evidence section is marked PENDING-PUBLISH, but that is a process item, not a coding requirement or an out-of-scope code change. No unrelated code change was identified. The whole-PR diff was not readable, so the file list is taken from the PR summary.

Full details: Description check

Explanation

The description states the problem, approach, validation, evidence, and risks for the HeroBanner hover and focus hold change. It matches the changeset's files and behavior, so it is related and on-topic.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e34e39c-bbab-4acc-887d-0bdd5f81fa0f
Commits

Reviewing files that changed from the base of the PR and between 1bbc479 and f669338.

Files selected for processing: 2

  • web/src/components/HeroBanner.hold.test.tsx
  • web/src/components/HeroBanner.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Nov 21, 2026
…ore touch hover

A mouse press over the hero now turns a focus hold into a hover hold, and
the focus it causes holds as hover, instead of dropping the hold. After
Play, a Tab and a click on Next no longer restart the slideshow while the
pointer is still over the hero. A drag ends the press, so a later keyboard
focus holds again.

Hover now comes from pointer events and ignores touch, so a tap's emulated
mouse entry no longer holds the slideshow after focus leaves. The progress
rail restarts whenever the slideshow starts running, from the committed
state, instead of predicting the next holds in each handler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of f669338. Splitting the hover hold from the focus hold is the right fix for #4924. Both reported-direction tests fail on main for the reported reason and pass here. I found four problems in the new press handling, listed inline. I'm fixing all four in a commit on this branch, so there's no need to change anything yourself.

🤖 Claude Code (claude-opus-5-5)

Comment thread web/src/components/HeroBanner.tsx Resolved
Comment thread web/src/components/HeroBanner.tsx Resolved
Comment thread web/src/components/HeroBanner.tsx Resolved
Comment thread web/src/components/HeroBanner.tsx Resolved
@silo-kody

silo-kody Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Quick104 and others added 2 commits November 22, 2026 02:15
Only a primary-button press over the hero turns a focus hold into a hover
hold. A right or middle click on a focused control leaves the keyboard
user's focus in place, so the slideshow stays held after the pointer
leaves. The focus such a press causes still holds as hover.

The hover tests now send mouse events with the pointer events, as a
browser does, so the two reported directions fail on main again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A browser removes a focused control, such as the hero's Translate button
once pressed, without a blur, so the focus hold stayed on. On a touch
screen nothing else ended it, since touch no longer counts as hover.
While a focus hold is on, the next focus or press outside the hero now
ends it once focus is no longer inside.

The screen-reader test now checks that the hold stays a focus hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

silo-kody Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Quick104 and others added 2 commits November 22, 2026 02:40
Some Home card actions stop their pointerdown from bubbling, so the
listener that ends a focus hold left behind by a removed control never
heard the press. The listeners now run in the capture phase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The listener that ends a focus hold left behind by a removed control
skipped presses inside the hero, so a tap on the hero's title or artwork
after Translate kept the slideshow stopped. It now checks only where
focus is. Tests cover a focus elsewhere and a press that leaves focus
inside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

silo-kody Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104

Copy link
Copy Markdown
Contributor

Maintainer review summary

Reviewed head: bb619b3 (the PR's f669338 plus four review-fix commits; ordinary pushes, no rewrite).

Splitting the hover hold from the focus hold fixes #4924. Before this PR, a keyboard user on Next who brushed the mouse across the hero, or who tabbed out while the pointer rested on it, restarted the slideshow. Now it stays held until both have left. Main hasn't touched the hero since this branch's base, so the branch didn't need updating.

Addressed in this review (all on the branch, each with a test that fails before its fix):

  • A mouse press over the hero dropped every hold after Play, so Pause, Play, Tab and a click on Next restarted the slideshow under the pointer. The press now turns a focus hold into a hover hold.
  • A drag swallowed the press's mouseup, so a later single Tab onto a hero control started no hold.
  • A tap's emulated mouse entry set a hover hold that only a later tap elsewhere ended. Hover now comes from pointer events and ignores touch.
  • The progress rail decided its restart from a stale snapshot. It now restarts whenever the slideshow starts running.
  • A right or middle click on a keyboard-focused control ended the keyboard hold.
  • The hover tests sent only pointer events, so they no longer failed on main. They now send pointer and mouse events together, as a browser does.
  • A control removed without a blur (Translate in Firefox) left a focus hold that nothing ended. The next focus or press anywhere now ends it once focus is outside, including presses that stop propagation.

Tests and live check. Against main, both reported-direction tests fail ("Slide 3" instead of "Slide 1"), and they pass here. On a sandbox build, headless Chromium with real mouse, keyboard and touch input showed both reported directions held. Pause, Play, Tab and a click on Next stayed held under the pointer and resumed once it left; on f669338 the slide advanced. A right-click on the focused control kept the hold, a mouse click on Next then leaving resumed, and a tap on Next followed by Tab out resumed. Two fixes have only unit-test proof. Chromium fires a blur when a focused control is removed, and its touch emulation doesn't leave the stray hover, so neither failure shows there. Firefox wasn't checked.

Evidence: https://evidence.siloserver.org/r/silo-server/pr-5076-review/

Left for the maintainers (none of these block):

  • How much press handling to keep. Keeping main's "click a control, move the pointer away, the slideshow resumes" behaviour is what needs the press tracking, and most review findings came from it. Dropping that goal (any focus holds until blur) would remove it, at the cost of a mouse user staying held after clicking Next until they click elsewhere.
  • A click before the pointer has ever entered the hero, for example the hero mounting under a still cursor, is treated as a screen-reader click, so its focus hold outlasts the pointer. It's low and unverified, since browsers send a synthetic move after layout.
  • Also on main, not changed here: Enter or Space on a control focused by a mouse click starts no hold, and the progress rail keeps filling while the hero is off screen, though the interval stops.

Validated features: not checked. The validation board query needs a scope this run's token lacks. The PR's Validation tasks: none line is unchanged.
User manual: unaffected. The docs mention the hero banner only as a row option, not its slideshow behaviour.
Apple and Android: no pair needed. This is web pointer and focus handling, and the apps show the hero row as a regular row.

Council (Sol gpt-6.2-sol xhigh, Opus claude-opus-5-5 high, Gemini gemini-4-neon xhigh), four rounds:

Member f669338 dc2ded8 9be19ef bb619b3
Sol 7/10 8/10 8/10 8.5/10
Opus 7/10 7.5/10 7.5/10 8/10
Gemini 6/10 7.5/10 8.5/10 9/10

Fit: 9/10 · Readiness: 9/10 — ready

Fit: it fixes confusing slideshow movement for keyboard and screen-reader users on an existing control, with no new setting or surface. Readiness: every finding this review raised is fixed and tested, the reported behaviour was shown live, and CI is green. The remaining items are low or match main.

🤖 Claude Code (claude-opus-5-5)

@Quick104
Quick104 merged commit 283d17d into Silo-Server:main Nov 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/L 200–499 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Web Featured hero restarts its slideshow when either hover or focus leaves

2 participants