Repository navigation
fix(ui): keep Inbox current during automation bursts - #137753
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 12:05 AM ET / 04:05 UTC. ClawSweeper reviewWhat this changesThe PR serializes Control UI Inbox cron and model-auth refreshes so automation bursts do not create overlapping Gateway requests or hide current warnings. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain Keep open for normal landing: source review found no introduced correctness defect, but this maintainer-authored, maintainer-labeled PR still has queued and in-progress exact-head checks. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI Inbox turns Gateway cron inventory and model-auth status into visible attention entries. Gateway automation events and browser visibility changes request refreshes, which update the Inbox and its locally saved dismissals. flowchart LR
A[Automation and visibility events] --> B[Inbox attention store]
B --> C[Serialized cron inventory refresh]
B --> D[Serialized model-auth refresh]
C --> E[Attention and dismissal reconciliation]
D --> E
E --> F[Control UI Inbox]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +56, Tests +482. Total +538 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one controller-owned serialized refresh lifecycle for each source, retain the focused boundary coverage, and land only after the exact head’s required checks are green. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the previous path started a new cron inventory pair for every event, and the introduced regression tests model a pending pair followed by 20 events. Is this the best way to solve the issue? Yes: coalescing belongs in the app-lifetime Inbox controller, which owns both event invalidation and the state that must survive incomplete or failed reads. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cd80cce329d4. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
The missed trailing auth refresh is fixed in The final candidate passes 54 focused unit tests and 12 bundled Chromium cases, UI production/test typechecks, typed lint, formatting, and independent P2 review. The original synthetic automation burst still refreshes the Inbox without per-event reload amplification. This addresses the review's auth refresh finding and the related freshness race. Hosted CI for the exact final head remains required; the unrelated cold Browser-cleanup stall found in an earlier shard is being repaired separately with its own reproduction. |
e77a3ae to
473751e
Compare
|
Refreshed the branch onto main to include the existing Chrome MCP prewarm prerequisite for the browser CI job. The full patch is byte-identical: all four final files and 26 checked owner, harness, dependency and policy preimages are unchanged, and all three authored commits replayed without conflicts. Existing focused and Chromium proof remains applicable; the new exact-head CI run must still verify the browser, dependency and audit jobs. |
|
Merged via squash.
|
* fix(ui): keep Inbox current during automation bursts * test(ui): avoid returning timer handles from executors * fix(ui): preserve independent auth refresh freshness
What Problem This Solves
Fixes an issue where users watching the Control UI would generate overlapping automation-inventory requests and miss Inbox warnings when many automation events arrived while the Gateway was responding slowly. Twenty events during pending reads produced 21 concurrent
cron.listrequests and 21cron.statusrequests, and could invalidate an independently loading model-auth warning.Why This Change Was Made
The Inbox store now owns one in-flight inventory pair and one queued refresh for its current connection, profile, and agent scope. It publishes successful progress even while more events arrive, preserves previously valid values when either read fails, and only uses a fresh successful complete inventory to retire saved dismissals. A first page with more results cannot establish that a dismissed job is absent. Model-auth reads retain separate in-flight ownership and one trailing visibility/idle refresh. Each source has its own completion timestamp, so frequent automation activity cannot postpone an overdue auth refresh. Retired scopes cannot publish or drain queued requests.
User Impact
The Inbox remains current during bursts and sustained automation activity without multiplying Gateway requests. Slow automation reads no longer hide independently loaded auth warnings, failed reads retain useful attention, and stale results cannot overwrite a replacement connection or agent selection.
Evidence
no-promise-executor-returnviolations. The separate cleanup commit passed the lint rerun on all four paths, the remaining stylelint step, all 10 affected store tests, and a fresh P2 review. The auth follow-up additionally passed all-four-file formatting, lint and stylelint, UI production/test types, the 54-unit/12-browser suites, and a fresh full-candidate P2 review. The original wrapper result was a failure; this is explicit focused recovery.|
|
|