Skip to content

fix: remove old chat questions and notices after reset - #203274

Merged
obviyus merged 2 commits into
openclaw:mainfrom
jipeng6036-del:fix/clear-reset-transcript-auxiliary-rows
Nov 21, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
jipeng6036-del:fix/clear-reset-transcript-auxiliary-rows

Conversation

@jipeng6036-del

@jipeng6036-del jipeng6036-del commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Root cause: ui/src/pages/chat/chat-thread-build.ts:500 (notices) and :577 (question summaries) placed the browser-only observer notices and answered question summaries by timestamp, without checking the reset divider the same build emits at :262. So after /reset they stayed above "Session reset" until reload.

Closes #203215

What Problem This Solves

After a chat reset, the Control UI can still show an earlier answered question and a system notice above the reset divider. The Gateway history is already clear, but the browser can still have those rows cached.

User Impact

The reset divider starts the cleared transcript. Questions and notices from later activity still appear in the same chat.

Why This Change Was Made

The transcript already reads the reset marker from Gateway history. The same projection now uses its timestamp to filter cached questions and notices from earlier turns.

Thanks @NovaeonStudio for isolating the two stale rows and checking the Gateway history.

Evidence

On Windows, I ran a local OpenClaw Gateway in Chromium with a scripted chat provider and a failing utility provider. I answered a question, waited for the actual observer warning, then sent /reset. On adc0876, both old rows stayed above the divider. On ed525f7, both disappeared, and a new question could still be answered. In both runs, the Gateway returned the reset marker and an empty question list. I also kept an answered question in a second session across the reset and confirmed the cleared transcript after reconnecting.

The new regression fails on the base. The four relevant UI test files pass (42 tests), along with pnpm check:changed --staged.

Clean comparison

Before

Answered question and system notice above the reset divider

After

Reset divider and new transcript with both old rows gone

Annotated comparison

Before

Earlier question and notice outlined above the reset divider

After

Reset divider outlined at the beginning of the transcript

Maintainer browser check

Re-checked on a real isolated Gateway with the built Control UI in Chromium, using the same scenario: a scripted model that runs commands and then asks one ask_user question, plus a utility model that always fails so the observer notice appears. The post-reset question is asked in the same tab, before any reload. Base is main at 2c47390; this branch is 48dddba:

Step Base This PR
A after /reset, same tab old question card and observer notice above the divider only the divider, /reset, and the reply
New question in A after the reset, same tab n/a question card and notice shown below the divider
Session B, same tab its question and notice shown its question and notice shown
A after reload clean clean

Screenshots and observed lines: #203274 (comment)

A maintainer commit on top swaps the render-only unit case for one regression in chat-pane-retired-event.test.ts. That test mounts a real pane, loads history through the path the browser takes (the cursor read returns kind: "reset", then a full transcript that starts with a reset marker), and asks a new question in the same pane afterwards. It fails on the base (expected [ 'notice', 'before-reset' ] to deeply equal []) and passes here.

Size: Control UI gzip +54 B, all in control-ui-boot-chat-styles. Production +13/−5 lines, tests +73/−0.

This replaces #203288, a maintainer PR that made the same change.

Merge danger: two-way door. This changes display only and writes no state, so a revert fully undoes it. If it's wrong, the worst case is a Control UI chat hiding a question card or notice that should show after a reset.

@clawsweeper

clawsweeper Bot commented Nov 21, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 21, 2026
@clawsweeper

clawsweeper Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Hide browser-cached question summaries and notices created before the latest session reset marker.

Example: Answer “Which initial output should I use?” with “Text,” receive an observer warning, then send /reset.

  • Before: The answered question and warning remain above the Session reset divider.
  • After: Both old rows disappear, while questions and notices created after reset remain visible.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused repair with convincing browser evidence and a meaningful regression; broad current-head CI remains incomplete.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium screenshots show stale question and notice rows removed after reset; the current-head isolated-Gateway browser report verifies same-tab subsequent activity, session isolation, and reload behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A cleared conversation still displays answered questions and observer notices from before reset.
Reason: The narrow display repair restores the existing reset contract, and the maintainer verified and adopted its direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides a focused, browser-proven fix for a current reset-display bug, with no actionable findings; current-head CI is still running.

Priority: P2
Reviewed head: 48dddba7948a00dc332627dc59dfefd01c54768b

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI transcript builder combines Gateway history with browser-held questions and notices to produce visible chat rows.

