Skip to content

feat(workspace): sidebar session context menu, busy ring, and faster session switching - #1629

Merged
karkarl merged 12 commits into
openclaw:mainfrom
larroy:feat/sidebar_context_menu
Oct 6, 2026
Merged

karkarl merged 12 commits into
openclaw:mainfrom
larroy:feat/sidebar_context_menu

Conversation

@larroy

@larroy larroy commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

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.

fc914587 adds 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. 83fee847 moves archive browsing from Workspace to Settings and ArchivedSessionsSource, with lazy loading and stale-client/reconnect/unload fencing. docs/ARCHITECTURE.md records the closed Workspace responsibility.

Conflict resolution: a29a280b merges main 4895ed50. 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: f07279b2 places 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 f07279b2 clean 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.md are not final-head benchmarks.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required 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, tree 32873d63e300c07cc7df3760ca24d9d7f41d379b. Local Windows ARM64 commands used OPENCLAW_REPO_ROOT, isolated OPENCLAW_TRAY_DATA_DIR, and MSBUILDDISABLENODEREUSE=1 for the final build/baseline sequence.

Command Result
.\build.ps1 Passed, all 5 projects
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger 'trx;LogFileName=merge-final-shared.trx' 4,260 passed, 34 skipped, 0 failed; no suite-wide serialization override
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger 'trx;LogFileName=merge-final-tray.trx' --blame-hang-timeout 120s 3,990 passed, 0 skipped, 0 failed
dotnet 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' Aborted in ARM64 COM finalization after 12 passing tests; not a passing run
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' Separate process: 12 passed, 0 skipped, 0 failed
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' Separate process: 30 passed, 4 failed, 0 skipped; three foreground-activation denials and one blank compositor capture
dotnet test .\tests\OpenClaw.Tray.IntegrationTests\OpenClaw.Tray.IntegrationTests.csproj --filter 'FullyQualifiedName~GatewayFixture' --logger 'trx;LogFileName=merge-final-integration.trx' 31 passed, 0 skipped, 0 failed

Real-app runs used OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1, an isolated artifact directory, and OPENCLAW_GATEWAY_FIXTURE_APP pointing to the current src\OpenClaw.Tray.WinUI\bin\ARM64\Debug\net10.0-windows10.0.22621.0\win-arm64\OpenClaw.Tray.WinUI.exe; screenshot runs also used OPENCLAW_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

  • Environment tested: Windows ARM64, .NET SDK 10.0.401, Windows SDK 10.0.26100.0, WebView2 154.0.4258.62; isolated real WinUI app and authenticated synthetic loopback Gateway. No real user conversations or model provider were used.
  • PR head or commit tested: f07279b2babc64a5718f959f646429693b2e875d.
  • Exact steps or command run: the external UI command above. VerifiedSetupWarningRecoversAndRejectsChangedAuthorityInFullApp consumes a synthetic verified setup handoff, types a draft, disconnects/reconnects, changes only the disposable signing identity, invokes recheck, and navigates back to ordinary chat.
  • Evidence after fix: that test passed. Run 73d67c87ff5c4501ac5d09962e295251 produced 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.
  • Observed result: recovery clears the obsolete warning and retains the unsent draft; changed authority hides the composer and remains blocked on recheck; ordinary navigation clears the binding. A current-head Workspace capture also shows no Archived dropdown.
  • Screenshot or artifact links verified? Yes for the historical GitHub image links below. Current-head recovery evidence is copied from the successful fixture run.
  • Not verified or blocked: current-head archive/delete keyboard proof and Settings restore round-trip were blocked by denied foreground activation; assistant-selection capture was rejected as blank. These guards were not bypassed. Combined local ARM64 framework/external execution aborted in COM finalization; framework-only retry passed. Isolated live Gateway compatibility, actual two-Gateway Rename-dialog visual proof, exhaustive action coverage, and final-head switching benchmarks remain outside this proof. Green hosted CI does not replace the complete interactive proof pool.

