Skip to content

feat: organize and archive nested conversations explicitly - #168076

Merged
roboclaw-bot merged 8 commits into
mainfrom
openclaw/rethinking-session-archiving-and-dragging
Oct 10, 2026
Merged

roboclaw-bot merged 8 commits into
mainfrom
openclaw/rethinking-session-archiving-and-dragging

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Nested conversations need an explicit way to become independent, and archiving a parent must not make its still-active children disappear.

User Impact

Drag a persistent child to the top level, Pinned, or a custom group, or use Move to top level. Ordinary archive affects only that conversation; Archive session and children… offers an explicit counted confirmation and Undo.

Promotion preserves the conversation URL, transcript, workspace, origin, permissions, and execution relationships. Hidden worker runs remain outside sidebar organization. This feature adds no configuration change or database schema migration. Upgrading from the published stable release uses the existing Doctor migrations, verified below.

Why This Change Was Made

Sidebar placement is now separate from execution ancestry. Tree archive discovers collapsed descendants, excludes independent/grouped/already-archived branches, and checks the selected sessions and their ancestors again before stopping work or writing. Guarded batches settle deepest-first across stores; partial outcomes stay visible and Undo restores only successful targets.

Evidence

Before

Before: nested conversation menu

After

After: move child to top level or group

Explicit tree archive

Tree archive confirms exactly the selected conversations

Verification

Integrated main 334fc6cb8fda to resolve actual organizer conflicts, preserving its patch owner and attempt-local rename handling. Final correction 4892ac8277db has tree ba967a23d5f731fb4237f71f685cb68b54c447fa, tested with the archive-outcome and CI-fixture fixes. Current-head CI and native landing remain separate gates.

  • Real isolated Gateway, SQLite, public RPCs and Chromium passed native drag/drop, menu promotion, group/pin placement, reload, parent-only/count-confirmed tree archive, Undo, cross-client races and cold restart. Synthetic sessions only; no live Team service changed.
  • Earlier feature proof passed 300 backend runtime tests/17 files, 88 protocol/scope tests/2 files, focused UI suites, core production/all 27 core-test type graphs and full/incremental runtime builds. Initial CI type-cycle and stale fixture defects were repaired with targeted proof.
  • Integrated proof: 46 UI unit cases (5.45s), 25 browser cases (113.75s), 4 tooltip/theme cases (11.22s), and 30 dialog cases (141.29s) passed. Twenty-two unchanged strings moved to the existing lazy English catalog; i18n raw-copy/source-key counts stayed unchanged.
  • Final source-bound build: 373,368 B startup gzip ≤ unchanged 373,454 B limit; CSS +45 B. Native-promotion/group/identity/archive browser selection: 16/16, 85.69s. Archive/Undo browser siblings: 7/7, 53.90s. Affected production/test type graphs, lint/format and source-safety/line-count ratchets passed.
  • Independent full-candidate review and scoped archive-outcome review were clean after fixes. All assertions, timeouts, budgets and security protections remain intact.

Regression repairs and test cost

  • Durable group placement: three real sidebar/capability cases failed before repair because an archived parent’s child omitted sidebarRoot. They pass after using durable placement facts instead of rendered nesting. Mixed batches preserve order and never promote hidden workers.
  • Unconfirmed dialogs: five real page/dialog cases failed before repair, then passed. Captured page cancellation closes archive confirmations on navigation/reconnect and prevents stale lazy imports from opening a dialog.
  • Confirmed tree outcomes: two delayed-response cases failed before repair, then passed. The existing connection-owned outcome host finishes 101 targets across two chunks after navigation, keeps partial-error feedback readable via toast FIFO, restores only 100 successful targets with captured IDs, and retires Undo on same-client reconnect. Affected unit siblings: 59/59, 9.25s.
  • CI rename interaction: current attempt 38021476059 / job 114123431932 exposed an obsolete fixture clicking through a pending rename modal. The exact failure reproduced locally on Node 24.19.0. The correction uses the real picker and browser Back/Forward, proves the connection is unchanged, and retains every original captured-ID, All-filter, cross-agent refresh, pagination and membership assertion. Full corrected file: 4/4 passed, 11.321s test execution / 46.44s Vitest / 346.20s isolated wall including mandatory artifact builds. Both runs used the supported local network-isolated launcher; containers were removed. No CI rerun or remote resource was dispatched.

Final single-worker unit costs (pnpm test <file> --maxWorkers=1): app-sidebar.session-promotion.test.ts 4/4, 3.13s wall; session-organizer-batch-mutations.test.ts 44/44, 2.74s; sessions-page.archive-lifetime.test.ts 5/5, 3.18s; sessions-page.archive-tree-outcome.test.ts 2/2, 8.32s wall / 0.614s test execution. The joint repaired selection passed 69/69 before the last tree-outcome delta. New-head CI timings are not yet available.

Investigated failures and limits

  • Integrated main’s 76dca73e (test: restore agent artifact and maintenance fixture contracts #168084) repairs the old independently reproduced recovery-owner fixture failure. Local artifact execution passed that former failure; readiness passed in 12.881s.
  • The artifact fixture then hit a new unresolved local HTTP transport failure (fetch failed / UND_ERR_SOCKET, 38.307s). Its peer matched the ambient proxy, with environment-proxy routing enabled and no loopback exemption. The log cannot distinguish GET, HEAD or Range, or explain the close. Combined artifact/readiness wall was 137.24s, not aggregate green. This is not inherited-CI qualification; no proxy/TLS safeguard changed.
  • The historical idle branch-tooltip failure (job 114103094457, run 38014883649) remains unqualified: ordered/pointer/lifecycle/baseline diagnostics passed that case, but passing replays establish neither a fix nor inheritance. Broader probes had separate failures. An earlier Testbox never provisioned and was stopped; subsequent execution remained local.
  • Historical global scans were not wholly green: dead-export findings for isTelegramReadOnlyControlLaneText, buildDirectChatContext and resolveContextTokens predate the feature; Swift also flagged two unchanged reconnect-backoff hooks with test callers. These do not qualify a new CI attempt.
  • Undo uses current-state expectations, not operation-specific archive→restore→archive receipts. No current-head CI-green claim or gate waiver.

Existing-data upgrade compatibility

Official npm 2026.9.9 (bcfc88812a35, package integrity verified) → candidate b8974464 (tree identical to published 0782b739) passed on the same isolated SQLite state without reseeding. Stable created six nested sessions, transcripts, pin/group references and read-only permissions without sidebarRoot. Candidate preserved identity, metadata and lineage before writes. Real Chromium promotion/pinning, parent-only/tree archive/Undo and cold restart passed 1/1, 19.054s.

Existing supported Doctor migrations completed with backups (state 19→20, agent 24→25). All 12 serialized transcript events stayed byte-identical; both SQLite integrity checks returned ok. This proves stored-data compatibility through supported migration, not an updater-command invocation. The feature adds no schema migration.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 10, 2026 01:31
Separate sidebar placement from conversation ancestry, preserve unarchived children, and add guarded tree archive with scoped Undo.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: feb1e188-049d-46ee-9557-88a90343fc37
@clawsweeper

clawsweeper Bot commented Oct 10, 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 docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL labels Oct 10, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 10, 2026 01:33
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 60c3f081d35e07d03a7e93b5e3b0565254489864
  • Maintainer: @roboclaw-bot
  • Repository role: admin

These security sensitive changes were made:

  • src/shared/session-method-scopes-base.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds independent placement for nested conversations and explicit, counted tree archiving with Undo.

Example: “Plan the release” contains “Research notes” and “Verify the release.”

  • Before: Nested conversations cannot be explicitly promoted, and archiving their parent can hide active children.
  • After: Move “Research notes” to the top level, or explicitly confirm archiving the remaining three-conversation tree and undo successful targets.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, maintainer-directed feature with credible behavior and upgrade evidence; the previous finding is fixed, and final CI remains governed by the normal landing gate.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Control UI screenshots and counted archive confirmation; supplied verification records real isolated Gateway, SQLite, public RPC, Chromium, restart, and stable-upgrade scenarios, with focused pending-write and reconnect regressions supporting the latest correction.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users need to make nested conversations independent and archive a parent without losing access to its active children.
Reason: Maintainer-authored direction supplies explicit, understandable organization controls while retaining conversation identity and execution relationships.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides useful, maintainer-directed conversation organization, and the previous archive-outcome finding is resolved without a new actionable defect identified.

Priority: P2
Reviewed head: 60c3f081d35e07d03a7e93b5e3b0565254489864

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI organization actions enter the existing session RPC mutation owner, which validates current access and placement before updating SQLite-backed session metadata and publishing refreshed rows.

flowchart TD
  A[Conversation menu or drag] --> B[Session organizer]
  B --> C[Session RPC handlers]
  C --> D[Current authority and placement guards]
  D --> E[Session writer]
  E --> F[SQLite session metadata]
  E --> G[Row updates and Undo feedback]
Loading

Technical review

Best possible solution:

Retain the shared session mutation owner and connection-bound archive outcomes, then land through the normal exact-head gates.

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

This is a feature review; source inspection and supplied proof establish the affected flows, and no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The approach fits the existing owners: visual placement is additive metadata, execution ancestry remains intact, and explicit tree archive reuses guarded mutations and connection-scoped outcomes.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Archive confirmation and Undo lifetime keeps the original intent (22c4164: Preserve ordinary archive confirmation and identity-bound Undo when the Sessions page retires.)
  • Pin and snooze eligibility changes intended behavior with a stated reason (d63df96: Snooze deliberately excluded nested children; this PR explains why explicitly promoted persistent conversations now qualify while hidden workers remain excluded.)
  • Session patch writer admission keeps the original intent (ee9c666: Keep ordinary projection and commit within one writer admission while revalidating detached preparation and current authority.)
  • Scoped session organization keeps the original intent (282fc78: Permit organization of the caller's authorized sessions while retaining broader requirements for sharing, deletion, and execution authority.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Previous finding resolved: Confirmed batches now use the captured connection-owned outcome host, preserving remaining chunks, partial errors, and successful-target-only Undo after page navigation. (ui/src/components/session-organizer-archive.runtime.ts:207, 60c3f081d35e)
  • Pending-write regression coverage: The new page-boundary regression removes the page after dispatch, verifies both chunks for 101 targets, preserves the partial error, and restores only successful captured identities; a sibling case fences same-client reconnects. (ui/src/pages/sessions/sessions-page.archive-tree-outcome.test.ts:148, 60c3f081d35e)
  • Correction independently identified: GitHub's correction-commit patch confirms that the outcome-host change, FIFO feedback, pending-write regressions, and genuine browser-history fixture repair are the latest correction. (4892ac8277db)
  • Existing outcome contract preserved: The merged predecessor established connection-bound confirmation and identity-bound Undo across navigation; this PR extends that contract to tree batches: fix(ui): retain archive confirmation after leaving Sessions #150108. (ui/src/pages/sessions/archive-outcome.ts:13, 22c4164c86b5)
  • Placement and authority remain separate: Promotion changes sidebarRoot rather than execution lineage; archive preparation and final writer guards retain caller authority and reject changed target or ancestor placement before destructive effects. (src/gateway/server-methods/sessions-patch-expectations.ts:257, 60c3f081d35e)
  • Visual and upgrade evidence: Inspected the downloaded before, after, and counted-confirmation images. The captured PR body, source revision 262f57cc0bc6949675d9d31877e88efad5d20d2b8ce3ff7c318fc660fa41eb42, records isolated real-Gateway/Chromium execution and a stable 2026.9.9 upgrade preserving session identities, permissions, and byte-identical transcript events. (60c3f081d35e)

Likely related people:

  • Peter Steinberger: Raw commit 22c4164 adds ui/src/pages/sessions/archive-outcome.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 22c4164c86b5; files: ui/src/pages/sessions/archive-outcome.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Persisted organization state 1 optional session field; no new database schema or configuration option sidebarRoot separates durable visual placement from execution ancestry and uses the existing session-entry storage boundary.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Conversation organization and archive feedback improve a bounded Control UI workflow without evidence of an urgent runtime regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (4 earlier review cycles)
  • reviewed 2026-10-10T01:42:03.321Z sha c8d58a6 :: blocked before merge. :: none
  • reviewed 2026-10-10T02:07:23.212Z sha 0782b73 :: needs changes before merge. :: none
  • reviewed 2026-10-10T02:57:34.780Z sha 0782b73 :: needs changes before merge. :: [P2] Preserve tree-archive confirmation after leaving Sessions
  • reviewed 2026-10-10T03:50:51.436Z sha ae4901a :: needs changes before merge. :: [P2] Preserve tree-archive outcomes after leaving Sessions

Reviewed October 10, 2026, 12:30 AM ET / 04:30 UTC (Revision 5).

roboclaw-bot and others added 2 commits October 10, 2026 01:51
Extract archive preparation types into their dependency leaf and assert additive sidebar placement independently of frozen wire hashes. Exercise promoted child placement and active-session archive confirmation in the existing browser suites.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: ba1895ce-b814-482d-a239-1030eb60db04
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
roboclaw-bot and others added 4 commits October 10, 2026 03:40
Integrate main's organizer changes, preserve independent group placement for children of archived parents, cancel page-owned archive dialogs on navigation, and keep dialog copy lazy within the unchanged startup budget.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 0083afee-0b1b-4220-919e-6bd0a6fe558c
Preserve confirmed archive batches, partial failures and identity-bound Undo across page navigation. Exercise pending sidebar rename through real browser history without clicking through the modal.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 2af516fa-d2a0-47b4-9d8e-723894cdb4d2
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Head 60c3f081d35e07d03a7e93b5e3b0565254489864 addresses the confirmed tree-archive outcome finding. The existing connection-owned outcome path now finishes admitted chunks after navigation, preserves readable partial errors, and offers identity-bound Undo for successful targets only. The 101-target navigation regression and reconnect fence failed before repair and pass afterward; 59 affected unit cases and 7 archive/Undo browser cases pass.

The CI pending-rename fixture failure was also reproduced locally on Node 24.19.0, then corrected with genuine picker and browser-history navigation. All four cases pass in the supported local network-isolated runner, with every original assertion and timeout preserved. Current proof, limits, and test costs are in the updated PR body. Fresh independent review of the combined correction is clean.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 10, 2026 04:29
@roboclaw-bot
roboclaw-bot merged commit d0b4640 into main Oct 10, 2026
167 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/rethinking-session-archiving-and-dragging branch October 10, 2026 04:34
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

steipete added a commit that referenced this pull request Oct 10, 2026
Update session-management.sidebar.e2e.test.ts after #168076 to expect
enabled grouping and top-level promotion while retaining the child pin
restriction and existing nesting, status, accessibility and navigation proof.

Target the original session's accessible rename button in the mutation-scope
sibling so its agent-switch history setup does not match two cached panes.

Before: both sidebar nesting variants failed on the obsolete no-group action
assertion; mutation-scope's All/rename case failed on an ambiguous selector.
After: all 30 cases in the five focused browser files pass, one file per run.
Wall seconds: sidebar 37.20, archive 47.09, mutation-scope 27.03,
promotion 17.40, chat-header-session-lineage 18.85.

Independent local review: clean through P2. Production LOC delta: zero.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…168076)

* feat: organize and archive nested conversations explicitly

Separate sidebar placement from conversation ancestry, preserve unarchived children, and add guarded tree archive with scoped Undo.

Co-authored-by: steipete <[email protected]>

* feat: organize and archive nested conversations explicitly

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: feb1e188-049d-46ee-9557-88a90343fc37

* fix: align nested session contracts and browser fixtures

Extract archive preparation types into their dependency leaf and assert additive sidebar placement independently of frozen wire hashes. Exercise promoted child placement and active-session archive confirmation in the existing browser suites.

Co-authored-by: steipete <[email protected]>

* feat: organize and archive nested conversations explicitly

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: ba1895ce-b814-482d-a239-1030eb60db04

* feat: organize and archive nested conversations explicitly

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 0083afee-0b1b-4220-919e-6bd0a6fe558c

* fix: retain tree archive outcomes after navigation

Preserve confirmed archive batches, partial failures and identity-bound Undo across page navigation. Exercise pending sidebar rename through real browser history without clicking through the modal.

Co-authored-by: steipete <[email protected]>

* feat: organize and archive nested conversations explicitly

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 2af516fa-d2a0-47b4-9d8e-723894cdb4d2

---------

Co-authored-by: steipete <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
Update session-management.sidebar.e2e.test.ts after openclaw#168076 to expect
enabled grouping and top-level promotion while retaining the child pin
restriction and existing nesting, status, accessibility and navigation proof.

Target the original session's accessible rename button in the mutation-scope
sibling so its agent-switch history setup does not match two cached panes.

Before: both sidebar nesting variants failed on the obsolete no-group action
assertion; mutation-scope's All/rename case failed on an ambiguous selector.
After: all 30 cases in the five focused browser files pass, one file per run.
Wall seconds: sidebar 37.20, archive 47.09, mutation-scope 27.03,
promotion 17.40, chat-header-session-lineage 18.85.

Independent local review: clean through P2. Production LOC delta: zero.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts security-sensitive-changed size: XL 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.

1 participant