Skip to content

fix(website): video controls stay long enough to use on a phone - #19017

Closed
mariana953 wants to merge 1 commit into
mainfrom
mariana/v2-player-touch-controls
Closed

mariana953 wants to merge 1 commit into
mainfrom
mariana/v2-player-touch-controls

Conversation

@mariana953

@mariana953 mariana953 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

VideoPlayer's control bar left 800 ms after the last pointer activity. A pointer that hovers keeps it up for as long as it rests on the player, so that window never bit on a desktop; a finger cannot hover, so 800 ms was the whole of the bar's visit — long enough to see the controls and too short to hit one.

Changes

  • What: refAutoReset's window is now read from a getter: 800 ms where (hover: hover) matches, four seconds where it does not.

Review Focus

The worst case is the Hub's output panel, which passes controls-on-hover. There, once a generated video is playing, controlsVisible is focused || hovering || recentActivity — on a phone none of the three survives 800 ms, so there was no way to reach play, scrub, mute or fullscreen on your own generation at all.

The test asserts the window rather than the styling: it drives playback (the only thing that summons the bar where there is no pointer to rest), advances fake timers, and reads whether the bar is still reachable. I checked it fails with the delay pinned back to a constant 800 — the touch-at-1000 ms row goes red and the other two stay green.

(hover: hover) rather than a width query on purpose: a touch laptop and a phone have the same problem, and a narrow desktop window does not.

Four seconds is a judgement call, not a measured figure. It is long enough to aim at the scrub bar without leaving the bar sitting over the picture; happy to move it.

Why no Playwright test under apps/website/e2e/

I wrote one and could not make it prove anything, so it is not in the diff. Two facts about the website's browser suite defeat it:

  • Every video URL is fulfilled by the shared blockExternalMedia fixture with e2e/assets/placeholder.webm, which is 0.12 s long. The bar's window is seconds; the clip is over long before it, and a stopped video shows the bar on purpose (controlsVisible starts with !playing). So the assertion reads "visible" whether the timer works or not.
  • The only surface that keeps playing true past that — the Hub output panel's autoplay loop player, which is also the one that carries controls-on-hover — is reachable only through a mocked run that delivers a video output, and no existing spec sets one up. Building that pipeline to time a setTimeout would put the proof further from the thing being changed, not closer.

What the component test does cover is the branch itself, against a real matchMedia: three rows over (hover: hover) true/false at 1000 ms and 5000 ms, failing when the delay goes back to a constant. The column count and layout of the bar stay with the visual-responsive baselines, which render at real widths.

The bar was summoned by any pointer activity and left after 800ms. A pointer
that hovers keeps it up for as long as it rests on the player, so that window
never bit on a desktop. A finger cannot hover: the window is the whole of the
bar's visit, and 800ms was long enough to see the controls and too short to hit
one — on the Hub's own output panel, where the bar waits for a pointer, there
was then no way to reach it at all.

Where the device cannot hover, the bar now waits four seconds.
@mariana953
mariana953 requested review from a team September 26, 2026 16:54
@vercel

vercel Bot commented Sep 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 26, 2026 4:54pm UTC
billing-web-test Skipped Skipped Sep 26, 2026 4:54pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 1685d3352be73fb15bfac57c3c9858031d2d60f7

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-19017.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

This commit: https://website-frontend-e3ukfbrce-comfyui.vercel.app

Last updated: 2026-09-26T16:56:23Z for 2134692

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 411a46d0-80d5-4513-b95f-45cd0114c499

📥 Commits

Reviewing files that changed from the base of the PR and between 1685d33 and 2134692.

📒 Files selected for processing (2)
  • apps/website/src/components/common/VideoPlayer.test.ts
  • apps/website/src/components/common/VideoPlayer.vue

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


📝 Walkthrough

Walkthrough

The video player selects its controls’ inactivity timeout based on hover support. Tests cover control-bar pointer reachability at different playback times.

Changes

Video player control timeout

Layer / File(s) Summary
Hover-based control timeout
apps/website/src/components/common/VideoPlayer.vue, apps/website/src/components/common/VideoPlayer.test.ts
The player uses an 800 ms timeout on hover-capable devices and a 4000 ms timeout otherwise. The control bar has a test identifier. Tests check pointer reachability after 1000 ms and 5000 ms.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: benjcooley

Merge Risk: ⚪ Minimal · up to 21346

