Skip to content

Deliver an initial browser frame to overlapping static-page watchers - #63

Merged
Fectivnfy112357 merged 4 commits into
mainfrom
fix/browser-static-frame-replacement
Nov 20, 2026
Merged

Fectivnfy112357 merged 4 commits into
mainfrom
fix/browser-static-frame-replacement

Conversation

@Fectivnfy112357

Copy link
Copy Markdown
Contributor

Proven: a late watcher can starve on a static Chromium page

On the current main runtime, an active watcher receives the page's only JPEG. A second watcher of the same target joins the existing cast, but it receives nothing until the page paints again. A gated fake provider reproduces this. A real local Chromium control saw the same starvation both at 600×500 and after a genuine resize to 700×550; evaluating the live viewport confirmed that the resize took effect without producing a frame.

Provide a fresh one-shot initial image only for an overlapping subscriber that still has no live frame. The original screencast remains active; a live frame wins, errors retain the existing live and timeout behavior, and the image is not broadcast or cached. The capture stays on the authorized Chromium target and checks generation, stream ownership and confident viewport geometry again before delivering. Concurrent resize writes with uncertain ordering skip the supplemental capture. At most one supplemental native capture is in flight per page.

CI attribution

Main run 209 macOS recorded one JPEG for an earlier watch, then a later watch with no image and no error. This is consistent with the reproduced defect, but that run did not record the overlap or viewport at the service, so it does not prove this exact cause. No timeouts or assertions weakened.

Verification

  • Focused 97 tests passed, including real Chromium fixed-size and resized subscriber controls. The test decodes the actual returned JPEG and checks pixel dimensions against live viewport geometry.
  • Fake cases verify wrong-generation drop, capture rejection, live-before-snapshot, existing frame timeout, and normal subscriber ownership/teardown.
  • Focused agent transcript passed on Linux with the local fixture. WebUI test/server typechecks, host event catalogue, and source inventory passed.

@Fectivnfy112357
Fectivnfy112357 marked this pull request as ready for review November 20, 2026 23:24
@Fectivnfy112357
Fectivnfy112357 merged commit 75c497b into main Nov 20, 2026
18 checks passed
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.

1 participant