Skip to content

fix(web): resume playback when a video comment disappears - #2797

Merged
richiemcilroy merged 3 commits into
CapSoftware:mainfrom
AksharP5:fix/web-comment-playback-cleanup
Oct 22, 2026
Merged

richiemcilroy merged 3 commits into
CapSoftware:mainfrom
AksharP5:fix/web-comment-playback-cleanup

Conversation

@AksharP5

@AksharP5 AksharP5 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Playing a video comment pauses the main video. Switching away from the comment before it ends left the main video paused, even when it had been playing beforehand.

Release playback during layout cleanup, before React detaches the player refs and the main-video interlock unregisters. Keep the outgoing element reachable while the lazy mini player loads, then clear it when that interaction ends or another player takes over. Expanding a comment still keeps the main video paused until the interaction finishes.

Closes #2796

Before and after

Same main baseline 88bce03d6, React 19.2.4 and Chrome 154 Linux fixture, using native muted video playback of a synthetic WebM.

Scenario Main This PR
Remove playing inline comment Main stays paused, 0 resume calls Main resumes once
Remove expanded mini player Main stays paused, 0 resume calls Main resumes once
Remove card while mini player loads Main stays paused, 0 resume calls Main resumes once
Main was initially paused Stays paused Stays paused

All six browser cases confirm that the comment really plays and its playback time advances before removal. React, the playback provider/store/registry, and native video play/pause are real. Dialog/control chrome, motion and dynamic-loading state are fixtures. No authenticated full-page or cloud playback was exercised.

Validation

  • All 12 focused tests pass. The same cases against current-main components produce 8 failures and 4 passes.
  • Coverage includes completed and pending inline-to-dialog handoff, last-interlock removal, explicit main-video takeover, and closing or ending a comment before playing it again.
  • Scoped Biome 2.2.0, browser bundle builds and git diff --check pass. An independent review found no remaining issues.
  • Runtime React 19.2.4 matches the web app. Tests reuse installed cached Vitest 3.2.4 and jsdom 29.1.1; the lockfile specifies Vitest 3.2.6 and jsdom 26.1.0. Full web typecheck, Next.js build and the locked-dependency test suite were not run locally.

Focused repository command: cd apps/web && bun run test __tests__/unit/media-comment-playback-cleanup.test.ts.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

This PR returns playback to the main video when a playing video comment disappears.

  • Removing a video comment returns playback to the main video when it was playing.

No actionable issues were found. Review checks were based on source inspection; tests and browser playback were not run during this review.

Reviews (1) · Last reviewed commit: "chore(web): update playback fix with mai..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Oct 22, 2026 6:14am UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 21, 2026 02:51 Inactive
@AksharP5

Copy link
Copy Markdown
Contributor Author

@greptileai please review the latest head, d61ad7eb6.

This restores main-video playback when a playing comment is removed, including removal during lazy mini-player loading. All 12 focused tests pass, and six native browser playback scenarios verify the before/after behavior. The PR describes the fixture boundaries and local tooling limitations.

@richiemcilroy

Copy link
Copy Markdown
Member

Thanks @AksharP5! We've reviewed this and it looks good to merge. Our automated reviewer (Greptile) is temporarily not posting reviews; as soon as it scores this 5/5 and CI is green on the branch updated with main, we'll merge it.

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 21, 2026 05:00 Inactive
@richiemcilroy

Copy link
Copy Markdown
Member

@greptileai review

@vercel
vercel Bot temporarily deployed to Preview – cap-status October 22, 2026 06:14 Inactive
@richiemcilroy
richiemcilroy merged commit 7c679ee into CapSoftware:main Oct 22, 2026
29 of 30 checks passed

This branch was previously deployed

1 inactive deployment
Preview – cap-status — 29673a67 Deployed Oct 22, 2026 by vercel[bot]
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.

Main video stays paused when a playing video comment is removed

2 participants