flowchart TD
  A[Gateway history] --> D[Transcript builder]
  B[Browser questions] --> D
  C[Browser notices] --> D
  D --> E[Reset boundary filtering]
  E --> F[Visible chat rows]
Loading

Technical review

Best possible solution:

Use the existing transcript reset marker to exclude earlier browser-only rows, as this PR does.

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

Current-main source exposes both missing reset cutoffs, supported by the released-version report and inspected before/after browser evidence; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete fix within the existing transcript owner: derive one cutoff and apply it to both browser-only projections without adding state or changing other sessions.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Reset boundary keeps the original intent (a1846db: Make resets durable, visible transcript facts across storage backends and clients.)
  • Resolved question summaries keeps the original intent (18136c9: Keep pending questions in the composer and resolved summaries associated with their original run.)
  • Permission and system notices keeps the original intent (c0888b4: Display actionable native-permission guidance while avoiding duplicate notices already represented by recorded results.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +8, Tests +73. Total +81 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 13 5 +8
Tests 1 73 0 +73
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 86 5 +81

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +13/−5 lines; tests +73/−0 lines The small projection repair is covered by one pane regression protecting removal and subsequent-row retention.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #203215
Summary: This PR owns the repair for the linked issue; the parallel maintainer PR was closed in its favor.

Members:

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

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on maintainer: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Reset leaves misleading old rows visible, but reloading recovers the display and chat remains usable.
  • 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.
  • 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 execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-21T20:14:46.728Z sha ed525f7 :: blocked before merge. :: none

Reviewed November 21, 2026, 3:58 PM ET / 20:58 UTC (Revision 2).

- The regression now mounts a chat pane, reloads history through a cursor reset onto a transcript that starts with a reset marker, and asks a new question in the same pane afterwards.
- It replaces the render-only case, which covered the same boundary.
@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Maintainer browser check: real isolated Gateway, built Control UI, Chromium. Base is main at 2c47390; this PR is at 48dddba. Screenshots, in order: base after /reset, this PR after /reset, a new question asked after the reset in the same tab, untouched session B, A after reload.

BASE  A after reset: {"divider":true,"questions":[{"text":"Where should aone deploy? Target aone: Staging","aboveDivider":true}],"notices":[{"aboveDivider":true}]}
PR    chat.history after reset: [{"role":"system","kind":"reset"},{"role":"user"},{"role":"assistant"}]
PR    A after reset: {"divider":true,"questions":[],"notices":[]}
PR    A after post-reset question (same tab): {"divider":true,"questions":[{"text":"Where should atwo deploy? Target atwo: Staging","aboveDivider":false}],"notices":[{"aboveDivider":false}]}
PR    B after A reset: {"divider":false,"questions":[{"text":"Where should bone deploy? Target bone: Staging","aboveDivider":null}],"notices":[{"aboveDivider":null}]}
PR    A after reload: {"divider":true,"questions":[],"notices":[]}

Regression chat-pane-retired-event.test.ts on base adc0876: AssertionError: expected [ 'notice', 'before-reset' ] to deeply equal []. On 48dddba: passes.

Before: old question card and observer notice above Session reset

After: only the reset divider and reply

After: question asked after the reset shows in the same tab

After: other session keeps its rows

After: clean after reload

@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 21, 2026
@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Maintainer override: the one red job on this head is inherited, not caused by this PR.

  • The only real failure is checks-ui (1/3): ui/src/pages/config/settings-search.test.ts:26 ("searches and displays static settings blocks in the active locale").
  • This PR changes only ui/src/pages/chat/chat-thread-build.ts and a chat test, so it cannot reach settings search.
  • The same test fails the same way locally at the untouched merge base adc0876, and in CI on unrelated PRs: run 44949148981, run 44948705604, run 44948201989.
  • Exact-head proof: real Gateway and built Control UI in Chromium, before/after screenshots inspected (proof comment linked from Evidence); exact-head ClawSweeper review 4/6 with no findings.

@obviyus
obviyus merged commit c8dffcd into openclaw:main Nov 21, 2026
93 of 100 checks passed
@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Merged in c8dffcd. Thanks @jipeng6036-del for the fix and @NovaeonStudio for the clear report in #203215. After /reset in the Control UI, answered question cards and session-observer notices from before the reset no longer stay above the "Session reset" divider. Both are now scoped to the transcript's reset marker, so rows from after the reset still show, other sessions are untouched, and a reload stays clean.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 22, 2026
Root cause: ui/src/pages/chat/chat-thread-build.ts:500 (notices) and :577 (question summaries) placed the browser-only observer notices and answered question summaries by timestamp, without checking the reset divider the same build emits at :262. So after `/reset` they stayed above "Session reset" until reload.

Closes openclaw#203215

## What Problem This Solves

After a chat reset, the Control UI can still show an earlier answered question and a system notice above the reset divider. The Gateway history is already clear, but the browser can still have those rows cached.

## User Impact

The reset divider starts the cleared transcript. Questions and notices from later activity still appear in the same chat.

## Why This Change Was Made

The transcript already reads the reset marker from Gateway history. The same projection now uses its timestamp to filter cached questions and notices from earlier turns.

Thanks @NovaeonStudio for isolating the two stale rows and checking the Gateway history.

## Evidence

On Windows, I ran a local OpenClaw Gateway in Chromium with a scripted chat provider and a failing utility provider. I answered a question, waited for the actual observer warning, then sent `/reset`. On `ed8af5b`, both old rows stayed above the divider. On `ed525f7`, both disappeared, and a new question could still be answered. In both runs, the Gateway returned the reset marker and an empty question list. I also kept an answered question in a second session across the reset and confirmed the cleared transcript after reconnecting.

The new regression fails on the base. The four relevant UI test files pass (42 tests), along with `pnpm check:changed --staged`.

### Clean comparison

**Before**

![Answered question and system notice above the reset divider](https://github.com/user-attachments/assets/c3162099-8413-442a-b622-671ec3beda09)

**After**

![Reset divider and new transcript with both old rows gone](https://github.com/user-attachments/assets/cf446ff3-f97f-4602-8f0d-12ccb057f579)

### Annotated comparison

**Before**

![Earlier question and notice outlined above the reset divider](https://github.com/user-attachments/assets/5677f781-b05b-44a7-9302-4d16e25840b9)

**After**

![Reset divider outlined at the beginning of the transcript](https://github.com/user-attachments/assets/9024c3c5-e0ed-4d61-822a-687fe8e7a64d)

### Maintainer browser check

Re-checked on a real isolated Gateway with the built Control UI in Chromium, using the same scenario: a scripted model that runs commands and then asks one `ask_user` question, plus a utility model that always fails so the observer notice appears. The post-reset question is asked in the same tab, before any reload. Base is main at 8b61bc2; this branch is 48dddba:

| Step | Base | This PR |
|---|---|---|
| A after `/reset`, same tab | old question card and observer notice above the divider | only the divider, `/reset`, and the reply |
| New question in A after the reset, same tab | n/a | question card and notice shown below the divider |
| Session B, same tab | its question and notice shown | its question and notice shown |
| A after reload | clean | clean |

Screenshots and observed lines: openclaw#203274 (comment)

A maintainer commit on top swaps the render-only unit case for one regression in `chat-pane-retired-event.test.ts`. That test mounts a real pane, loads history through the path the browser takes (the cursor read returns `kind: "reset"`, then a full transcript that starts with a reset marker), and asks a new question in the same pane afterwards. It fails on the base (`expected [ 'notice', 'before-reset' ] to deeply equal []`) and passes here.

Size: Control UI gzip +54 B, all in `control-ui-boot-chat-styles`. Production +13/−5 lines, tests +73/−0.

This replaces openclaw#203288, a maintainer PR that made the same change.

**Merge danger:** two-way door. This changes display only and writes no state, so a revert fully undoes it. If it's wrong, the worst case is a Control UI chat hiding a question card or notice that should show after a reset.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
…#203236)

* fix(update): back off identical automatic update failures

Automatic campaigns retried a target that kept failing the same way before
activation (for example managed-service-stop-failed) every hour forever. One
install accumulated ~330 failed runs, each costing a validation pass and a
candidate state snapshot.

The campaign already used the newest terminal run rows as its durable backoff
fact for repeated activation failures. Extend that streak to every identical
failure class for the same target: keep the hourly first retry, then wait 2, 4,
8 and 16 hours and once a day after six. A new target, a success, or a manual
update breaks the streak. No new state, store, or config.

Refs #202954

* test(update): assert backoff expiry before the new-candidate reset

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit adc0876)

Companion audit: #203194 and #203497 change update architecture and are not needed by the backoff; #203274 is chat reset cleanup, #203528 is node credential repair, and #203578 adds a separate database custody refusal. #203152 addresses stopping a Gateway after a Node runtime respawn, not pre-mutation outcome history; no dependency on that process-shutdown repair.

Co-authored-by: RomneyDa <[email protected]>
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 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: 🐚 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: answered question cards and session-observer notices survive /reset above the reset divider

2 participants