Skip to content

fix: conversation reset discards groups, icons, views, and sharing preferences - #126575

Merged
steipete merged 1 commit into
mainfrom
codex/issue-123520-session-reset-preferences-c3051d45
Aug 20, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/issue-123520-session-reset-preferences-c3051d45

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #123520

What Problem This Solves

Fixes an issue where users resetting a Control UI conversation with /reset would lose its custom sidebar group, chosen icon, preferred chat or dashboard view, and collaboration visibility preference, even though the conversation label and pinned state survived.

Why This Change Was Made

The Gateway reset lifecycle rebuilds the durable session entry while clearing conversation and run state. Preserve the four existing operator-owned preferences alongside the session label at that lifecycle boundary, so the returned session and its persisted SQLite record stay consistent without adding a UI workaround, changing storage schemas, or retaining transient run state.

User Impact

Resetting a conversation clears its earlier messages while keeping it in the same custom group with its existing icon, chosen view, draft or sharing preference, name, pinned state, and usage-display preference.

Evidence

  • Live operator flow against the real local Gateway and Control UI in isolated Chromium: create a custom sidebar group, set a lobster icon, choose the dashboard face, type /reset in the real composer, and submit it. Before the fix, the session moved to Other and its category, icon, and boardFace became empty; a separate disposable draft session also reverted to shared visibility while keeping the same session identity.

  • Failing-first existing Gateway integration suite: 21 passed, 1 failed, with the failure showing all four missing preferences while label, pinnedAt, and responseUsage remained intact.

  • After the owner-boundary repair, the identical focused suite passed 22/22; the expanded existing regression checks both the Gateway response and the canonical durable SQLite session entry:

    OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/private/tmp/openclaw-ui-qa-reset-vitest-c3051d45 node scripts/run-vitest.mjs src/gateway/server.sessions.reset-cleanup.test.ts --configLoader runner
  • Independent owner-boundary review and isolated source review: clean.

  • Production delta: +4 lines for four existing durable preference fields; existing regression delta: +5 lines net. No protocol, configuration, or database-schema changes.

@clawsweeper

clawsweeper Bot commented Aug 20, 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 gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 20, 2026
@steipete
steipete marked this pull request as ready for review August 20, 2026 07:20
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Aug 20, 2026
@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 3:32 AM ET / 07:32 UTC.

ClawSweeper review

What this changes

The PR preserves a conversation’s icon, custom group, preferred Control UI face, and visibility setting when Gateway resets its durable session entry.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer merge review. No blocking code finding: the PR repairs the durable reset owner that current main demonstrably omits, with a meaningful RPC-plus-store regression test.

Priority: P2
Reviewed head: 3bea22025c383cfffbcca56f5873c36aed138ef6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrow owner-boundary repair and meaningful regression test are good quality; exact-head validation and inspectable UI proof remain useful risk reducers.
Proof confidence 🌊 off-meta tidepool Not applicable: This is maintainer-authored, so the external-contributor proof gate does not apply; the body nevertheless describes a live Control UI flow that was not independently inspectable here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is maintainer-authored, so the external-contributor proof gate does not apply; the body nevertheless describes a live Control UI flow that was not independently inspectable here.
Evidence reviewed 5 items Current-main defect: Current main carries label forward but immediately continues with displayName, omitting icon, category, boardFace, and visibility from the rebuilt reset entry.
Owner-boundary repair: The PR adds the four omitted persisted preferences at the same replacement-entry builder, before the canonical lifecycle writer persists it.
Regression coverage: Current main tests only responseUsage and pinnedAt; the PR extends that boundary test to assert the reset RPC response and the persisted session entry for all existing preferences.
Findings None None.
Security None None.

Live Verification

Command: OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server.sessions.reset-cleanup.test.ts --configLoader runner

Result: FAIL (failed) — execution before step 1 run: live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

Assertions:

  • FAIL expect_output: sessions.reset preserves explicit session preferences across session rollover

How this fits together

Gateway session reset clears a conversation’s run and transcript state, then rebuilds its durable session entry. The Control UI reads that entry to restore sidebar grouping, icon, preferred view, and collaboration visibility.

flowchart LR
A[Control UI or command reset] --> B[Gateway reset service]
B --> C[Current durable session entry]
C --> D[Build replacement entry]
D --> E[SQLite session store]
E --> F[Control UI session list]
E --> G[Sharing policy]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is behind current main; revalidate the focused reset test and merge result on the exact head before landing.
  • Resolve merge risk (P1) - The PR body describes a live Control UI flow, but this review context contains no inspectable screenshot, video, or terminal artifact for that claim.
Agent review details

Security

None.

PR surface

Source +4, Tests +5. Total +9 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 0 +4
Tests 1 16 11 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 20 11 +9

Review metrics

Metric Value Why it matters
Production versus test delta production +4, tests net +5 The four production lines directly preserve four existing durable preferences at their lifecycle owner, with focused response-and-store regression coverage.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/session-reset-service.ts. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #123520
Summary: This PR is the candidate fix for the open report about reset dropping a session category, and correctly extends the same owner-boundary invariant to adjacent durable preferences.

Members:

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

Merge-risk options

Maintainer options:

  1. Refresh exact-head reset proof (recommended)
    Rebase or otherwise validate the clean merge result, then run the focused reset lifecycle test and attach inspectable redacted Control UI evidence if landing now.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Validate the clean merge result, run the focused reset lifecycle test on the exact head, and attach redacted Control UI reset evidence.

Technical review

Best possible solution:

Land the four explicit carry-forward fields at the reset builder after exact-head validation and maintainer-owned Control UI proof; a net-neutral refactor is not clearer because each field is an independent durable preference.

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

Yes—source reproducible: current main’s reset builder preserves label but omits the four persisted preferences. This read-only review did not run tests, and the checkout environment has no pnpm executable.

Is this the best way to solve the issue?

Yes. The replacement-entry builder is the canonical producer for reset state, so carrying the existing fields there is safer than a Control UI workaround or downstream restoration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2a79f747019c.

Labels

Label changes:

  • add P2: Reset currently drops durable conversation presentation and sharing preferences, a bounded but user-visible session-state defect.
  • add merge-risk: 🚨 session-state: The change alters which persisted session fields survive a destructive reset lifecycle operation.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is maintainer-authored, so the external-contributor proof gate does not apply; the body nevertheless describes a live Control UI flow that was not independently inspectable here.

Label justifications:

  • P2: Reset currently drops durable conversation presentation and sharing preferences, a bounded but user-visible session-state defect.
  • merge-risk: 🚨 session-state: The change alters which persisted session fields survive a destructive reset lifecycle operation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is maintainer-authored, so the external-contributor proof gate does not apply; the body nevertheless describes a live Control UI flow that was not independently inspectable here.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the PR and the most recent available reset-service history entry. (role: recent reset-service contributor; confidence: high; commits: 3bea22025c38, efc33f882e9b; files: src/gateway/session-reset-service.ts)
  • PollyBot13: The current-main reset regression test dates to the v14 session-schema migration commit. (role: recent session-state test contributor; confidence: medium; commits: 035853b9211c; files: src/gateway/server.sessions.reset-cleanup.test.ts)

Rank-up moves

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

  • Validate the focused reset suite on the exact merge head.
  • Attach a redacted before/after Control UI reset artifact if this PR is landing now.

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.

@steipete
steipete merged commit 4fd208f into main Aug 20, 2026
278 of 322 checks passed
@steipete
steipete deleted the codex/issue-123520-session-reset-preferences-c3051d45 branch August 20, 2026 08:06
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
teddytennant added a commit to teddytennant/openclaw that referenced this pull request Sep 4, 2026
Channel /reset dropped operator-owned appearance even after openclaw#126575.
icon, color, category, boardFace, and visibility now travel with the
preserved reset selection. A session without an icon still has none.

Closes openclaw#138251
cursor Bot pushed a commit to teddytennant/openclaw that referenced this pull request Oct 16, 2026
Channel /reset dropped operator-owned appearance even after openclaw#126575.
Gateway and channel resets share preserveResetSessionPresentation(),
which keeps icon, color, category, boardFace, boardPresentation,
visibility, and pinnedAt. Model and auth filtering stay in
resolveResetPreservedSelection. A session without an icon still has none.

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

Labels

gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

Bug: Session reset drops the category field (session falls back to "Ungrouped")

1 participant