Repository navigation
fix(chat): restore the tail when switching conversations - #1438
shanselman wants to merge 2 commits into
Conversation
Scope the native ItemsView and scroll-controller decorator to session and timeline generation. Keep same-session scrolling, virtualization, and row-targeted navigation unchanged. Add mounted native regression and lifecycle proof with isolated XAML resource setup. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 8346e696-3092-49d5-98be-80b5cae59048
Use the ScrollView operation correlation for manual reader scrolling after all natural-tail assertions. Keep token/revision checks strictly about reconciled native identity and supersede their pending navigation before checking a new session. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 8346e696-3092-49d5-98be-80b5cae59048
|
🦞👀 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: blocked before merge. Reviewed October 5, 2026, 6:54 PM ET / 22:54 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch recreates the native chat list when the conversation or timeline generation changes and adds mounted scrolling tests, test-host XAML support, and testing guidance. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 5 items remain Keep open for the collaborator-led investigation, but block landing the withdrawn candidate. The controlled comparison reports worse cached-session tail restoration, and neither current main nor the related dependency work establishes a fix. Priority: P2 Review scores
Verification
How this fits togetherThe native chat timeline receives conversation history and streaming updates from the chat provider. Its virtualized message list and scroll controller determine which messages remain visible when conversations change or new content arrives. flowchart LR
A[Conversation selection] --> B[History and timeline updates]
B --> C[Native chat timeline]
C --> D[Session and generation identity]
D --> E[Virtualized message list]
E --> F[Layout and tail positioning]
F --> G[Visible conversation messages]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Restore reliable row-targeted tail positioning across cached-session returns while preserving virtualization and scroll-away behavior, using the guarded real-app fixture to validate the actual final message. Do we have a high-confidence way to reproduce the issue? Yes, a concrete investigation path exists through guarded Release A-to-B-to-A selection and natural message-240 visibility. The historical failure is intermittent, and this read-only review did not reproduce it on current main. Is this the best way to solve the issue? No. The isolated comparison rejects the session-key approach; trace the real application's lifecycle before selecting another production change. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3eb2001e6ab6. 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 (4 earlier review cycles)
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Related: #1437. Follow-up context: #1424.
Status: rejected candidate, investigation continues
Do not merge. The one-key candidate at
4101ee5d21e0cfbe031e4956fe4ca10b27598003performed worse in the controlled, guarded real-application comparison. It is not a verified fix. Earlier mounted-host passes and clean source review are insufficient and do not override these results.What Problem This Solves
The target bug is returning to a populated conversation and seeing its first messages instead of the previously visible tail. The bug predates this patch; no known-good version or introducing commit has been established, so it is not yet a confirmed regression window.
Latest real behavior proof
Predeclared budget: five sequential non-Dev Release runs per arm, alternating A/B. Both used the same unchanged
GatewayFixtureUiTests.SessionPickerSwitchesRealHistoriesAndShowsMessage240AtBothWidthstest, scenario, natural message-240 assertion and timeout. There was no manual scrolling before the natural-tail gate and no retry-until-green.afc3e9f7e616bde264ed78490e6738d0c1bbbd444101ee5dAll five B failures followed the first A selection and subsequent B history request. The unchanged test only selects B after the first A natural-tail assertion passes. The failure is therefore on return to the cached long conversation, not its first selection.
The comparison used separate short-path owned worktrees and normal self-contained Windows App SDK app outputs. Each run's actually loaded
Microsoft.UI.Xaml.dllandMicrosoft.UI.Xaml.Controls.dllpaths and SHA-256 hashes matched that arm's output. Both used the same native binaries:B241F72BFC9460E823D8A122FBDBC2E2D7AC6BA60B9E5BF981E9B5054D4555B5BFB7EE4E86F00B9365FA50DECA8D30BF32C71ACAA536779D20DCF17AE32EC725Both runtime configurations retained
OpenClaw.GatewayFixtureIsolationVersion=1andSystem.Diagnostics.Debugger.IsSupported=false. This is explicitly combined harness+candidate proof, not an untouched fix-PR-head full-app run. Neither PR base was changed and the combined overlay was not pushed.Every outcome, screenshot, Gateway trace, binary/runtime hash and exact command is retained under the coordinating session's
fixture-comparisonartifacts (contract.json,provenance.json,results.json, anda1throughb5). These identifiers refer to retained local artifacts, not public download links. Earlier MAX_PATH build failures are separate setup evidence and did not consume or alter the five UI runs per arm.Why the original candidate is being withdrawn
The candidate keyed the outer ItemsView/scroll-controller decorator by session and timeline generation. The controlled real-app results reject the apparent improvement from the exploratory mounted tests. Next work is bounded to comparable Request/Update/mount/disposal tracing in the actual guarded application before proposing another product change.
The exploratory VSTest host also exposed independent initialization and runtime mismatches, including loading installed 2.5.1 native binaries instead of the app's bundled 2.4.0 payload. Those experiments and their failures are preserved separately. They are not evidence that the product bug is fixed, and speculative controller/test-host/runtime workarounds are not being folded into the landing patch.
Required proof pools
windows-winui-interactive: populated-session return, actual final-message visibility, native lifetime, streaming and scroll-away behavior.Validation
Historical validation of head
4101ee5d, before the decisive comparison:.\build.ps1: passed, all five projects and documentation gate.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,984 passed, 32 skipped.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,978 passed.These results do not make the current candidate merge-ready. The unchanged real-app natural-tail gate is the decisive failed check.
Security and scope
The fixture guards remained enabled. No installed pairings, credentials, autostart, toast registration, WSL Gateway or default MCP port were touched. No parent-checkout edits and no merge were performed. The separately published harness is #1439 (feat: explore and test the app without a live Gateway); its assertion is unchanged.
Fixes: #1437