Repository navigation
test(ui): enforce that no offered side panel dead-ends when opened cold - #125174
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 4:41 AM ET / 08:41 UTC. ClawSweeper reviewWhat this changesThe PR replaces the chat side-panel characterization test with assertions that every offered panel renders useful cold-open content when its backing data is available, while permitting only documented actionless empty states. Merge readinessKeep open. This maintainer-authored, test-only PR adds a useful UI-boundary guard, but this checkout is behind the supplied current main and cannot materialize the exact PR-head tree for a complete final pass. Priority: P3 Review scores
Verification
How this fits togetherChat pane rendering derives offered side-panel slots and their content templates from a single panel-definition list. The Control UI E2E test opens those slots through the real browser UI and checks the resulting panel content or empty-state behavior. flowchart LR
A[Panel definitions] --> B[Offered side-panel slots]
B --> C[Chat pane rendering]
C --> D[Control UI browser test]
D --> E[Cold-open content check]
D --> F[Empty-state action check]
E --> G[Regression guard]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceTests +196. Total +196 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one browser-level invariant alongside the centralized panel definitions, then complete an exact-head E2E and structured-review pass before landing. Do we have a high-confidence way to reproduce the issue? Not applicable as a current defect report: this PR adds a regression guard, and its body documents an intentional local fault injection that made the intended assertions fail. Is this the best way to solve the issue? Yes in design: checking offered slots through the running Control UI is the right owner-boundary guard, but the exact PR head still needs independent review execution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fcb499a4ced9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready verification for
ClawSweeper
The two pre-merge review items are also covered by exact-head inspection/current-main comparison in the native review worktree and ordinary exact-head validation. No proof gaps remain for this test-only change. |
|
Merged via squash.
|
What Problem This Solves
chat-sidebar-panel-contract.e2e.test.tswas introduced in #124950 as a characterization test: itrecorded what each offered side-panel slot does when opened cold, including the answers that were wrong on
purpose, so the refactors in this series could not change behavior by accident. Four PRs later the wrong
answers are fixed, and a recording of current behavior is no longer the right shape — it documents the
present instead of preventing a repeat.
The bug class it needs to prevent is the one that shipped as #124824: a slot gets promoted to a
user-openable destination without anyone deciding what it shows when reached cold, and the result is a panel
named Review that renders "Open a change, file, image, or tool result to review it here." on a session full
of changes.
Why This Change Was Made
The obvious invariant — "every offered slot renders content or an empty state with an action" — is not
directly enforceable. Some empty states are legitimately actionless: Review on a session with no git
checkout has nothing to diff, and inventing an action there would be worse than the placeholder. A test
demanding an action everywhere would either fail honest cases or get weakened until it meant nothing.
So it is two falsifiable parts:
advertised and has data, cold-open must render slot content and never the generic empty state. This is
the actual anti-dead-end guarantee, and it is exactly what fix(ui): show session changes in the review panel #124824 violated.
short allowlist, each entry commented with why no action exists.
Both tests first assert the offered-slot list itself, so a newly added slot fails until it is explicitly
covered rather than silently escaping the sweep. The allowlist check is bidirectional — the final assertion
compares observed actionless empty states against the allowlist exactly — so a stale entry fails once its
slot is fixed and the list cannot rot.
Allowlist, in full:
Side chat is deliberately not allowlisted: its starter questions are actionable controls, so it satisfies
part 2 on merit.
User Impact
None — test-only. This PR ships zero production lines; it locks in the behavior the previous four
established.
Evidence
A guard nobody has seen fail is an assumption, so the invariant was proven by breaking a slot on purpose.
Files' content resolution was temporarily disabled locally, producing this (then reverted):
Both parts caught it, and each message names the offending slot.
Passing, with the rest of the series' guards unchanged:
pnpm check:changedgreen; Codex autoreview clean.reviewMetrics — production vs test LOC: production
+0 / −0, tests+231 / −35. Series productiontotal across all five PRs: −17 (#124950) +11 (#125019) +7 (#125105) −5 (#125138) +0 here = net −4.
No
CHANGELOG.mdedit — release-only per repo policy; test-only change.