fix(panel): stop live-dot flapping (coalesce frames) + show viewport size (v0.6.3)#17
Merged
Merged
Conversation
…ast) + show viewport size (v0.6.3) Field report: "not navigating live, live dot goes offline, buggy as hell" + a narrow viewport that doesn't fill the dock. Stability (the flapping): - Coalescing frame delivery: on_frame stashes only the NEWEST frame and a sender task drains it. Under load this drops stale frames instead of letting ws.send_bytes block — the backpressure buildup was stalling the socket (frozen → proxy idle-closes → the "live" dot flaps offline → reconnect loop). - Race operator input against the CDP reader task: if Chrome's page target dies (tab gone/replaced), break and let the client reconnect to the live page (~1.2s) instead of freezing until an idle-close. Reconnect backoff 2.5s → 1.2s. Diagnostics for the size issue: - The "live" pill now shows the real viewport dims (live · WxH), so we can see what size the browser is actually rendering at (the default is 1280x577; a narrow strip means the panel-fit resize is landing small). - Resize self-corrects: re-sent ~500ms after connect in case the dock hadn't laid out yet. 47 host-free tests pass; nav re-arm + resize re-validated live; ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #17 | fix(panel): stop live-dot flapping (coalesce frames) + show viewport size (v0.6.3)
VERDICT: WARN (non-blocking — CI test still queued; re-evaluate once terminal)
CI Status
- test: queued
Diff Review
- Frame coalescing in
browser_panel.py:97-123—on_framestashes newest frame into a sharedlatestdict, signals anasyncio.Event, and asender()coroutine drains it. Stale frames are dropped whensenderis blocked onws.send_bytes— correct "render latest, drop stale" pattern. No data races (single event loop). - CDP death race in
browser_panel.py:133-139—asyncio.waitracesws.receive_json()againstcdp.reader_task; breaks cleanly if the CDP socket dies first.recv.cancel()+finallycleanup ofsend_taskis proper. browser_stream.py:241-246— newreader_taskproperty exposesself._reader. Safe, no side effects.- JS:
live()function replaces static "live" label withlive · W×Hviewport dims;sendResize()re-fired 500ms after connect; reconnect backoff 2.5s → 1.2s. All clean.
Observations
- LOW: clawpatch structural review unavailable (HTTP 500 on checkout/mapping). Diff reviewed manually — no blocking issues found in the changed paths.
- LOW:
cdp.reader_taskdepends on_readerbeing set before__aenter__returns — not in the diff but consistent with the class's async-context-manager pattern. Low risk.
Summary: The coalescing pipeline, CDP death race, and viewport diagnostics are all well-structured. No bugs spotted in the diff. 47 host-free tests pass per PR description. Hold for CI terminal-green before clearing for merge.
— Quinn, QA Engineer
|
Submitted COMMENT review on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Field report: "not navigating live, the live dot goes offline, buggy as hell," plus a narrow viewport that doesn't fill the dock.
Stability — the flapping
on_framenow stashes only the newest frame and a sender task drains it. Under load it drops stale frames instead of lettingws.send_bytesblock — the backpressure buildup was stalling the socket (frozen → the fleet proxy idle-closes it → the "live" dot flaps offline → reconnect loop). This is the standard "render latest, drop stale" pattern for live video.Diagnostics for the size issue
The default viewport is 1280×577 (wide), so a narrow strip means the panel-fit resize is landing small. To stop guessing:
live · <w>×<h>. So we can see what the browser is rendering at.Validation
47 host-free tests pass; nav re-arm + resize re-validated live against the real browser; ruff clean.
Next
Once this is in, the
live · W×Hreadout tells us whether the fill is the real problem or the site's own layout — I'll target the fix from there.🤖 Generated with Claude Code