The longer touch-device control window has no established issue requiring a fix before merge. Complete the normal test checks.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore (reviewers only)

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Website End-To-End Regression Coverage ❌ Error The PR changes observable website runtime behavior in apps/website/src/components/common/VideoPlayer.vue by changing the control-bar inactivity timeout. It does not add or update a Playwright assert… Add or update a Playwright regression test under apps/website/e2e/ that exercises the video control visibility on a non-hover device, or record in the PR description why an end-to-end test is not practical.
✅ Passed checks (6 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed The title and commit subject use the bug-fix signal "fix". However, all changed files are under apps/website, which the check explicitly excludes from this browser_tests/ requirement. The PR descr…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed files are apps/website/src/components/common/VideoPlayer.test.ts and apps/website/src/components/common/VideoPlayer.vue. They are not under src/lib/litegraph/, src/ecs/, or graph-e…
Title check ✅ Passed The title clearly identifies the main change: extending video control visibility for phone users.
Description check ✅ Passed The description includes the required Summary, Changes, and Review Focus sections. It explains the behavior change, rationale, test coverage, and device-query decision. Breaking changes and dependenci…
Full details: Website End-To-End Regression Coverage

Explanation

The PR changes observable website runtime behavior in apps/website/src/components/common/VideoPlayer.vue by changing the control-bar inactivity timeout. It does not add or update a Playwright assertion under apps/website/e2e/**/*.spec.ts. The description explains the added component test, but it does not give a concrete reason why an end-to-end regression test was not added.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Pre-merge checks failed. Please resolve the failing checks before merging.

@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #19017      +/-   ##
==========================================
- Coverage   84.04%   84.02%   -0.03%     
==========================================
  Files        3158     3123      -35     
  Lines      154414   153648     -766     
  Branches    41918    41725     -193     
==========================================
- Hits       129772   129097     -675     
+ Misses      23037    22996      -41     
+ Partials     1605     1555      -50     
Flag Coverage Δ
billing-web-unit ?
website-unit 78.00% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
apps/website/src/components/common/VideoPlayer.vue 67.37% <100.00%> (+0.23%) ⬆️

... and 35 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

On the one failing pre-merge check, Website End-To-End Regression Coverage: I took the first half of its resolution before the second. I wrote the Playwright test, ran it against a fresh pnpm build on both the desktop and mobile projects, and it cannot prove the behaviour — so the description now records why, per the check's own alternative.

The blocker is the fixture, not the effort. blockExternalMedia fulfils every video URL with e2e/assets/placeholder.webm, which is 0.12 s long, and a stopped video shows the bar deliberately (controlsVisible opens with !playing). Both of my attempts therefore read "bar still reachable" for the wrong reason — the timer was never what kept it up. Observed, not assumed:

✘ [desktop] › fades within a second of the pointer leaving a playing video
    Expected: "none"   Received: "auto"
✘ [mobile]  › stays reachable for seconds after a tap starts playback @mobile
    Expected: "none"   Received: "auto"

The only player that holds playing true past the clip — the Hub output panel's autoplay loop video, which is also the one carrying controls-on-hover and so the one this fix matters most for — is reachable only through a mocked run delivering a video output, and no existing spec sets that up. Standing a whole run pipeline up to time a setTimeout would move the proof further from the change, not closer.

What is covered, against a real matchMedia rather than a class assertion: three rows over (hover: hover) true and false at 1000 ms and 5000 ms, which go red when the delay is pinned back to a constant 800.


Generated by Claude Code

@benjcooley

Copy link
Copy Markdown
Collaborator

Included unmodified in #19255, which lands Mar's Hub V2 PRs together as part of the stack #18988 → #19023 → #19255 → #19256. Review fixes for this area are in #19256. Closing in favour of the stack. Your branch is untouched; for further changes, please open a PR on top of #19256 rather than pushing here.

@benjcooley benjcooley closed this Sep 28, 2026
benjcooley added a commit that referenced this pull request Sep 28, 2026
…te PRs (#19255)

## Summary

Mar's Hub V2, staged as one reviewable phase. This combines the 23 PRs
from her [#proj-comfy-hub
post](https://comfy-organization.slack.com/archives/C0AEPRS8N74/p1790528696016959),
including the latest head of #19004, while preserving her presentation
and commit history. Review fixes remain isolated in #19256 above this
PR.

Design reference (not for review): #17804 · [V2 Hub
preview](https://comfy-website-preview-pr-17804.vercel.app/hub/)

## Included

**Independent:** #19031 Hub not Models · #18916 search with filter and
sort · #18915 shorter workflows banner · #18979 filter chips · #19012
one "browse all" · #19016 shelf stops promising more · #18987 home hub
workflows tab · #19025 Apps tab · #19090 filter named after what it
filters · #19017 phone video controls · #19011 API tab endpoint · #19014
workflow header

**Catalogue cards:** #18921 → #19015

**Workflow page V2:** #19009 → #19004 → #19008 → #19010 → #19029

**Run states:** #19005 → #19006 → #19007 → #19022

## Integration with current main

- Rebases the phase onto current `main`, including the canonical
`/models/apps/<slug>/` routes and the separate Apps feature flag.
- Keeps Mar's Apps shelf and card presentation while sourcing its
entries and links from the canonical app catalogue.
- Keeps Apps gated by `workshop-apps-enabled`; Workflows remain gated
independently by `workshop-workflows-enabled`.
- Keeps Mar's latest #19004 Details cleanup and single template-author
attribution while retaining the later interactive graph work in
#19008/#19010.
- Resolves the combined `/models/` JavaScript budget to 1,820,000 bytes.

## Not included

- #19241 (API tab rail): conflicts with #19011 and still needs a design
call.
- #19227 (draft), #17865 and #18306: not part of the Hub V2 set.

## Verification

- Full website unit suite: 9,494 passed, 4 skipped.
- Focused post-rebase app/catalogue suite: 98 passed.
- Website typecheck: 0 errors.
- Commit and push checks: formatting, lint, app/website typechecks, knip
and Fallow passed.
- `workshop-workflows-enabled` gates the home tab, catalogue tab, direct
`?type=` URLs and detail pages without flashing gated content.

---------

Co-authored-by: Mariana Martinho <mariana@comfy.org>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions <github-actions@github.com>

This branch was previously deployed

1 inactive deployment
Preview – billing-web-test — 21346928 Deployed Sep 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants