Skip to content

fix(tests): stop the panel tab overflow proof racing the native selected-tab scroll - #2423

Merged
bkudiess merged 1 commit into
openclaw:mainfrom
bkudiess:bkudiess/flake-panel-tabs-overflow
Dec 1, 2026
Merged

bkudiess merged 1 commit into
openclaw:mainfrom
bkudiess:bkudiess/flake-panel-tabs-overflow

Conversation

@bkudiess

@bkudiess bkudiess commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 866569ea5d86255183e67230f49c132fc54f5791

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Test-only diff in one test.
↑ PR CI on this exact head is green on the first attempt, including the x64 Tray UI shard and the new-test soak (10 iterations, 3 under CPU contention).
↑ CI and local x64 traces explain every intermediate failure, and the dual-model review has no open blocking code finding.
↓ Native ARM64 (Crabbox) and local x64 repeats ran on earlier heads, not this one: RTX 2 is screen-locked and the local desktop is disconnected.
↓ GPT-6 Astra leaves one MEDIUM evidence question open (see Review).
Diagnosis confidence 9/10 ↑ The pre-fix code with an injected late native bring-into-view reproduces the exact CI message.
↑ CI and local traces show TabView's delayed request for the selected tab landing milliseconds after the click, the same mechanism the original ChangeView(0) raced.
↓ The original CI failure left no scroll trace, so which late request hit tab 4 there is inferred.
Evidence fit 8.5/10 ↑ RED fails only the joinsCaptionRow=False cases, matching CI's Light/False failure.
↓ No screenshot or offset was captured for the original failure.

What Problem This Solves

The Tray UI shard test PanelTabs_LongTitlesStayBoundedAndNativeOverflowScrollsWithoutDroppingTabs can time out with "native overflow can scroll toward the hidden tabs". It failed #2416's first CI attempt (run 46519382652, Light/joinsCaptionRow=False), and #2416 doesn't touch panel tabs.

User Impact

No user-visible change. CI stops failing on this test when TabView's own tab-strip scroll lands late.

Why This Change Was Made

Cause (class 3, scroll read mid-layout).

  • The test selected each tab, ending on the last, then called ChangeView(0).
  • WinUI TabView brings its selected tab into view through asynchronous requests (TabViewItem::StartBringTabIntoView, raised as an async routed event). If one landed after ChangeView(0), the strip went back to the end and the increase arrow stayed disabled.

Fix.

  • The test reaches the start by selecting the first tab, so every late native request targets the start. The files selection-sync assertion moved to that step.
  • Before clicking, the test waits until the arrow is enabled and tab 0 overlaps the strip.
  • The arrow proof records the strip's ViewChanging targets. It requires one inside a ±25-DIP band around TabView's fixed 50-DIP step from the click-time offset, with an unclamped step.

Why the arrow proof changed. Traces from CI x64, local x64 and Crabbox ARM64 show TabView's delayed request for the newly selected tab landing 1–3 ms after the click. That request cancels the arrow's scroll after the scroll has started.

  • The original check (offset > 0 after ChangeView(0)) proved the strip moved but couldn't tell which request moved it. Its race path timed out, which is this flake.
  • The first version of this PR made that check vacuous, because the strip rested at offset 4.
  • This version identifies the arrow's own scroll request. It proves the arrow starts the native step scroll, not that the strip finishes it. The canceller is TabView's own request, which lands within milliseconds of the selection.

Ownership. This is the panel TabView strip in ReactorConversationPanelHost, not the transcript scroll owned by #2126. No other ChangeView or scroll-arrow code exists in this test file.

Evidence

Check Head Result
RED: pre-fix + injected late bring-into-view (native TargetRect, logged as fired), Crabbox ARM64 base 29f0553 + injection ❌ 3/6 fail with the exact CI message (joinsCaptionRow=False); offset 0 → 336 == scrollable
PR CI, x64 Tray UI shard and new-test soak (10 iterations, 3 under contention) 866569e ✅ first attempt, all checks green
PR CI, x64 shard and soak eb29ce2 (lower bound only) ✅ (one unrelated GatewayFixtureUiTests.SharedRootDialog NRE in the Mock Gateway job, now in the flake ledger)
No-click mutation with the expected offset set, local x64 dc1e960f → 2922cc2 logic ❌ 12/12 fail as intended; targets [] or [6.29] only
Local x64 repeats (screenshots 0 and 1) 2922cc2+tree (50/50), 6b26f36 (20/20) ✅
Crabbox ARM64: GREEN with injection, repeats, 2 contention soaks, shard lane earlier heads ✅ the shard lane matched clean main (58 host-only failures: unresolved .resw keys and Hub-window timeouts)
./build.ps1, Shared tests (6235 passed, 29 skipped), Tray tests (7227 passed), timing ratchet, git diff --check base 4c53470 + this diff ✅