Current-head warning-proof.json diagnostics:

{
  "automaticRecovery": true,
  "authorityMismatchRemainedBlocked": true,
  "unsentDraftPreserved": true,
  "checkAgainInvoked": true,
  "ordinaryNavigationClearedWarning": true
}

Historical design reference at 83fee847, not current-head lifecycle proof

The earlier design head passed its archive/Settings/restore round-trip. These images document the retained design, not the blocked current-head keyboard scenarios.

Workspace sidebar without an Archived dropdown at 83fee847

Settings archived conversation and Unarchive action at 83fee847

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? Yes
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is 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

  • Backward compatible? Yes; existing send-only APIs remain available and unsupported confirmed operations fail closed.
  • Config or environment changes? No user configuration changes.
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A. Browse archives in Settings > Sessions rather than Workspace.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

larroy added 6 commits October 3, 2026 16:13
…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.
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed October 6, 2026, 2:29 PM ET / 18:29 UTC (Revision 11).

ClawSweeper review

What this changes

Adds 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
Reviewed head: f07279b2babc64a5718f959f646429693b2e875d

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong runtime evidence and passing reported validation support the work, but the unresolved fork lifecycle defect blocks landing.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Positive real-app evidence covers sidebar rendering and switching, and matching final-head diagnostics exercise ChatPage recovery against an authenticated loopback Gateway, preserving drafts and rejecting changed identity. Historical images retain their attribution; current archive/delete keyboard scenarios have explicit desktop blockers. Fork compatibility remains a separate source-proven defect. No local stored-data contract changes require migration proof.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Positive real-app evidence covers sidebar rendering and switching, and matching final-head diagnostics exercise ChatPage recovery against an authenticated loopback Gateway, preserving drafts and rejecting changed identity. Historical images retain their attribution; current archive/delete keyboard scenarios have explicit desktop blockers. Fork compatibility remains a separate source-proven defect. No local stored-data contract changes require migration proof.
Evidence reviewed 10 items Introduced fork request: The introduced ForkRequest sets parent, agent, fork, and active-prefix selection, but inherits EmitCommandHooks=true and leaves SucceedsParent unset. The production serializer emits that hook setting.
Affirmative Gateway dependency: The protocol snapshot explicitly identifies openclaw/openclaw's Gateway schema as authoritative, and this PR adds sessions.create fork/forkFrom wire fields consumed by that Gateway.
Gateway lifecycle contract: The actual Gateway creation owner rejects active parents when emitCommandHooks=true regardless of last-completed selection (lines 514-525). With an idle parent, enabled hooks and omitted succeedsParent emit the parent's terminal session-end hook (lines 1163-1179).
Findings 1 actionable finding [P2] [P2] Disable command hooks when building transcript forks
Security None None.

How this fits together

Workspace 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]
Loading

Before merge

  • [P2] Disable command hooks when building transcript forks (P2) - This still-unfixed prior finding was discovered late in an earlier cycle; the builder is unchanged since the reviewed 83fee847 head. The request inherits EmitCommandHooks=true and leaves SucceedsParent unset. The Gateway rejects active parents whenever hooks are enabled, so forkFrom="last-completed" cannot make busy-session Fork succeed. For an idle parent, it emits the parent's terminal session_end hook even though Fork should preserve that conversation. Set EmitCommandHooks=false here and assert the serialized active and idle requests.
  • Resolve merge risk (P1) - Fork currently rejects busy conversations and emits an idle parent's terminal lifecycle hook, which can mislead session-lifecycle consumers.
  • Complete next step (P2) - Set EmitCommandHooks=false for transcript forks, add builder-to-wire active/idle regressions, and record required validation plus Gateway parent-preservation evidence on the repaired source.

Findings

  • [P2] [P2] Disable command hooks when building transcript forks — src/OpenClaw.Tray.WinUI/Presentation/WorkspaceSessionMenu.cs:105-110
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +1,762 net lines; tests +1,124 net lines Growth is explained by the menu, archive browsing, switching changes, and regression coverage.

Merge-risk options

Maintainer options:

  1. Preserve the parent when forking (recommended)
    Disable command hooks specifically for transcript forks and verify active-prefix creation and idle-parent lifecycle preservation.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Set EmitCommandHooks=false in WorkspaceSessionMenu.ForkRequest without changing the shared creation default. Add active and idle builder-to-wire regressions, preserve last-completed behavior, and run the required build, Shared, and Tray validation.

Technical review

Best 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:

  • [P2] [P2] Disable command hooks when building transcript forks — src/OpenClaw.Tray.WinUI/Presentation/WorkspaceSessionMenu.cs:105-110
    This still-unfixed prior finding was discovered late in an earlier cycle; the builder is unchanged since the reviewed 83fee847 head. The request inherits EmitCommandHooks=true and leaves SucceedsParent unset. The Gateway rejects active parents whenever hooks are enabled, so forkFrom="last-completed" cannot make busy-session Fork succeed. For an idle parent, it emits the parent's terminal session_end hook even though Fork should preserve that conversation. Set EmitCommandHooks=false here and assert the serialized active and idle requests.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 11523b485b08.

Labels

Label changes:

  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is live_output.

Label justifications:

  • P2: This is a bounded Workspace improvement with a specific fork correctness blocker.
  • merge-risk: 🚨 session-state: The introduced fork request can incorrectly end the parent's lifecycle and cannot fork an active parent.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): Positive real-app evidence covers sidebar rendering and switching, and matching final-head diagnostics exercise ChatPage recovery against an authenticated loopback Gateway, preserving drafts and rejecting changed identity. Historical images retain their attribution; current archive/delete keyboard scenarios have explicit desktop blockers. Fork compatibility remains a separate source-proven defect. No local stored-data contract changes require migration proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Positive real-app evidence covers sidebar rendering and switching, and matching final-head diagnostics exercise ChatPage recovery against an authenticated loopback Gateway, preserving drafts and rejecting changed identity. Historical images retain their attribution; current archive/delete keyboard scenarios have explicit desktop blockers. Fork compatibility remains a separate source-proven defect. No local stored-data contract changes require migration proof.

Evidence

Acceptance criteria:

  • [P1] ./build.ps1.
  • [P1] dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore.
  • [P1] dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore.
  • [P1] Verify active and idle menu-builder requests through the production serializer emit emitCommandHooks=false.
  • [P1] Verify supported-Gateway active-prefix forking succeeds and idle-parent forking does not emit the parent's terminal lifecycle hook.

What I checked:

  • Introduced fork request: The introduced ForkRequest sets parent, agent, fork, and active-prefix selection, but inherits EmitCommandHooks=true and leaves SucceedsParent unset. The production serializer emits that hook setting. (src/OpenClaw.Tray.WinUI/Presentation/WorkspaceSessionMenu.cs:105, f07279b2babc)
  • Affirmative Gateway dependency: The protocol snapshot explicitly identifies openclaw/openclaw's Gateway schema as authoritative, and this PR adds sessions.create fork/forkFrom wire fields consumed by that Gateway. (tests/OpenClaw.Shared.Tests/Protocol/gateway-protocol-snapshot.json:48, f07279b2babc)
  • Gateway lifecycle contract: The actual Gateway creation owner rejects active parents when emitCommandHooks=true regardless of last-completed selection (lines 514-525). With an idle parent, enabled hooks and omitted succeedsParent emit the parent's terminal session-end hook (lines 1163-1179). (src/gateway/session-create-service.ts:514, 10334ec913d7)
  • Prior finding remains unfixed: The previous completed review targets this exact head and reports the same fork defect. Comparing the earlier reviewed 83fee84 head with this head produces no changes to the menu builder. Earlier archive acceptance, removed-composer, and title-column concerns have corresponding repairs and regression coverage. (src/OpenClaw.Tray.WinUI/Presentation/WorkspaceSessionMenu.cs:105, f07279b2babc)
  • Complete captured proof context: Read the complete GitHub body and verified its SHA256 equals the captured ee7868d4d1a5ed942a6856e837c2d6bdc6dbb2d3289a53a53d9c828a83cd29cc. Final-head real-app diagnostics report automatic recovery, draft retention, changed-identity rejection, blocked recheck, and warning clearing. The body explicitly distinguishes historical sidebar/archive proof from current-head keyboard and capture blockers; it does not claim live Gateway fork compatibility. (f07279b2babc)
  • Prepared media inspected: Inspected all four downloaded PNGs. The original sidebar image visibly shows busy rings and the menu image shows conversation actions. The related recovery images show a disconnected warning and recovered draft. These images retain their historical source attribution and are not treated as final-head fork proof.

