Repository navigation
Conversation
Use non-animated ScrollView extent navigation instead of retaining an ItemsView bring target across history replacement. Workaround for microsoft/microsoft-ui-xaml#11865; related to openclaw#1167. Co-authored-by: Copilot <[email protected]>
|
🦞👀 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. |
|
Codex review: needs real behavior proof before merge. Reviewed September 28, 2026, 9:33 PM ET / September 29, 2026, 01:33 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch changes native chat tail navigation from targeting the last message row to scrolling to the current bottom extent, and updates a source guard and test-coverage documentation. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 7 items remain The workaround addresses a documented WinUI crash mechanism, but it is not ready to merge. Maintainer testing at the unchanged PR head found that automatic scrolling stopped before the final message on initial load and repeated session switches. A later repair and its successful fixture runs remain uncommitted, and its scroll-away race is unresolved. Priority: P1 Review scores
Verification
How this fits togetherThe Windows Companion receives chat history from a Gateway and renders it as virtualized native WinUI rows. Its tail-positioning controller moves the viewport toward the newest message when a session opens or a followed conversation grows. flowchart LR
A[Gateway chat history] --> B[Native timeline rows]
B --> C[Tail-positioning controller]
C --> D{Follow newest message?}
D -->|Yes| E[WinUI scroll view]
D -->|No| F[Keep reader position]
E --> G[Visible chat messages]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve crash avoidance while making final-row positioning converge as virtualized rows expand, with a bounded policy that keeps a reader's position during simultaneous scrolling and extent changes; then prove repeated switching and scroll-away behavior in native Debug and Release fixtures. Do we have a high-confidence way to reproduce the issue? Yes for the PR regression: a maintainer's isolated ARM64 Gateway fixture showed final rows offscreen at this unchanged head. The original WinUI crash has an upstream minimal reproduction, but this review did not reproduce that crash on current main. Is this the best way to solve the issue? No. Avoiding the retained WinUI anchor is a reasonable direction, but a one-time scroll to the current extent does not reliably reveal the actual final row after virtualized layout expands. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0844c0fa4035. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Global repo triage reviewed exact head Decision: NEEDS_HUMAN_TEST. Take confidence: 70%. Recommendation confidence: 99%. Risk: High. Static review found the workaround focused and existing guards preserved; exact-head CI is green. The remaining blocker is direct coverage of the reported trigger. Current runtime evidence covers one ARM64 selection but not repeated switching, and scroll-away behavior remains unverified. Complete a reliable ARM64 WinUI loop across repeated mixed-height session switches, confirm final-row visibility after every switch, and verify new arrivals do not pull a scrolled-up reader to the bottom. This requires |
|
Maintainer closeout at exact head |
|
Maintainer native follow-up at exact head Four short transitions remained responsive, which does not establish sustained crash avoidance. A manually scrolled-up reader stayed at rows 19-22 after a synthetic |
|
Maintainer fixture comparison at unchanged PR head We attempted one bounded manual wide-scroll comparison, but the accessible 240-session picker popup did not activate the selected item and its separate PopupHost could not be inspected safely, so the UIA percent-scroll failure remains unclassified. No timer, layout loop, fixture assertion weakening, further form submission, or source push was made. The original contributor branch is unchanged and the four-file candidate remains uncommitted locally. Please keep this PR held until the 240-row Debug and production-shaped Release fixture passes with final-row visibility and scroll-away intact; I am happy to collaborate on a narrower tested fix. The disposable app/server/profiles and integration checkout were stopped and removed. |
|
Maintainer revalidation of #1407 (fix(chat): work around WinUI session-switch crash) against main The prospective tree Still held for correctness: Two final read-only reviewers independently identified an introduced scroll-away race in the local repair. When the extent shrinks during a simultaneous upward reader scroll, |
|
Closing in favor of the workaround in Reactor. |
Summary
This is an application-side workaround for microsoft/microsoft-ui-xaml#11865, not a fix in WinUI.
Repeated chat-session switching can recycle a row retained by
ItemsView.StartBringItemIntoView. A later native anchor request then rejects that row withE_INVALIDARG, terminating the app. The upstream issue includes the minimal reproducer and native failure details.Replace automatic tail navigation with non-animated
ScrollView.ScrollTo, using the current horizontal offset and scrollable height. This avoids the retained bring-into-view target. Keep the existing tail identity, generation, loaded-state, queue, and bottom-follow guards unchanged. Add a source regression guard against reintroducing the affected API and document the runtime proof path.Ownership remains in
InitialTailPositionerinReactorItemsViewScrollController.cs. There is no new realization logic, layout loop, timer, or exception suppression.Related: #1167. This targets the confirmed crash; it does not establish that the separately reported sustained UI-thread hang is resolved.
Required proof pools
windows-11-arm64: native ARM64 build and runtime validation on the architecture where the crash was investigated.windows-winui-interactive: chat session navigation and visible timeline behavior.Validation
.\build.ps1: passed, including repository documentation checks.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,998 passed, 34 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,976 passed, 0 failed.python .agents\skills\autoreview\scripts\autoreview --mode localexited 9009 because Python is not installed; Codex is also unavailable on PATH. No clean Codex review is claimed.Real behavior proof
The developer confirmed the original ScrollView workaround worked. The PR preserves that small workaround.
The final ARM64 Debug build was also launched with isolated tray settings against a loopback-only synthetic gateway serving two 77-message, mixed-height histories. After selecting Workaround two, the app remained responsive, the composer was visible, and an inspected screenshot showed the final row completely:
The locally built WinApp CLI was used for UI automation, screenshots, ETW recording, and
perf analyze. No private chat content, credentials, dumps, or raw traces are published.Not verified / blocked