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. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 3:52 AM ET / 07:52 UTC (Revision 4). ClawSweeper reviewWhat this changesPreserve newly created chat sessions across delayed updates, show their usable empty conversation, and add selection and first-message routing regression tests. Merge readiness✅ Ready for maintainer review This fix remains necessary on current main. The previous proof follow-up is resolved, and the reviewed patch has no blocking correctness or security findings. Priority: P2 Review scores
Verification
How this fits togetherCompanion’s native chat combines Gateway session snapshots with local conversation selection. The selected conversation feeds the session picker, timeline, and message composer. flowchart TD
A[User sends new-session command] --> B[Gateway returns session key]
B --> C[Pending local selection]
D[Gateway session snapshots] --> E{Selected session materialized?}
C --> E
E -->|No| F[Temporary empty conversation]
E -->|Yes| G[Materialized conversation]
F --> H[Session picker and message composer]
G --> H
Before mergeNone. 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. Technical reviewBest possible solution: Keep selection lifetime in the existing chat root, using actual session materialization to retire temporary state while preserving normal navigation and composer routing. Do we have a high-confidence way to reproduce the issue? Yes, from source: create a session while Main exists, render its temporary thread, then render another snapshot before materialization. Current main clears pending selection on the first render and permits fallback on the next; this review did not execute the app. Is this the best way to solve the issue? Yes. The patch repairs the existing selection policy and empty-state eligibility without duplicating Gateway creation, picker insertion, or message dispatch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3c43751b2bac. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Friendly maintainer ping: PR #1420 is now ClawSweeper-ready for maintainer review, with live WinUI proof and the accessibility gate passing 22/22. The head remains unchanged at The remaining GitHub Actions runs still show |

Fixes #1411.
What Problem This Solves
Fixes an issue where users sending
/newin Companion would return to Main and could not use the newly created empty conversation, despite successful Gateway session creation.Why This Change Was Made
Keep the selected new session pending across stale snapshots until its real thread materializes or navigation supersedes it. Allow its compose-only conversation to settle into the existing Empty presentation even when Main exists. Existing picker insertion and composer routing remain in place.
The root retains ownership of selection and timeline composition; the existing pure
ChatLifecycleSelectionPolicyowns the tested retention and compose-only eligibility decisions. This PR covers Bug A only.Required proof pools
windows-winui-interactive: current-head/newselection, chat-area picker visibility, usable Empty presentation, and first-message routing through a real Gateway. Developer-reported live chat proof passed under the/resetpreparation described below. The posted screenshot/proof comment supports the live result. The declared accessibility gate passed: 22/22 tests, exit 0; details and TRX below.Validation
./build.ps1: passed, all five build targets including WinUI.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 3,996 passed, 36 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 2,985 passed, 0 skipped, 0 failed.FullyQualifiedName~ChatLifecycleSelectionPolicyTests|FullyQualifiedName~SendAsync_AfterNew_FirstMessageTargetsPendingComposeOnlySession): 9 passed, 0 failed; also included in the final Tray run.git diff --check: passed.The final build and suites ran sequentially. Earlier native-runtime failures were resolved by installing the required C++ runtime components; an existing voice-disposal timeout passed on recheck and in the final full suite. Local validation used an isolated local clone with all four changed files verified identical to the working patch.
Regression coverage includes repeated stale snapshots, fallback suppression, compose-only welcome eligibility with Main present, materialization, navigation away, unchanged unrelated compose-only behavior, and first-message routing through the controller seam. A temporary fault-injection run restoring premature pending retirement and the old welcome restriction produced 3 failures out of 9 tests. The fixed source was restored before final validation.
Rubber-duck review: independent source review found no actionable correctness, scope, or ownership issues. Final diff is limited to two source files and two test files.
Current-head WinUI accessibility gate (2026-09-15)
Ran in the existing isolated local PR checkout at
c5d9d2a0dd7a05d51a67947979dd6016c91a3a82, using the existing Windows x64 environment:dotnet testand the proof wrapper exited 0. Tests ran in real Windows processes with fixture-owned isolated tray data.NameIsInformative,NameExcludesControlType,NameExcludesLocalizedControlType,SiblingUniqueAndFocusable; ConfigPage additionally excludesLocalizedControlTypeNotCustom.TestResults\ProofPools\winui-accessibility\winui-accessibility.trx. Published winui-accessibility.trx. The linked copy redacts Windows user, machine, and user-profile paths; test outcomes are unchanged. Published copy SHA-256:23ff82bf78952c541c816d653382d2221312aa44a85da2e78b058fd9905f0631.actions/upload-artifactfor its own runs; this local TRX is published separately and is not represented as a CI artifact. No generated artifacts were committed.Real behavior proof
Developer-reported live Windows WinUI proof on current head
c5d9d2a0dd7a05d51a67947979dd6016c91a3a82, using the isolated PR build connected to the real Gateway.Launch:
./run-app-local.ps1 -NoBuild -Isolated -AllowNonMain.Preparation: the developer first issued
/reseton Main, then/new, to avoid interference from the separately reproducible state-dependent WinUI crash. This preparation is part of the proof conditions.Observed results:
/newsucceeded and the newly created session was immediately selected.PR1420 LIVE PROOF, was routed to the newly created session.This verifies the reported Bug A flow under the stated preparation. These are the developer's live observations; they are not an automated UI test result. The posted current-head screenshot/proof comment shows the selected conversation and live-proof reply; the earlier empty state remains developer-reported. The accessibility gate passed as recorded above. A separate explicit-navigation-away live proof has not been reported as run.
Separate pre-existing WinUI crash (out of scope)
The developer also reproduced the state-dependent WinUI crash on the exact unmodified base commit
bd9ce43b4d9c63fa90196a6a33b1c1be409850b2, built with the same environment/configuration in a separate isolated worktree and tested against the same Gateway. This establishes that the crash is not introduced by this PR. It can interfere with/newtesting depending on the starting session state; the successful proof above followed/reseton Main.The earlier isolated PR crash recorded
System.ArgumentException: The parameter is incorrect(0x80070057) and WinUI fail-fast0xc000027b. Its debugger failure bucket/hash matched the developer's pre-PR crash dump. The minidump did not retain the original stowed exception stack, so no specific native failing call is claimed from that dump.The crash investigation remains separate from Bug A. No crash workaround or other code change is included in this proof update.
Local build environment: Windows x64, .NET SDK 10.0.401, Windows SDK 10.0.26100.0, with the previously installed Visual Studio Build Tools C++ runtime components used by native speech tests.