Repository navigation
fix(ui): stop the pull request list from re-announcing on every CI poll - #185555
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
c2bbe93 to
be90397
Compare
|
Codex review: needs maintainer review before merge. What this changesMoves pull request announcements into separate count and stable per-PR CI summaries outside interactive rows. Example: Two PRs, synthetic/widget#101 and synthetic/widget#102, exchange failing and passing CI states.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current accessibility defect with a focused patch and no actionable findings; exact-head behavior proof resolves the previous blocker, while required CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway PR snapshots enter the Control UI session Details renderer, which produces interactive rows and localized accessibility announcements. flowchart TD
A[Gateway PR subscription] --> B[Session PR props]
B --> C[Existing row projection]
C --> D[Interactive PR rows]
C --> E[Count announcement]
C --> F[Stable per PR CI announcement]
Technical reviewBest possible solution: Land the existing renderer-level fix once its required checks pass. Do we have a high-confidence way to reproduce the issue? Current-main source encloses interactive PR rows in a polite live region, and supplied built-Gateway baseline traces demonstrate repeated mutations on unchanged snapshots; this review ran no target code. Is this the best way to solve the issue? The smallest complete fix keeps interactive rows outside live regions and derives stable text from the existing row owner; every hunk serves that invariant without new state, polling or test scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3e3935a6b4ae. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +49, Tests 0, Docs +1. Total +50 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (12 earlier review cycles; latest 8 shown)
Reviewed November 3, 2026, 3:14 AM ET / 08:14 UTC (Revision 13). |
|
@clawsweeper re-review The blocking item was real behavior proof. Head Regression test added ( Red on Green on this head: The first failure message is the defect itself — the region was announcing the row markup rather than a count. I cannot produce a screen-reader recording (NVDA/VoiceOver) from this environment. The test asserts the live region's membership instead: the region holds the count and no interactive descendants, a CI refresh that leaves the count unchanged does not touch its content, and a count change updates it. If that substitution is not sufficient, please name what would be. |
|
🦞👀 Re-review progress:
|
bf76775 to
c575a48
Compare
|
@clawsweeper re-review
Head The behavior proof from my previous comment is unchanged and still applies. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Screen reader users hear the entire CI card re-read every five seconds while a session has pull requests with running checks. `aria-live="polite"` sat on the `.chat-prs` container, and CI status polls on a five-second timer, so each poll re-rendered the rows inside the region and the reader announced the whole card: every reference, branch, and state. Move the announcement to a dedicated `sr-only` status element that carries only the row count, following the `AttachmentReadStatus` pattern already in `chat-attachments.tsx`. Rows render exactly as before. Measured in Chromium on the rendered markup: the announced payload drops from 75 characters with 2 interactive descendants to 15 characters with 0.
Covers the behavior the live region split is meant to guarantee: the region carries the row count and nothing else, a CI-only refresh leaves it untouched, and a count change updates it. Rows keep their links outside the region. Red on origin/main: expected 'openclaw/openclaw#103469claude/browse...' to be '2 pull requests' expected null to be 'true' Green on this head: 2 passed.
The reviewer asked for evidence on the shipped component rather than a markup table. This runs the real ChatPullRequestsContent in the repo's Chromium browser project and reads the live region directly. Red on origin/main: expected 'openclaw/openclaw#103469claude/browse…' to be '2 pull requests' The failure message is the defect: the region announced the row markup instead of a count. Green on this head: the region announces exactly "2 pull requests" with no links or controls inside it, a CI-only refresh leaves that payload untouched, and a count change updates it.
The previous browser case re-mounted the component for every purported refresh, which cannot say anything about re-announcement: destroying and recreating the region guarantees a fresh element. Review flagged this correctly. Mount once, hold the rows in a signal, and drive genuine reactive updates. A MutationObserver over the live region then records what the browser actually mutated during a CI-only refresh. Red on origin/main: expected 'openclaw/openclaw#103469claude/browse...' to be '2 pull requests', for both cases. Green here, and the assertions now carry the weight: - rows re-render (the .chat-prs markup changes) while the live region records zero child/character-data mutations, keeps its element identity, and stays connected; - a count change mutates the region and updates it in place.
The review asked for evidence through the shipped Control UI rather than a component harness. This drives the real chat route: a mock Gateway session publishes pull requests, then a CI-only update with the same row count, then a count change. It reads the polite region's text at each step and, through CDP Accessibility.getFullAXTree on the top-level page, the names Chromium reports for polite live regions - so the trace is accessibility data, not a source scan. Asserts: - the region announces '2 pull requests' and holds no links or buttons; - after a CI-only refresh the .chat-prs markup changes but the announced text does not; - a count change updates the announcement to '1 pull request'.
Main announced CI text only as a side effect of re-rendering the whole card, so a genuine pending->failed transition arrived buried in the same noise as every identical poll. Moving the list out of the live region removed both, which also silenced real transitions. Keep the count announcement, and add a second live region carrying a summary derived from check states rather than row markup. An identical poll produces the same string and therefore no DOM change and no announcement; a transition changes it exactly once. It renders nothing while every check is settled, so clearing it announces nothing either. Removes the jsdom component test: the Chromium case drives the same component with mutation-level assertions and fully subsumes it.
Taking a row from pending to passing zeroes both failing and running, so the summary memo returned undefined and the region was cleared. A cleared live region announces nothing, so the completion - and a failed-to-passing recovery - still went unannounced. That kept part of the status-silencing regression this change set out to remove. Count settled checks and render a completion summary for them instead. The text now moves running -> failing -> passed as the state changes, one announcement per genuine transition, and identical polls still produce the same string and therefore no announcement. Checked against the reviewer's exact cases: pending -> passing and failing -> passing both announce now, in the browser component test and in the shipped-page e2e.
Review found the summary still dropped real changes: with one row failing and another running the text was "1 failing", and when the running row finished the failing count was unchanged, so the string was identical and neither region mutated. Worse, completion had been expressed by clearing the region, and an empty live region announces nothing. Report every non-zero bucket instead of only the worst one, and report completion explicitly: 2 pull requests with CI: 1 failing, 1 still running 2 pull requests with CI: 1 failing, 1 passed <- previously silent 2 pull requests with CI: 2 passed Any single-row transition now shifts counts between buckets and therefore changes the string exactly once. Identical polls produce the same string, so no DOM change and no announcement. The one accepted gap - two rows swapping buckets in the same poll - is named in the code comment rather than engineered around. Tests carry the reviewer's cases: a mixed-state regression in the browser test, and the e2e now installs a MutationObserver over both regions and records the per-region mutation counts for an identical poll, a mixed transition, the masked completion, full settlement, and a row removal. It prints that trace, so the shipped-UI evidence is in the run log rather than only asserted.
…test The Chromium component test asserted the same behaviour the shipped-route e2e already covers, and redundant component coverage was marked down on the sibling change. Drop it: the e2e drives the real chat page and records per-region mutation counts, which is the evidence this surface needs. Also fixes the lint failure: the page-side trace store is named prLiveTrace, not __prLiveTrace, so it no longer trips no-underscore-dangle.
Current-head built-UI proof: real CI changes are still lostTested head: The per-bucket revision fixes the previously observed single-change loss: a failing PR no longer masks another PR finishing. However, it still does not preserve every real CI change that main exposes to the live region. Reproduction through the built Control UIBoth complete builds succeeded in secretless Node 24.22.1 Linux Docker. Real Chromium loaded each built Control UI from its isolated Gateway. The repository's supported mock-Gateway fixture supplied typed PR subscription events; its server build identity was bound to the exact built artifact, without disabling the production build-skew guard. No source-component mount, model call, paid key or real GitHub account was used. Two completed matched comparisons produced these DOM mutation counts inside polite live regions: These are live-region mutation counts, not counts of spoken screen-reader utterances. Only completed traces are counted; earlier setup/bootstrap failures are excluded. The discriminating lost transition is: Both visible row badges change correctly (inspected before/after captures), but the candidate's live text stays exactly: Neither candidate live region mutates. Main mutates its live region on the same real transition in both runs. The candidate therefore suppresses two genuine per-PR status changes whenever their bucket counts balance within a poll. This can occur naturally between five-second polls; no timing fault or impossible state was injected. Owner-level cause and disposition
No code/test changes or push were made from this investigation. I am returning this remaining loss rather than requesting a rating upgrade or claiming landing readiness. The poll-noise fix and the now-preserved masked completion/recovery transitions are confirmed, but the all-real-changes condition remains unsatisfied. |
Aggregate buckets still hid real changes. With one PR failing and another passing, the totals were '1 failing, 1 passed'; when the two exchanged states - both row badges visibly changed - the totals were identical, so no live region mutated and neither change was announced. Pending check progress inside one PR was dropped the same way. The maintainer reproduced both through the built Control UI on d444521. Announce a snapshot per pull request instead: reference, localized state, and the four exposed check counters, in stable URL order. Any state or counter change in any row changes that row's text, so balanced swaps and in-progress counters are preserved, while identical snapshots and row reordering produce the same string and therefore no announcement. Net production change is +27/-70: the removed bucket arithmetic and its six aggregate keys are gone, replaced by one item template. No effects, timers, retained history or forced DOM writes. The route test gains the two scenarios that were uncovered, pending progress and a balanced failing/passing exchange, and asserts both now mutate the CI region while the count region stays silent.
|
@clawsweeper re-review Head The aggregate-only loss is fixed, including the exact transition you reproduced. With one PR failing and another passing, the per-bucket totals were The announcement is now a per-PR snapshot in stable URL order: Identity, localized state and the four exposed counters per row. Any change in any row changes that row's text, so balanced swaps and in-progress counters survive. Identical snapshots and reordered rows produce the same string, so no DOM change and no announcement. Net production change is +27/−70 — the bucket arithmetic and its six aggregate locale keys are gone. The route test now covers both uncovered scenarios (
Both previously produced zero mutations. Locally I verified Remaining honest limit: live-region mutation and accessibility-tree evidence, not screen-reader speech. |
|
🦞👀 Re-review progress:
|
|
@obviyus — thanks, the swap case you reproduced is fixed on
I re-ran your exact transition with your measurement ( On One thing I want to be straight about, since it affects how much weight to give the route test: replaying the e2e's assertions at component level passes on PR body now has the full table and the gaps, including that this is live-region mutation and element-identity evidence, not a screen-reader recording, and that I have not run the built Control UI through an isolated Gateway — that remains yours to decide. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Built Gateway + Linux Chromium: live-region DOM proofBaseline: Both were built and run in secretless Two completed runs per build produced these mutations inside the PR polite live regions:
On main, the live region contained the entire interactive list, including 14 links/buttons. On the candidate, both live-region nodes retained their identity, neither contained an interactive control, and unchanged polls/reordering left their text untouched. Row removal updated the count and CI regions once each. The formerly lost balanced swap now changes actual CI live-region text from: to: Pending progress is also retained while the status stays pending: The prior snapshot had 4 passed and 2 running. This transition changed the CI region once in each candidate run. These are DOM text/mutation observations, not counts of spoken screen-reader utterances. The CI feed is synthetic; this does not test GitHub's API or a particular screen-reader engine. Earlier fixture/bootstrap setup failures were excluded from the completed comparisons. Focused regression: the consolidated DOM-boundary case fails against baseline production because Simplification preserves Pick-cat's original fix commits, removes the added 301-line route-test scaffold, and folds the boundary guard into the existing rendering case without dropping its unknown-count assertions. Whole PR against the merge base: production +50/-1 (net +49), tests +2/-2 (net 0), docs +1/-0. There are no API, config, schema, permission or threshold changes. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Closes #185717.
What Problem This Solves
Fixes: the pull request list changes an entire interactive live region on unchanged CI polls, while earlier count-only summaries also suppressed genuine CI changes.
User Impact
User impact: unchanged polls and row reordering leave the announcement text untouched, while real per-PR status changes and pending check progress still update it. This includes two PRs swapping failing and passing states without changing the overall totals. Interactive PR rows and actions stay outside the live regions.
Why This Change Was Made
Keep two stable, noninteractive live regions: the PR count and a CI summary that includes each PR's identity, state and check totals. Stable URL ordering prevents row reordering from creating a new announcement; retaining per-PR facts avoids the information loss of aggregate status buckets.
Preserves @Pick-cat's original fix commits. The existing rendering test now guards the announcement boundary; the added 301-line route scaffold is replaced by observed built-route proof. Against the merge base: production +50/-1, tests +2/-2 (net 0), docs +1/-0. No API, config, stored-data, permission or threshold changes.
Evidence
Exact-head built-Gateway/Chromium DOM captures and results, candidate
398dc7cb75d2da8dfcfee81e8f13ea7084772989, Node 24.22.1 Linux Docker:The evidence measures actual live-region DOM text and mutations, not spoken utterances or a specific screen-reader engine. The CI feed is synthetic; GitHub API behavior is outside this UI-only change.
Merge danger: two-way door; reverting restores the former announcement behavior without a migration. Blast radius is screen-reader announcements in the session PR Details surface; visible PR status, actions and Gateway behavior are unchanged.