Repository navigation
feat(workspace): sidebar session context menu, busy ring, and faster session switching - #1629
Conversation
…rchive, and fork Adds a right-click menu on Workspace chat sidebar session rows with web-chat parity actions (Pin/Unpin, Rename, Mark as unread/read, Archive, Fork, Copy session key/ID/Markdown, Delete) plus Windows extras (Reset, Compact, Export transcript), a collapsible Archived section, pinned-first ordering with pin glyph, and unread accent dot. - Shared protocol: SessionInfo pinned/pinnedAt/unread/markedUnreadAt/archived fields, SessionPatch label/pinned/unread/archived/expectedMarkedUnreadAt, sessions.create fork/forkFrom, ListArchivedSessionsAsync (detached rows), SessionTranscriptFormatter.FormatMarkdown; drift-guard snapshot updated. - Pure model: WorkspaceSessionMenu (entries, patches, fork request) with 9 focused tests; WorkspaceProjection pinned ordering, archived filtering, and archived-section projection. - WinUI: WorkspaceSessionMenuController (flyout, dialogs, dispatch, read acknowledgement) and WorkspaceArchivedSessionsSource (coalescing loader); WorkspaceWindow wires rows, archived toggle, fork reuse, and leave-on- archive/delete; ledger and editorconfig updated. Validation: build.ps1 all projects; Shared tests 4230/0; Tray tests 3899/2 (pre-existing VC++ runtime env gap, OPENCLAW0001); live-gateway UI proof of the main-session menu captured.
Project SessionRunState.IsWorking into WorkspaceSession (suppressed for archived rows) and render a 14px indeterminate ProgressRing in the unread dot slot while a session has an active run. The dot returns when the run ends if the session is still unread; screen readers announce Working alongside Unread.
… once per switch Session switches rebuilt every sidebar NavigationViewItem, including the selected one, inside SelectionChanged, and ChatPage.Initialize resolved the chat URL twice. Each resolution re-runs the managed-loopback credential provenance check (~500ms). Measured medians over 10+ switches: ui-idle 1117.8ms -> 598.3ms, sidebar 15.1ms -> 1.7ms, chat-url 2x509ms -> 1x532ms.
|
🦞👀 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 6, 2026, 2:29 PM ET / 18:29 UTC (Revision 11). ClawSweeper reviewWhat this changesAdds sidebar conversation actions, busy and unread indicators, stable ordering, asynchronous session switching, and archived-conversation restoration in Settings. Merge readiness⛔ Blocked before merge - 3 items remain The PR remains useful and distinct from main, but the previously reported fork lifecycle defect is still present. Passing validation and positive runtime evidence do not resolve that defect. Priority: P2 Review scores
Verification
How this fits togetherWorkspace presents Gateway conversations in the Windows Companion sidebar. Menu actions send authenticated Gateway requests, and accepted results update conversation lists and the retained chat surface. flowchart TD
A[Gateway conversation list] --> B[Sidebar ordering and indicators]
B --> C[Conversation menu]
C --> D[Authenticated Gateway request]
D --> E[Acceptance or rejection]
E --> F[Conversation navigation and chat]
E --> G[Settings archived conversations]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the approved sidebar and Settings design, with transcript forks creating independent conversations while preserving the parent lifecycle. Do we have a high-confidence way to reproduce the issue? Yes, by source: the sidebar Fork request serializes enabled command hooks, and the Gateway explicitly rejects active parents or emits an idle parent's terminal hook. No runtime reproduction was executed during this review. Is this the best way to solve the issue? The overall design is appropriate, but the fork payload is incorrect; explicitly disabling hooks for this action is the narrow repair. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 11523b485b08. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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 (10 earlier review cycles; latest 8 shown)
|
Clicking a sidebar session resolved gateway credentials synchronously inside NavigationView.SelectionChanged; the managed-loopback provenance check spawns wsl.exe (~530ms of the ~600ms ui-idle), and the native chat never uses the URL. - WorkspaceWindow commits history, sidebar, queued session and selection synchronously, then applies the chat on one coalesced Low-priority dispatcher turn (latest queued session wins) and signals content-ready after it. - ChatPage skips credential resolution for the native surface. The legacy WebView surface resolves on the thread pool, serialized across Hub and Workspace pages (NativeGatewayRuntime.Inspect denies concurrent callers) and dropped when a newer apply or unload superseded it. - Bootstrap-only credentials now reach the "pairing incomplete" message. Fixture proof (UIA-driven, before -> after): native handler median 2.4 -> 1.0ms, ui-idle median 112.4 -> 73.3ms; rapid clicks end on the last session in native and WebView modes; toggling legacy off mid-switch keeps the clicked session (the parent commit failed this). Live managed-gateway numbers not re-measured.
Session rows in the Workspace sidebar reordered whenever a session got input because WorkspaceProjection sorted by updatedAt. Rows now keep creation order: gateway createdAt newest-first, pinned rows still first (most recently pinned on top). Sessions without createdAt (older rows) freeze by first-seen rank, seeded by updatedAt so the first paint matches recency. LatestSessionKey still follows activity for agent selection. - SessionInfo.CreatedAt (Unix ms, write-once); parsed in PopulateSessionFromObject, omission keeps the known value - New WorkspaceSessionOrder ranker owned per WorkspaceWindow - WorkspaceProjection.Sessions takes the ranker; Visible filters only - snapshot json: createdAt in sessions.list responseFields
Real behavior proof: workspace sidebar keeps creation order (commit
|
Bind sidebar actions to their original Gateway connection, preserve chats on rejection, prune removed-session history, and constrain long session titles. Add response-ordering, lifecycle, layout, and authenticated fixture regressions. Co-authored-by: Copilot App <[email protected]>
Remove the Workspace archive dropdown while retaining the Archive context-menu action. Browse and restore archived sessions from Settings with response-confirmed operations and connection-lifetime fencing. Co-authored-by: Copilot App <[email protected]>
|
@copilot resolve the merge conflicts in this pull request |
Reconcile setup-chat recovery with confirmed session removal and asynchronous credential resolution. Preserve Settings archive navigation and both fixture validation paths. Co-authored-by: Copilot App <[email protected]>
Run bounded cleanup and Piper extraction fixtures in one non-parallel collection. Preserve every deadline, timeout, process-lifetime assertion, and production code path. Co-authored-by: Copilot App <[email protected]>


What Problem This Solves
Workspace chat lacked sidebar session actions and busy indicators, and session switching performed unnecessary synchronous work.
User Impact
User impact: users can manage active conversations from the sidebar, see active runs, and switch sessions without rebuilding every row or synchronously resolving native-chat credentials.
User-directed design: Workspace has no Archived dropdown. Archive remains in the session context menu; archived conversations are browsed and restored in Settings > Sessions > Archived. Unarchive waits for Gateway acceptance.
Review repairs preserve the selected conversation on rejected archive/delete requests, wait for matching acceptance before leaving, clear the last removed conversation's composer, and prevent Rename from targeting another Gateway after its dialog opens. Timeouts and connection changes require checking the outcome before retrying. Long titles leave room for busy/unread indicators.
Why This Change Was Made
Context menus provide pin, rename, read/unread, archive, fork, copy, reset, compact, export, and delete. Sidebar rows reconcile by key. Native chat avoids unnecessary credential resolution; legacy WebView resolution remains asynchronous, serialized, and generation-fenced.
fc914587adds confirmed patch/delete operations and captured client/transport-epoch checks. History owns removed-key pruning; existing ChatPage/chat-host owners perform teardown. Automatic read acknowledgements do not emit action toasts.83fee847moves archive browsing from Workspace to Settings andArchivedSessionsSource, with lazy loading and stale-client/reconnect/unload fencing.docs/ARCHITECTURE.mdrecords the closed Workspace responsibility.Conflict resolution:
a29a280bmerges main4895ed50. ChatPage now uses one lifecycle generation for setup recovery, pending WebView work, unload, and removal. Removal clears both setup presentation and its observer before disposing the host; verified setup recovery still preserves same-owner drafts and checks authority. Both fixture mutation and setup-handoff options are retained.CI repair:
f07279b2places bounded-process and Piper extraction tests in one non-parallel collection. CI exposed thread-pool contention in a 3-second deadline assertion (3.395 seconds); a local parallel run also missed the Piper fixture's PID-startup deadline. No timeout, assertion, production behavior, or test coverage was relaxed.Evidence
Current-head Build and Test run: SUCCESS, including CI Gate. GitHub reports head
f07279b2clean and mergeable. Core/CLI, tray/setup/integration, UI/accessibility, all three E2E jobs, release smoke, and MSIX validation passed. Release-only jobs were skipped as expected for a PR.Local final-head build, Shared, Tray, framework UI, and fixture integration passed. Interactive proof is partial: 30 external UI/accessibility tests passed, but four failed desktop/capture prerequisites. These failures are not treated as passes; details are below. The actual setup-warning recovery scenario passed with the draft retained and changed authority rejected.
Rubber-duck merge review found no blocking defects. Its source-contract precision concern was corrected by bounding the creation helper and asserting full setup invalidation before disposal. Earlier structured autoreview was blocked by CRLF patch inflation and is not claimed as clean. Historical timing measurements in
docs/implementation/session-context-menu.mdare not final-head benchmarks.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: sidebar menus, Settings archives, session lifecycle, busy/unread layout, and switching. Focused current-head proof is partial; complete pool coverage is not claimed.Validation
Head
f07279b2babc64a5718f959f646429693b2e875d, tree32873d63e300c07cc7df3760ca24d9d7f41d379b. Local Windows ARM64 commands usedOPENCLAW_REPO_ROOT, isolatedOPENCLAW_TRAY_DATA_DIR, andMSBUILDDISABLENODEREUSE=1for the final build/baseline sequence..\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger 'trx;LogFileName=merge-final-shared.trx'dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger 'trx;LogFileName=merge-final-tray.trx' --blame-hang-timeout 120sdotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 --filter 'FullyQualifiedName~GatewayFixtureUiTests|FullyQualifiedName~WorkspaceSessionLayoutTests|FullyQualifiedName~AccessibilityScanTests|FullyQualifiedName~SetupNativeChatWarningTests' --logger 'trx;LogFileName=merge-final-ui.trx'dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 --no-build --no-restore --filter 'FullyQualifiedName~SetupNativeChatWarningTests|FullyQualifiedName~WorkspaceSessionLayoutTests' --logger 'trx;LogFileName=merge-framework-ui.trx'dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 --no-build --no-restore --filter 'FullyQualifiedName~GatewayFixtureUiTests|FullyQualifiedName~AccessibilityScanTests' --logger 'trx;LogFileName=merge-external-ui.trx'dotnet test .\tests\OpenClaw.Tray.IntegrationTests\OpenClaw.Tray.IntegrationTests.csproj --filter 'FullyQualifiedName~GatewayFixture' --logger 'trx;LogFileName=merge-final-integration.trx'Real-app runs used
OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1, an isolated artifact directory, andOPENCLAW_GATEWAY_FIXTURE_APPpointing to the currentsrc\OpenClaw.Tray.WinUI\bin\ARM64\Debug\net10.0-windows10.0.22621.0\win-arm64\OpenClaw.Tray.WinUI.exe; screenshot runs also usedOPENCLAW_GATEWAY_FIXTURE_SCREENSHOTS=1.An earlier local build stalled and was stopped; a retry and the final-head full build succeeded. The initial merged-head CI run failed Core/CLI's process timing test; the linked final-head run passed after scoped test isolation. Existing generated-code obsolete-Icon warnings remain non-fatal.
Real Behavior Proof
f07279b2babc64a5718f959f646429693b2e875d.VerifiedSetupWarningRecoversAndRejectsChangedAuthorityInFullAppconsumes a synthetic verified setup handoff, types a draft, disconnects/reconnects, changes only the disposable signing identity, invokes recheck, and navigates back to ordinary chat.73d67c87ff5c4501ac5d09962e295251produced six inspected-state captures and the copied UI diagnostics below. Framework tests also cover new-binding/explicit-selection reset of removed state, ordinary Home retention, warning clearing, and title layout.Current-head
warning-proof.jsondiagnostics:{ "automaticRecovery": true, "authorityMismatchRemainedBlocked": true, "unsentDraftPreserved": true, "checkAgainInvoked": true, "ordinaryNavigationClearedWarning": true }Historical design reference at
83fee847, not current-head lifecycle proofThe earlier design head passed its archive/Settings/restore round-trip. These images document the retained design, not the blocked current-head keyboard scenarios.
Security Impact
Yes, explain the risk and mitigation: existing authenticated session patch/list/create/delete calls back these actions. Confirmed operations are bound to the original ready transport and matching response. Archive loading is lazy and connection-fenced. Setup recovery preserves full authority/provider checks. Fixture mutations are opt-in and in-memory; normal browse fixtures remain read-only.Compatibility and Migration
Review Conversations