Repository navigation
fix(chat): clear stale setup warnings after recovery - #1624
Conversation
Clear obsolete setup warnings, recheck on connection recovery, preserve the verified session, and keep authority mismatches blocked. Add localized recheck guidance and full-App fixture proof with matching isolated data roots. Co-authored-by: Copilot App <[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 changes before merge. Reviewed October 6, 2026, 2:22 AM ET / 06:22 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR clears obsolete setup warnings in Companion Chat, preserves drafts through temporary outages, cancels hidden voice capture, and adds localized recovery guidance and native regression coverage. Merge readiness⛔ Needs changes before merge - 1 item remains This remains useful work absent from current main. The follow-up preserves drafts and session choice, and the inspected native proof supports recovery and identity rejection. No blocking source defect was found; required validation closeout remains incomplete. Priority: P2 Review scores
Verification
How this fits togetherCompanion Chat receives a verified conversation target from onboarding and observes the existing Gateway connection manager. It checks current ownership before showing the conversation and controls warning, composer, and voice-capture lifetime. flowchart TD
A[Verified setup target] --> C[Chat recovery presentation]
B[Gateway connection changes] --> C
C --> D[Current ownership and provider checks]
D --> E[Restore conversation and draft]
D --> F[Hide or block composer]
G[Conversation navigation] --> H[Clear setup binding and warning]
H --> C
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep recovery within the existing Chat and connection owners, retaining drafts only after current ownership checks and clearing setup state when the user changes conversations. Do we have a high-confidence way to reproduce the issue? Yes, source provides a clear path: setup-bound Chat encounters an outage or leaves its verified conversation, while current main retains obsolete warning state and can dispose or reseed the composer. No current-main runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? Yes, the patch uses focused presentation and lifetime owners while preserving the existing connection and receipt boundaries; the inspected native recovery and rejection evidence supports that approach. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f03f1cab69aa. 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
HistoryReview history (4 earlier review cycles)
|
Scoped maintainer triage verdictTAKE_AFTER_CHECKS. Take confidence: 85%. Recommendation confidence: 90%. Reviewed head: Independent Claude Opus 5.5 and GPT-6 Astra reviews found no confirmed blocking source defect. The recovery owner preserves existing Gateway/receipt authority, fences stale callbacks with subscription identity and page generations, and revalidates the bound identity/session before restoring chat. This is a useful, bounded repair rather than a new connection or receipt-settlement path. Evidence credited
The triage reviewers did not rerun those suites or independently inspect screenshot pixels. These are credited author-provided receipts and source-reviewed tests, not new executions by this triage. To reach 90%+ take confidence
Owner: bkudiess with the landing maintainer. No speculative source rewrite or unrelated hardware proof is requested. This verdict is not merge authorization. |
Invalidate setup binding before composer session navigation, retain the verified host across transient outages, and fence voice capture while hidden or unloaded. Add controller, mounted WinUI, and full-app fixture regressions. Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes stale setup warnings after Chat recovers or changes conversations, including reconnects that discard an unsent draft or restore a conversation the user left with
/new.User Impact
Chat clears obsolete warnings automatically and preserves the current conversation, draft, and attachments through temporary same-client outages. Genuine identity mismatches remain blocked. Hidden or unloaded Chat cancels active voice capture and rejects late transcripts. No reinstall, credential reset, or migration is required.
Why This Change Was Made
Follow-up commit
3f1b7486782436c5b53d491e53ea0ad3c8e804eaaddresses the Hanselman review:/newinvalidates setup restoration before its asynchronous operation, successful root selection updates the page, and transient unavailability retains rather than disposes the verified composer. Full authority checks and exact provider association remain required before reuse. Voice activation waits for the visible, ready surface.Ownership remains with
ChatPagefor WinUI application,SetupNativeChatPresentationfor warning/target state,SetupNativeChatRefreshfor observing the existing connection manager, and the composer controller for draft/capture lifetime. The launcher remains the sole receipt-settlement owner. The architecture ledger and regression coverage were updated together.The original fixture-only local-root guard correction is retained: modern and legacy roots must resolve to the same effective setup directory. Normal installed-app behavior, credential precedence, setup receipt/expiry/retry semantics, and transport are unchanged.
Evidence
Current-source native Windows ARM64 proof passed: 29 focused integration tests, 10 mounted WinUI tests, and 2 separate full-app/resolver tests. The real Companion app connected to an authenticated synthetic Gateway, recovered from an actual WebSocket disconnect with its unsent draft intact, rejected a changed persisted signing identity, remained blocked after Check again, and cleared obsolete warnings on ordinary navigation. All six owned-window PNGs were visually inspected and matched their SHA256 sidecars.
These are post-fix failure/recovery states, not old-binary before/after captures. Gateway/model replies are synthetic; no live-provider inference claim is made.
/newand voice lifetime behavior are covered by controller and mounted-page tests, not claimed as real-provider end-to-end proof.Connection interrupted: composer hidden, draft retained
Automatic recovery: same unsent draft
Genuine identity mismatch remains blocked
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: actual setup-bound Chat warning, draft recovery, and blocked-authority states captured in an isolated native Windows ARM64 Companion app.Validation
Commands ran with
OPENCLAW_REPO_ROOTset to this worktree and isolated tray data roots. Test projects were restored/built before--no-restoreruns..\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.IntegrationTests\OpenClaw.Tray.IntegrationTests.csproj --filter "FullyQualifiedName~GatewayFixtureProfileTests|FullyQualifiedName~GatewayFixtureRunTests"dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-build --no-restore -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --filter "FullyQualifiedName~SetupNativeChatWarningTests|FullyQualifiedName~MountedReactorChatDisposalProofTests"dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-build --no-restore -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --filter "FullyQualifiedName~VerifiedSetupWarningRecoversAndRejectsChangedAuthorityInFullApp|FullyQualifiedName~FixtureGuardAndActualSetupResolverUseTheSameEffectiveLocalDirectory"dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~MarkdownParserFuzzTests"Closeout caveats: later unfiltered Shared repeats hit an unrelated parser timing guard: 30k list items took 689ms, 662ms, and 592ms against the existing 500ms threshold. The last run with
-- xUnit.MaxParallelThreads=1had 4,228 passed, 34 skipped, 1 failed. The complete parser class passes in a separate process without changing its assertions. One earlier repeat also hit file-watcher/telemetry timing failures; all three initially failing tests passed together when targeted. No unrelated production code or thresholds were changed, and the latest full Shared run is not represented as green.One combined mounted/full-app test process aborted in a WinUI COM finalizer (
0xC0000005) after 11 passes. Running the mounted and full-app groups in separate processes passed 10 and 2 respectively. The abandoned owned app and disposable profile were cleaned up.Final app-native rubber-duck review found no remaining actionable scoped bugs after fixes. Structured command
python .agents\skills\autoreview\scripts\autoreview --mode commit --commit 3f1b7486782436c5b53d491e53ea0ad3c8e804eaproduced a valid 44,330-character bundle but the Codex engine exited 1 without a structured verdict. The earlier local-mode attempt was rejected for a normalized diff-size discrepancy. Neither command is claimed as a clean review. The PR is open and non-draft; new-head CI is running and must be evaluated independently of the previous green head.Real Behavior Proof
3f1b7486782436c5b53d491e53ea0ad3c8e804ea, treed1fd188e84819c258d07e7970f89f0e0627d50f8. Proof was built before committing, from parent9a651394430a96807c8226ca750c5f750f871626plus the exact 12-file patch below. All source hashes were rechecked immediately before commit; the binary version metadata still embeds the parent SHA.OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1,OPENCLAW_GATEWAY_FIXTURE_SCREENSHOTS=1, andOPENCLAW_GATEWAY_FIXTURE_APPpointing to the worktree ARM64 executable. Perform verified--post-setup-launch, type an unsent draft, close fixture sockets, wait for recovery, replace only the disposable persisted identity, reconnect, invoke Check again, then navigate away and back.a3cb8aa6a2444dc7ae96e56331675553; App DLL SHA256B2B830AC0612577A061468E411C0DEC7D3B7FEDA7FB1ECD46A88FE562BB91EB2; EXE SHA25647F6E8A88F7C0AC6886DE991C832C65F2A47564E306D4F704317C8FB15403E02; six UIA-asserted full-window captures. Three representative frames are embedded above.Exact follow-up source and screenshot manifest (SHA256)
All other source is the unchanged parent commit. Paths are repository-relative. Hashes describe the actual Windows working files used for proof, not Git blob identifiers.
docs/ARCHITECTURE.md8D8AEB60004634F3CD14EF9381C28C0182698E8BD40409E3E452AA71B41EF54Fdocs/GATEWAY_FIXTURE_TESTING.mdDF79928E1ED6CA1ACDFD9696354632F0FAFD9C93E18F767909870C42B0F27D69src/OpenClaw.Tray.WinUI/Chat/ChatComposerController.csD202C6F4C2A9B66B011FD0560BCC9EBB3B19BBF0BD06FA3AAA9F5C13354B8E93src/OpenClaw.Tray.WinUI/Chat/ChatComposerHostActions.cs6565BF5ED3DA852E8DD21D804C3FFEC66E8D7CB4031744B72731B07DBFC1F7CAsrc/OpenClaw.Tray.WinUI/Chat/ReactorChatHostExtensions.cs53C91DDF8AC8D734D7991B70BA3140FC02293A18B74B84B8A00C3FEF3FC5F610src/OpenClaw.Tray.WinUI/Pages/ChatPage.xaml.cs4690C62ACA63AADAB7E3B2F4C38CAB630A3266CBC97DA6495D3F375C6F26C9D9src/OpenClaw.Tray.WinUI/Presentation/SetupNativeChatPresentation.cs74B216F66AE889187908EA4DB6E5E20583B7ED58FD0B422C81879DCB6B2B566Btests/OpenClaw.Tray.Tests/ChatComposerControllerTests.csC6D5BBB8C23BE7E29562FA711BCBFA773DF5B92359B6D597652D06721174352Ftests/OpenClaw.Tray.Tests/SetupNativeChatPresentationTests.cs887F08920FB9CE8C76ED96FB61956B7355655BDD3F212026D76BEE1D3D202885tests/OpenClaw.Tray.UITests/GatewayFixtureWarningUiTests.cs28ECEA2F0B1C4F303A0788AE7EB13E5581010FA80A58E47099A326F90696B267tests/OpenClaw.Tray.UITests/MountedReactorChatDisposalProofTests.cs07E1D8DD6942B86FF4B5E49711D428268E6C2C20E9637967F3748FBCB312F5D9tests/OpenClaw.Tray.UITests/SetupNativeChatWarningTests.cs5156EF02FB6457E46E1AE5073DCAA8104F01452FC76937BF445CE3980E4C158802-connection-unavailable.pngE481C1888118FF492EB034F8F029E97620613E2955F8499D538BCD61F6CC41E503-automatic-recovery.png23C87C4D9A9E8BF04F3DFFA6E544A4515A865AD32693B951FC749C8BBA60D1A904-authority-blocked.pngA4D7141F34D5BD2C640CE57E135C7BB985CE8D66D0DAB3962777D632AE1502D3Security Impact
Yes, explain the risk and mitigation: no bypass of Gateway, endpoint, signer, persisted-identity, or session checks. Page recheck cannot reconnect, repeat inference, or settle/replay receipts.Compatibility and Migration
OPENCLAW_TRAY_LOCALAPPDATA_DIRand a matchingOPENCLAW_TRAY_LOCAL_DATA_DIR; legacy fixture launches without the modern root remain supported.Maintainer edits: same-repository branch; maintainers retain repository write access. GitHub's fork collaboration toggle does not apply.
Review Conversations