History. Intermediate heads failed CI: 8b60dd2 (left-edge check), 1c8e029 (focus gate). A temporary diagnostic commit captured the CI trace that led to this design; it was squashed away before this head.

Review. Dual-model review ran on every head (Claude Opus 5.5, and GPT-6 Astra with long context, both at high reasoning). All MEDIUM findings were fixed, including the weakened arrow proof, the focus-request ordering, attribution of the scroll, and the clamped-end collision. Remaining:

  • Opus: no blocking findings.
  • Astra: one MEDIUM evidence question. Could a 40-DIP right-aligned target enter the recording window after the overlap gate? Every traced strip move after the selection is a single non-animated jump, and the only request after the gate is TabView's late request targeting about 6. This is evidence, not proof.

Not verified.

  • Native ARM64 and local x64 runs of this exact head. RTX 2 is screen-locked and the local desktop is disconnected; CI x64 is the exact-head native proof.
  • The no-click mutation and GREEN-with-injection runs were not repeated on 866569e.

Required proof pools

none: test-only change to one UI proof test.

@clawsweeper

clawsweeper Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Dec 1, 2026
@clawsweeper

clawsweeper Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codex review: passed.

What this changes

The PR selects the first panel tab before testing overflow and verifies arrow scrolling by observing that tab’s left edge.

Example: Five tabs overflow a 280-DIP panel.

  • Before: The test selects the last tab, then resets the scroll offset, allowing native selection scrolling to undo the reset.
  • After: The test selects the first tab and checks that invoking the increase arrow moves its left edge outside the viewport.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch preserves the intended assertions, but reported ARM64 successes coexist with exact-head hosted failures whose traces could not be inspected.
Proof confidence 🦐 gold shrimp (3/6) No shipped behavior changes; evidence consists of reported native in-process test runs, with exact-head hosted validation still unresolved.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: An unrelated PR can fail CI when native selected-tab scrolling races the panel overflow proof.
Reason: A narrow repair to an existing native test has clear value, preserves its coverage, and has maintainer-authored direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a focused test reliability repair that is absent from main; no definite introduced code defect was established.

Reviewed head: 8b60dd2dfc6a38c213948e8367b22a8bfa40825d

Before merge

None.

Findings

None.

Agent review details

How this fits together

The in-process WinUI test mounts ReactorConversationPanelHost, supplies five panel tabs, invokes the native TabView overflow arrow, and checks rendered geometry and retained panel state.

flowchart LR
  A[Test panel state] --> B[ReactorConversationPanelHost]
  B --> C[Native TabView]
  C --> D[Selection and overflow arrow]
  D --> E[Rendered geometry assertions]
Loading

Technical review

Best possible solution:

Keep the repair within the existing UI test and resolve the hosted caption-row failures before landing.

Do we have a high-confidence way to reproduce the issue?

Main visibly selects the last tab before resetting the offset, matching the reported competing-scroll setup; the original late-scroll mechanism was not independently executed during this read-only review.

Is this the best way to solve the issue?

Selecting the first tab aligns test positioning with native selection behavior, while the left-edge assertion avoids mistaking a small automatic alignment for an arrow click.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 30d159c66030.

Provenance checked

  • Panel overflow positioning and arrow assertion changes intended behavior with a stated reason (c38dbcc: The original test realized and measured every tab, then reset the strip to exercise native overflow without losing tabs or selection synchronization.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit c38dbcc adds tests/OpenClaw.Tray.UITests/ReactorChatLayoutProofTests.FilePreview.cs:266 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c38dbcc53e7d; files: tests/OpenClaw.Tray.UITests/ReactorChatLayoutProofTests.FilePreview.cs)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Change scope Production: unchanged; tests: +15/-8 lines The added geometry observation supports a click-specific assertion without introducing another fixture or production owner.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Inspect the three caption-row failure traces and determine whether they require a test repair or reproduce unchanged on base.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 30, 2026, 9:15 PM ET / December 1, 2026, 02:15 UTC.

@bkudiess
bkudiess force-pushed the bkudiess/flake-panel-tabs-overflow branch 5 times, most recently from ba8eeb2 to eb29ce2 Compare December 1, 2026 08:04
TabView brings its selected tab into view after selection and presenter resizes. The overflow proof selected the last tab and then called ChangeView(0); a late native bring-into-view of that tab scrolled the strip back to the end, so the increase arrow stayed disabled and the wait timed out. Select the first tab instead, so every native bring-into-view agrees with the start position.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bkudiess
bkudiess force-pushed the bkudiess/flake-panel-tabs-overflow branch from eb29ce2 to 866569e Compare December 1, 2026 08:24
@bkudiess
bkudiess merged commit 2346a4f into openclaw:main Dec 1, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant