Skip to content

fix: archived threads leave the sidebar immediately - #129153

Merged
roboclaw-bot merged 1 commit into
mainfrom
openclaw/archive-thread-with-instant-sidebar-removal
Aug 25, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
openclaw/archive-thread-with-instant-sidebar-removal

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where archiving the currently open thread left it visible in the sidebar until the Gateway mutation and subsequent list refresh settled. The delayed removal made the archive action feel unresponsive even though the thread remained intentionally open as the main content.

Why This Change Was Made

The shared session capability now owns a bounded pending/confirmed archive-visibility fact. Active-sidebar projection consumes that fact across root, child, selected-fallback, and cached-lineage rows, while route and pane state remain untouched; canonical unarchive data retires the local visibility fact. This keeps sidebar and chat-header archive entry points on one lifecycle path.

User Impact

The archived row disappears from the sidebar as soon as Archive is activated. The same thread stays selected in the main pane, its content remains visible, and the normal archived notice, Undo action, and Unarchive flow continue to work.

Evidence

  • node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts ui/src/lib/sessions/index.test.ts — 328 tests passed.
  • OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-management.archive.e2e.test.ts — 10 tests passed in Chromium, including a deferred sessions.patch that proves removal before the RPC resolves.
  • node scripts/check-changed.mjs -- <changed files> — formatting, structural guards, dead-code, i18n, core/UI typechecks, and lint passed.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean; no accepted/actionable findings.
  • Production LOC: +100/-10 (net +90), introducing the shared archive lifecycle owner and complete sidebar projection boundary. Tests/test support: +131/-6.

Before

Selected thread still present before Archive

Immediately after activation, while sessions.patch is unresolved

Thread removed from sidebar while content remains selected

After the Gateway response

Archived thread content retained with sidebar row absent

Recording

archive-current-thread.webm

AI-assisted: yes. The implementation and proof were reviewed, and the final branch passed the repository autoreview workflow.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 25, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review August 25, 2026 08:19
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Land-ready proof for 3fefde83601886347a919098ded5797d93bdea25:

  • Behavior: Archive removes the current root or child thread from the active sidebar immediately while the same route, title, transcript, archived notice, Undo, and Unarchive flow remain intact.
  • Unit: node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts ui/src/lib/sessions/index.test.ts — 328 passed.
  • Browser: focused Chromium mocked-Gateway suite — 10/10 passed, including deferred sessions.patch proof before the RPC resolves.
  • Changed gate: formatting, conflict/max-lines/assertion guards, dead-code, i18n, core/UI typechecks, and core/UI lint passed.
  • Autoreview: final Codex gpt-5.6-sol review clean; no accepted/actionable findings.
  • Visual proof: inspected before, pending, completed screenshots and recording are embedded in the PR body.
  • LOC: production +100/-10; tests/test-support +131/-6. Production growth establishes one shared session-capability lifecycle fact and applies it across all sidebar projection/reinsertion paths instead of adding entry-point-specific behavior.

Known proof gaps: none. The latest ClawSweeper comment is the active review placeholder and currently publishes no Rank-up moves: items.

@roboclaw-bot
roboclaw-bot merged commit 5182513 into main Aug 25, 2026
201 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/archive-thread-with-instant-sidebar-removal branch August 25, 2026 08:32
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant