Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Verified landing candidate: 085756d. Root cause: local menu archive had its own confirmed visibility map; agent-triggered Gateway events updated the chat's canonical archive state but never that map. Proof actually run:
Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/33138196854 (awaiting final checks before native prepare/merge). Before/after screenshots are in the PR body. Inspected real-flow recording: archive-sidebar-live.mp4No remaining behavior-proof gaps. Latest ClawSweeper comment currently reports review started; no Rank-up moves published yet. Will recheck before merge. Broader cold archived-link filtering/copy remains the distinct follow-up in #121436 / #123723. |
|
Merged via squash.
|
…1461) * fix(ui): remove agent-archived sessions from the sidebar * refactor(ui): own archive confirmation and visibility together
Closes #131451
What Problem This Solves
Fixes an issue where users asking an agent to archive the currently open session would see the archived chat banner but the session would remain in the active Control UI sidebar. The same archive initiated through the sidebar menu already removed the row.
Why This Change Was Made
The session capability now derives sidebar visibility from its existing, identity-bound archive confirmation, whether confirmation arrives through a local patch or a Gateway event. Only the pending-click intent remains UI-local. This removes the duplicate confirmed-visibility store and its independent retirement logic.
The open transcript, route, title, archived banner, restore action, and existing cold archived-link behavior remain unchanged. No Gateway protocol, configuration, database, or provider contract changes.
User Impact
Agent-triggered archives remove the selected row without navigating away. Restore returns it to the active sidebar and re-enables the composer. A same-key replacement cannot inherit the old session's hidden state.
Evidence
pnpm buildpassed, including the production Control UI bundle and startup budgets.node scripts/check-changed.mjs -- <10 changed paths>passed (format, guards, dead-code, i18n, core/UI typechecks, lint).openai/gpt-5.6-lunaCodex agent on an isolated loopback Gateway: actual sessions-tool archive, persistedarchived: true, unchanged route, removed sidebar row, and in-place Unarchive restoring row/composer all verified. The live prompt allowed tool discovery; proof checks the actual tool/state, not the agent's promise.Before: archive received, sidebar row still present
After: same chat retained, sidebar row removed
Owner and provenance
The Gateway already emits authoritative archive state through
sessions.patch->sessions.changed. The gap was the UI's second archive-visibility store, populated only by the local menu action. The incomplete immediate-hide path was introduced in #129153 (code/PR author RoboClaw; merged by roboclaw-bot, August 25, 2026). The existing canonical confirmation owner came from #122641.Direct dependency inspection: sibling Codex source
codex-rs/app-server/src/dynamic_tools.rs:18andcodex-rs/app-server/src/request_processors/thread_processor.rs:598/:1640. OpenClaw session archive is a Gateway-owned mutation, not Codex's separate thread/archive notification.Related follow-up: #121436 / #123723 discuss strict sidebar filtering for cold archived deep links and banner-copy changes. Those broader policy changes are not part of this live-reconciliation repair.
AI-assisted: yes.
Real-agent proof
The inspected recording shows the actual tool call, sidebar removal without navigation, and UI restoration:
archive-sidebar-live.mp4