Likely related people:

  • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • bkudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Disable fork command hooks and verify serialized active/idle requests plus supported-Gateway parent preservation.
  • Record required build/Shared/Tray results on the repaired source and update relevant visible proof or explicit blockers, with private details redacted.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-04T22:30:48.537Z sha ac25533 :: blocked before merge. :: [P2] Clear or replace the retained chat when no session remains | [P2] Wait for archive acceptance before leaving the conversation | [P2] Keep unpinned titles in the constrained text column
  • reviewed 2026-10-06T01:12:51.654Z sha ac25533 :: blocked before merge. :: [P2] Clear or replace the retained chat when no session remains | [P2] Wait for archive acceptance before leaving the conversation | [P2] Keep unpinned titles in the constrained text column
  • reviewed 2026-10-06T02:07:45.060Z sha fc91458 :: blocked before merge. :: none
  • reviewed 2026-10-06T05:40:19.404Z sha fc91458 :: blocked before merge. :: none
  • reviewed 2026-10-06T06:44:09.626Z sha 83fee84 :: blocked before merge. :: none
  • reviewed 2026-10-06T15:07:04.199Z sha 83fee84 :: blocked before merge. :: none
  • reviewed 2026-10-06T17:38:45.690Z sha a29a280 :: blocked before merge. :: [P2] [P2] Disable command hooks when building transcript forks
  • reviewed 2026-10-06T17:54:11.043Z sha f07279b :: blocked before merge. :: [P2] [P2] Disable command hooks when building transcript forks

larroy added 2 commits October 4, 2026 12:55
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
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. label Oct 4, 2026
@larroy

larroy commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

Real behavior proof: workspace sidebar keeps creation order (commit ac25533f, pool windows-winui-interactive)

Live gateway on ws://127.0.0.1:18789, isolated app profile (run-app-local.ps1 -NoBuild -Isolated -AllowNonMain), connected via stored device token with operator.admin scopes. Sidebar rows read through UIA AutomationIds WorkspaceSession:<key> in visual (Y) order.

1. Activity does not reorder rows

Baseline order (top to bottom):

ROW y=486 WorkspaceSession:agent:main:dashboard:c9fadb53-57d6-40de-8be5-a7c892ff9277 name=weather
ROW y=536 WorkspaceSession:agent:main:dashboard:103278f3-d667-4b34-aad9-ab124984c062 name=Direct message
ROW y=586 WorkspaceSession:agent:main:dashboard:87ce353e-1509-4c0c-92d1-ae9638362c47 name=New session
ROW y=636 WorkspaceSession:agent:main:main name=what can you do?

Sent a message into row 2 ("Direct message", not the top row) through local MCP app.chat.send:

{"sent": true, "threadId": "agent:main:dashboard:103278f3-d667-4b34-aad9-ab124984c062", "entryCount": 1, "turnActive": true}

Gateway log confirms the refresh path ran:

[INFO] [EVENT] sessions.changed received — refreshing sessions list

Order after the refresh (unchanged):

ROW y=486 WorkspaceSession:agent:main:dashboard:c9fadb53-57d6-40de-8be5-a7c892ff9277 name=weather
ROW y=536 WorkspaceSession:agent:main:dashboard:103278f3-d667-4b34-aad9-ab124984c062 name=Direct message
ROW y=586 WorkspaceSession:agent:main:dashboard:87ce353e-1509-4c0c-92d1-ae9638362c47 name=New session
ROW y=636 WorkspaceSession:agent:main:main name=what can you do?

Under the old updatedAt sort, the just-updated "Direct message" row would have jumped above "weather". It did not move.

2. New session lands on top

Clicked the sidebar's WorkspaceSessionsAdd button (UIA InvokePattern); the new session appeared at the top, all existing rows kept their positions:

ROW y=486 WorkspaceSession:agent:main:dashboard:caf84148-38c6-487a-adf5-8bf8a22ffcc9 name=New session (2)
ROW y=536 WorkspaceSession:agent:main:dashboard:c9fadb53-57d6-40de-8be5-a7c892ff9277 name=weather
ROW y=586 WorkspaceSession:agent:main:dashboard:103278f3-d667-4b34-aad9-ab124984c062 name=Direct message
ROW y=636 WorkspaceSession:agent:main:dashboard:87ce353e-1509-4c0c-92d1-ae9638362c47 name=New session
ROW y=686 WorkspaceSession:agent:main:main name=what can you do?

The Workspace window screenshot taken at this point shows "New session (2)" selected at the top of the Sessions list (captured to %TEMP%\OpenClawTray\workspace-sidebar-after-proof.png during the proof run; throwaway UIA probe scripts were removed after capture).

Validation

  • pwsh ./build.ps1: all builds succeeded (Shared, Cli, WinNodeCli, SetupEngine, WinUI).
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4231 passed, 0 failed, 35 skipped (includes GatewayProtocolDriftTests with the new createdAt field and ParseSessions_ReadsCreatedAtAndKeepsItWhenOmitted).
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 3906 passed, 2 failed; the only failures are the two pre-existing NativeSpeechStackRuntimeTests cases caused by the missing VC++ Redistributable >= 14.38.33130 on this host (environmental, unrelated to this change; also seen on a clean run before this branch's UI work).
  • Focused new/affected tests: 11/11 passed (Projection_ActivityDoesNotReorderSessions, Projection_SessionsWithoutCreatedAtFreezeFirstSeenOrder, Projection_PinnedSessionsSortFirstAndArchivedRowsHidden, Projection_LatestSessionKeyIgnoresPinnedOrderingAndArchivedRows, Projection_PreservesForegroundMetadataAndExplicitFalseOverride).

Not verified / blocked

  • autoreview closeout review could not run on this host: the helper requires a real Python interpreter and a reviewer CLI (codex/claude/pi); this machine only has the Microsoft Store Python stubs (exit 49) and none of the reviewer CLIs on PATH. Structured review is documented as blocked, not skipped.

@larroy

larroy commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author
image

@larroy
larroy marked this pull request as ready for review October 4, 2026 22:23
@larroy

larroy commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author
image

@clawsweeper clawsweeper Bot added the proof: sufficient Contributor real behavior proof is sufficient. label Oct 4, 2026
@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 6, 2026
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]>
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 6, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 6, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 6, 2026
@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 6, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 6, 2026
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]>
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 6, 2026
@karkarl

karkarl commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 6, 2026
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 6, 2026
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]>
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Oct 6, 2026
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]>
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 6, 2026
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 6, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 6, 2026
@karkarl
karkarl merged commit 791574d into openclaw:main Oct 6, 2026
28 checks passed
@clawsweeper clawsweeper Bot mentioned this pull request Oct 30, 2026
5 of 16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants