Skip to content

fix(ui): remove archived sessions from active sidebar - #123723

Closed
clawsweeper wants to merge 1 commit into
mainfrom
fix/archive-session-sidebar
Closed

clawsweeper wants to merge 1 commit into
mainfrom
fix/archive-session-sidebar

Conversation

@clawsweeper

Copy link
Copy Markdown
Contributor

Closes #121436

What Problem This Solves

Fixes an issue where users who archived the session they were viewing would still see that archived session in the active Control UI sidebar. The archive succeeded, but the selected-row exception made the active list look unchanged.

Why This Change Was Made

The active sidebar now applies its archive filter consistently to routed roots and child sessions while retaining the routed archived descriptor solely for the open chat, title, and Undo state. Archived lineage cache rows are dropped on canonical refresh so a stale pre-archive child cannot be projected back into the active tree.

The prior policy was introduced in #113882. This PR reverses only the sidebar-membership decision: the chat route remains open, cold-loaded archived links still resolve, and Undo restores the row and composer in place.

User Impact

Archiving the current session removes it from the active sidebar immediately. The open chat remains available with a clear archived banner and Undo action; Undo restores the session to the sidebar without navigation.

Evidence

  • Failing pre-fix regression: ui/src/lib/sessions/navigation.test.ts returned agent:main:archived in an active-filtered list.
  • node scripts/run-vitest.mjs ui/src/lib/sessions/navigation.test.ts ui/src/components/app-sidebar-session-navigation-logic.test.ts ui/src/components/app-sidebar.test.ts ui/src/pages/chat/chat-composer.test.ts ui/src/pages/chat/chat-composer-disabled-banner.test.ts — 333 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 — 9 passed. Browser assertions cover archive, immediate row removal, route/title continuity, cold-load behavior, navigation away/back, Undo restoration, and composer restoration.
  • node scripts/check-changed.mjs -- <12 changed UI paths> — passed after the unavailable remote backend fell back locally; includes format, i18n, typecheck, lint, dead-code, dependency, and repository guard lanes.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output — clean; no accepted/actionable findings.
  • Visual proof was captured and inspected locally as sanitized before/after screenshots (archived-session-before.png, archived-session-hidden-with-undo.png). The after image shows the selected session absent from Sessions while its breadcrumb/chat remain open with the Undo banner. This bot environment has no authenticated GitHub attachment uploader, so the files could not be attached to the PR; the deterministic E2E assertions cover the same states.

Production/test LOC: production +23/−16 (net +7), tests/test-support +42/−48 (net −6). The small production growth makes archive filtering an explicit tree-projection contract and prevents archived lineage caches from bypassing it.

AI-assisted: yes. The original Peter-authored implementation was preserved and refreshed against current main; the current-lineage cache interaction and proof updates were completed with Codex.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 7:16 PM ET / 23:16 UTC (Revision 10).

ClawSweeper review

What this changes

The PR removes archived sessions from the Active sidebar while retaining their open chat and replacing the composer with an archived notice and Undo action.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: strict filtering of cold-opened archived sessions remains distinct from the merged live-archive repair. The protected PR has useful visual evidence, but its confirmed conflicts and remaining navigation-policy choice prevent a merge-ready verdict.

Priority: P3
Reviewed head: 32ff4b07aeef489f5f19e7b61f31f1e79f16ea14
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, visually demonstrated behavior change with no discrete blocking patch defect; policy acceptance and integration remain separate merge blockers.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser screenshots show the changed sidebar row disappearing while the routed chat breadcrumb remains and the archived composer notice offers Undo; reported archive E2E assertions supplement that visible proof. Integration after conflict resolution remains unverified. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after browser screenshots show the changed sidebar row disappearing while the routed chat breadcrumb remains and the archived composer notice offers Undo; reported archive E2E assertions supplement that visible proof. Integration after conflict resolution remains unverified. No stored-data contract changes.
Evidence reviewed 10 items Pinned introduced change: Reviewed the verified merge-base-to-head delta, rather than endpoint drift. It changes root and child archive filtering, lineage-cache retention, banner wording, and existing behavior tests.
Remaining current-main contract: Current browser coverage explicitly expects a cold-loaded archived session to retain its selected sidebar row and archive glyph, with an Unarchive action. The PR changes this observable contract.
Documented presentation policy: Current documentation distinguishes directly opened archived sessions, which can retain their selected row in Active, from archiving a visible session, which immediately hides its row while retaining the conversation. Public page: https://docs.openclaw.ai/web/control-ui/sessions-and-sidebar.
Findings None None.
Security None None.

How this fits together

The Control UI projects Gateway session records and routed session details into sidebar navigation. Archive visibility determines which rows appear, while the retained session descriptor supplies the open chat’s title, archived notice, and restoration action.

flowchart TD
  A[Gateway session records] --> C[Session state owner]
  B[Open chat route] --> D[Retained session details]
  C --> E[Sidebar visibility policy]
  D --> E
  E --> F[Filtered sidebar tree]
  D --> G[Open chat and archived notice]
  G --> H[Restore session]
  H --> C
Loading

Decision needed

Question Recommendation
Should Active also exclude cold-opened archived selections, with Undo replacing Unarchive in the retained chat banner? Adopt strict Active filtering: Hide archived selections consistently while keeping their transcript, title, and in-place restoration available.

Why: The remaining change reverses a documented and tested presentation policy; the contributor’s requester-approval statement does not independently confirm maintainer acceptance of that full scope.

Before merge

  • Resolve merge risk (P1) - Strict filtering removes the documented selected-row exception for cold archived links; maintainer confirmation of that presentation-policy change remains necessary.
  • Resolve merge risk (P1) - Confirmed merge conflicts leave integration with current main’s shared, identity-bound visibility owner unresolved; Active, Archived, All, and Snoozed views need validation after reconciliation.
  • Complete next step (P2) - Confirm the cold-link presentation policy, resolve conflicts through current main’s visibility owner, and validate the refreshed browser archive flows.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +7, Tests -6. Total +1 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 6 23 16 +7
Tests 6 42 48 -6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 65 64 +1

Review metrics

Metric Value Why it matters
Production versus tests production +23/-16 (net +7); tests and test support +42/-48 (net -6) Growth implements an explicit filtering contract in the older projection; reconciliation should reuse the current visibility seam.
Navigation default 1 selected-archive visibility exception removed Cold archived links would no longer retain a selected row in Active.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #121436
Summary: This PR implements the broader archived-selection request; merged live-reconciliation work covers only part of that direction.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Confirm and reconcile the remaining policy (recommended)
    Confirm strict cold-link filtering, then port only the remaining behavior through current main’s visibility owner and validate all status views and restoration.
  2. Keep the established cold-link behavior
    If the selected-row exception remains intentional, retain current main’s implementation and resolve this protected proposal through maintainer judgment.

Technical review

Best possible solution:

Apply the chosen cold-link policy through the current shared sidebar visibility seam while retaining routed chat details and identity-bound restoration.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a remaining bug reproduction: current source, tests, and docs intentionally retain the cold-link exception. No runtime tests were executed during this read-only review.

Is this the best way to solve the issue?

No, the older projection changes are no longer the best integration point; current main’s shared visibility seam can express the remaining policy without duplicating archive lifecycle ownership.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: The remaining work is a reversible navigation and banner UX policy change without demonstrated data loss or a blocked workflow.
  • merge-risk: 🚨 compatibility: The PR changes documented cold-link navigation behavior and must integrate with the newer shared archive visibility lifecycle.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after browser screenshots show the changed sidebar row disappearing while the routed chat breadcrumb remains and the archived composer notice offers Undo; reported archive E2E assertions supplement that visible proof. Integration after conflict resolution remains unverified. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after browser screenshots show the changed sidebar row disappearing while the routed chat breadcrumb remains and the archived composer notice offers Undo; reported archive E2E assertions supplement that visible proof. Integration after conflict resolution remains unverified. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after browser screenshots show the changed sidebar row disappearing while the routed chat breadcrumb remains and the archived composer notice offers Undo; reported archive E2E assertions supplement that visible proof. Integration after conflict resolution remains unverified. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: 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.

  • Reconcile the remaining policy with current main’s shared visibility owner and show refreshed browser coverage for status filters, cold links, route/title continuity, and restoration.

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 (9 earlier review cycles; latest 8 shown)
  • reviewed August 20, 2026, 1:49 AM ET / 05:49 UTC sha unknown :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T07:40:04.842Z sha 32ff4b0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-03T04:30:02.007Z sha 32ff4b0 :: blocked before merge. :: none
  • reviewed 2026-09-03T05:23:24.052Z sha 32ff4b0 :: blocked before merge. :: [P1] Remove duplicate archive filtering from the legacy projection
  • reviewed 2026-09-05T10:04:05.321Z sha 32ff4b0 :: blocked before merge. :: none
  • reviewed 2026-09-22T09:07:07.583Z sha 32ff4b0 :: blocked before merge. :: none
  • reviewed September 27, 2026, 8:36 PM ET / September 28, 2026, 00:36 UTC (Revision 8) sha unknown :: blocked before merge. :: none
  • reviewed September 27, 2026, 8:36 PM ET / September 28, 2026, 00:36 UTC (Revision 9) sha unknown :: blocked before merge. :: none

@clawsweeper

Copy link
Copy Markdown
Contributor Author

Landing is blocked by an unrelated current-main Control UI failure already owned by #123705.

Archive-specific proof remains green: 333 focused UI tests, all 9 archive E2E scenarios, changed checks, visual inspection, and clean autoreview. Once the canonical Skills repair reaches main, this PR should be refreshed and sent through scripts/pr prepare-run and scripts/pr merge-run again.

@clawsweeper

Copy link
Copy Markdown
Contributor Author

The product decision is explicit: the requester wants the active sidebar row to disappear immediately when the current session is archived, while preserving the open route and an in-place Undo action. That resolves the policy choice raised by ClawSweeper in favor of the active-only sidebar behavior implemented here.

Exact-head sanitized visual proof:

Before archive — routed session is present in Sessions

Before archive

After archive — row is absent; chat remains open with Undo

After archive

This addresses both optional rank-up moves from the latest review. The remaining red gate is the unrelated duplicate initial Skills request already owned by #123705; I will refresh and land this PR through scripts/pr after that canonical repair reaches main.

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 26, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 22, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor

Thanks for the PR. We're closing older pull requests that have gone stale against current main.

This branch conflicts with main, CI is failing, and there have been no commits since August; the sidebar has since been rewritten and the live-archive case was repaired separately. Please open a fresh issue if archived sessions still linger in the active sidebar.

@steipete steipete closed this Oct 24, 2026
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: remove archived session from active sidebar and keep chat open

2 participants