Repository navigation
fix: keep workspace new chats local until the first send - #2336
Conversation
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 maintainer review before merge. What this changesThis PR keeps new workspace chats local until Send and promotes them after Gateway acceptance. Example: Select assistant main, open New Chat, then navigate Back without sending.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: main still creates sessions eagerly, and this maintainer-authored PR addresses that behavior. The previous recovery-copy finding is fixed; no new actionable code defect was established. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherWorkspace navigation selects a local draft; the composer coordinates placement, confirmed options and sending through the existing authenticated Gateway client, then updates conversation identity and navigation history. flowchart LR
A[Workspace New Chat] --> B[Local draft]
B --> C[Composer first send]
C --> D[Placement and options]
D --> E[Authenticated Gateway]
E --> F[Acceptance receipt]
F --> G[Conversation and navigation promotion]
Technical reviewBest possible solution: Retain local draft intent in the existing chat owners, defer Gateway mutations until Send, and promote navigation identity only after acceptance. Do we have a high-confidence way to reproduce the issue? Main's NewSessionAsync visibly invokes session creation before any message; opening New Chat and abandoning it follows that path, though this review did not execute the app. Is this the best way to solve the issue? The invariant is that opening a draft performs no Gateway mutation and acceptance binds one conversation identity; the patch uses the existing page, composer, placement and provider owners, and the simplification review found no clearly unnecessary production layer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ffe470e7d50. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource 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
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 19, 2026, 1:55 AM ET / 06:55 UTC (Revision 2). |
Resolve the timing baseline conflict without expanding allowances. Wait for the native disclosure header to be visible instead of a fixed settling delay. Co-authored-by: Copilot App <[email protected]>
The no-replay guard keeps a draft whose sessions.create reply was lost from ever sending again, but the message told users to check the session list before trying again. Say the draft cannot be sent and point to opening the chat from the session list or starting a new chat, in every supported locale. Co-authored-by: Copilot App <[email protected]>
|
@clawsweeper re-review
Validation on 29ab3dc: |
|
🦞👀 Re-review progress:
|
…ntics Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Starting a new chat in the main workspace creates a Gateway-backed session before the first message. Empty or abandoned drafts can therefore appear as unverified sessions and leave unused Gateway sessions behind, unlike the web flow.
User Impact
User impact: New workspace chats stay local until the first Send, so opening or abandoning a draft no longer creates a Gateway session. If a send outcome is uncertain before the session identity is known, the same retry is blocked to avoid duplicating a message; users can edit the message or start a fresh draft.
Why This Change Was Made
Draft placement and selected options remain local until Send. The first Send prepares the selected Gateway session, applies confirmed options, and promotes the draft only after Gateway acceptance. This change is scoped to the main workspace New Chat flow; the separate Companion mascot quick-chat flow is unchanged.
Evidence
The fixture UI scenario passed and verified that opening New Chat and navigating back and forward does not create Gateway sessions. A screenshot was captured locally. An independent read-only review confirmed the main workspace send path is gated on first Send; it did not cover the separate Companion flow or run tests. The inventory-bound interactive proof pool remains pending.
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: the main workspace New Chat UX changed. The local fixture test and screenshot passed, but the inventory-bound capacity-dependent pool run is not complete.Validation
The required build and test suites passed locally and on the supplied native Windows SSH host. The focused fixture UI test passed 1/1. The interactive proof pool is still pending. The initial focused-test attempts failed before test execution because GitVersion's child process could not resolve
dotnetfrom the curated PATH; reruns with explicit .NET and Git paths executed successfully..\build.ps1: passed; all five product builds succeeded. Documentation validation covered 74 Markdown files.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: local 5,912 passed, 29 skipped, 0 failed; Crabbox 5,913 passed, 28 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName!~SettingsManagerIsolationTests.OpenClawTrayDataDirRedirectsSettingsAwayFromRealAppData' --logger 'console;verbosity=minimal': local 6,853 passed, 0 skipped, 0 failed. The excluded test reads the real roaming-profile settings file. The remote Tray run also passed 6,853 with 0 skipped and the same test excluded.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --filter 'FullyQualifiedName~GatewayFixtureUiTests.NewChatIsLocalAndBackForwardDoesNotCreateGatewaySessions' --logger 'console;verbosity=normal': 1 passed, 0 failed.ssh, Windows normal mode, static host; runrun_0455604d534ae5071098ab31a7b5f1a0; no run URL was returned. Tested source was HEADa0a2a24ec1ddedf87ef26396ee4034661425e164plus its dirty changes (tracked diff SHA-1ebe5c044bcf2d48a7ae04fe805e112fe708ff9a1; untrackedChatDraft.csSHA-256B75953FE87E014603C6F3066332410CBDFAD0DEA5B7D28776B94608938AFE2C4), committed unchanged asb1abed08fc92b5c0f312ff430bbdba833a36964c.git diff --check: passed; Git reported a non-fatal LF-to-CRLF warning forTestTimingPatternBaseline.json.Real Behavior Proof
a0a2a24ec1ddedf87ef26396ee4034661425e164plus the dirty candidate recorded above; committed unchanged asb1abed08fc92b5c0f312ff430bbdba833a36964c.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --filter 'FullyQualifiedName~GatewayFixtureUiTests.NewChatIsLocalAndBackForwardDoesNotCreateGatewaySessions' --logger 'console;verbosity=normal'.Yes/No/N/A): No; the screenshot remains a local artifact and is not linked here.windows-winui-interactiveinventory-bound pool and a live production Gateway run are not complete. The separate Companion mascot quick-chat behavior is unchanged.Security Impact
Yes/No): NoYes/No): NoYes/No): Yes; the existingsessions.createcall is deferred until first Send in the main workspace flow. No new endpoint or permission scope is added.Yes/No): NoYes/No): NoYes, explain the risk and mitigation: session creation and option updates are response-confirmed; uncertain outcomes are kept from blind replay.Compatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoReview Conversations