feat: surface failed network requests in the console region - #3
Merged
Steel-tech merged 6 commits intoAug 4, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Closes #1.
Failed network requests now paint in the pane's console region —
✖ 404 GET <url>for HTTP 400–599 and✖ no response GET <url>for connection-level failures — in both polling and live-stream modes.Why a poll, not the stream
agent-browser 0.33.2's per-session WebSocket emits only
url/frame/console/page_error/tabs(verified in the upstream source) — there is no network event to consume. The pane instead diffsnetwork requests --type xhr,fetch,document --jsonby requestId with prune-to-current-log semantics, because a live spike showed the daemon's log can be wiped without--clear(browser relaunch) andpid.NrequestIds can restart.Key decisions
--bailsnapshot batch — an engine without thenetworksubcommand degrades only failure reporting, never frames/console.network()is duck-typed likestreamEnable, so existing test fakes and older engines stay working.no responseonly past a 15 s entry-age threshold (poll-count heuristics break underpollDelaybackoff).navigate(), baseline splits on theexistedcheck: real read beforeopenfor existing sessions, state-only seeding for fresh ones (a pre-open read would auto-create a session and break the ownership rule).…and N moreoverflow line.tracked_requestsis append-only in 0.33.2 with no eviction; on a maxBuffer/timeout-class failure the feed latches off for the attach with a one-time console note instead of retrying a known-fatal multi-MiB exec every tick.attached, never--clear(stub test asserts it), live-mode timer cleared first indropLive()with a shared in-flight guard.Testing
e2e: goLive receives pushed frames…test, which also fails on the base branch (agent-browser 0.33.2 vs the 0.28.x the repo was built against) — not touched by this change.fetch404 →status: 404entry; connection-refused fetch → null-status entry (ages intono response); refused navigation → null-statusDocumentwith Chrome's retry duplicate (deduped).Code review: plan went through a 4-persona doc review (coherence, feasibility, scope, adversarial) with all P1 findings folded in pre-implementation; dedicated diff review skipped (no Tier 1 tool for working diffs; Tier 2 escalation criteria not met — single subsystem, no sensitive surface).
Post-Deploy Monitoring & Validation
No server-side deploy — ships with the plugin. Validation after
herdr plugin link/update (close and reopen the pane to load the new renderer):✖line within one poll interval (poll mode) or ~4 s (live mode).agent-browser not respondingbanner.✖ network reporting off — request log too largeon long-lived sessions is expected self-defense, not a bug; anything else spamming the region → check the 60 s dedupe window.Follow-ups (deferred)
networkstream event (would replace the live-mode timer) — read their CONTRIBUTING first.tracked_requestsunbounded growth (append-only Vec,--clearis the only eviction).🤖 Generated with Claude Code