Skip to content

fix(chat): show checkpoint details for compacted history - #1091

Merged
bkudiess merged 5 commits into
openclaw:mainfrom
calebeden:calebeden-restore-compaction-card
Aug 5, 2026
Merged

bkudiess merged 5 commits into
openclaw:mainfrom
calebeden:calebeden-restore-compaction-card

Conversation

@calebeden

@calebeden calebeden commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.

What Problem This Solves

Fixes an issue where users viewing a compaction event in Chat would see a generic status instead of checkpoint-focused compacted-history details. It also avoids taking users to the Sessions page just to display the checkpoint dialog.

Why This Change Was Made

The Reactor timeline now renders structured compaction events with the web-parity checkpoint explanation and an Open checkpoints action. A shared checkpoint dialog coordinator hosts the existing list, branch, and restore workflow on the invoking Chat surface while remaining reusable from Sessions.

A maintainer patch also makes successful restores replace the active Chat transcript with fresh gateway history. It invalidates pre-restore history responses, preserves genuinely new post-restore events, and suppresses stale failure notifications and retries.

User Impact

Users can see that compacted history is preserved as a checkpoint and open that session's checkpoints directly over Chat without losing their place. After restoring a checkpoint, Chat no longer shows messages that the gateway archived.

Evidence

  • UI automation at 2a85a0d3 verified the localized compacted-history card, checkpoint explanation, and Open checkpoints action.
  • Invoking the action opened the checkpoint dialog over Chat while Chat remained selected and Sessions remained unselected.
  • Three deterministic restore-replacement tests verify stale-entry removal, in-flight response invalidation, post-restore live-entry preservation, and stale notification/retry suppression.
  • Focused Chat and checkpoint coverage: 313 passed, 0 skipped, 0 failed.
  • Shared suite: 3,399 passed, 32 skipped, 0 failed.
  • Tray suite: 2,053 passed, 0 skipped, 0 failed.
  • Full repository build succeeded for Windows x64.
  • Conflict-boundary WinUI theme proof: 2 passed, 0 skipped, 0 failed.
  • Independent Opus and Codex adversarial reviews found no actionable issues in the maintainer patch or the conflict-resolved 5fdba1d0 head. Latest main merged without conflicts and was validated at 6093c50a.

UI screenshots from the visual change

Screenshot 2026-08-04 162114 Screenshot 2026-08-04 162124

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

  • .\build.ps1 - passed.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore - 3,399 passed, 32 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore - 2,053 passed, 0 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~SessionActionsWiringTests|FullyQualifiedName~ChatTimelinePresentationTests|FullyQualifiedName~OpenClawChatDataProviderTests" - 313 passed, 0 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --filter "FullyQualifiedName~ChatTimelineThemeResourceProofTests" - 2 passed, 0 skipped, 0 failed.

Real Behavior Proof

  • Environment tested: original visual proof on Windows ARM64; maintainer patch and merged-head validation on Windows x64 with .NET 10 SDK.
  • PR head or commit tested: 6093c50a.
  • Exact steps or command run: launched the Debug ARM64 package at the visual-change head, inspected Chat through UI Automation, invoked Open checkpoints, and inspected the resulting dialog and navigation state. On merged head, ran the restore-replacement provider tests and the conflict-boundary WinUI theme proof listed above.
  • Evidence after fix: the card displayed COMPACTED HISTORY, the checkpoint-preservation explanation, and Open checkpoints. The checkpoint dialog opened over the same Chat page. Restore tests prove the cached transcript is cleared and rebuilt from fresh history while post-restore live entries remain.
  • Observed result: Chat remained selected, Sessions remained unselected, and the card and dialog had no visible clipping, overlap, or dark-theme issues. Restore reconciliation removed archived messages and rejected stale pre-restore completions, notifications, and retries.
  • Screenshot or artifact links verified? (Yes/No/N/A): Yes. Both GitHub-hosted screenshots return valid PNG content and show the visual portion of the change.
  • Not verified or blocked: A live gateway checkpoint restore was not repeated on merged head 6093c50a. The restore aftermath is covered by deterministic provider tests. The maintainer patch changed state reconciliation, not visual composition.

Security Impact

  • New permissions or capabilities? (Yes/No): No.
  • Secrets or tokens handling changed? (Yes/No): No.
  • New or changed network calls? (Yes/No): Yes. The Chat action invokes the existing typed checkpoint list, branch, and restore APIs already used by Sessions. After a successful restore, it also refreshes chat.history so the local transcript matches gateway state.
  • Command or tool execution surface changed? (Yes/No): No.
  • Data access scope changed? (Yes/No): No.
  • If any answer is Yes, explain the risk and mitigation: The action only exposes existing current-session checkpoint workflows on another trusted app surface. The added history refresh reads the same selected session after restore and adds no endpoint, permission, credential handling, or broader data access.

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes.
  • Config or environment changes? (Yes/No): No.
  • Migration needed? (Yes/No): No.
  • If yes, list the exact upgrade steps: N/A.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 3:30 AM ET / 07:30 UTC.

ClawSweeper review

What this changes

This PR turns generic Chat compaction statuses into checkpoint-detail cards, opens the existing checkpoint workflow over Chat, and refreshes the transcript after a restore.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 8 items remain

This PR remains necessary because current main still renders generic compaction statuses. Keep it open, but require a complete final-head source review and live restore proof before merge.

Priority: P2
Reviewed head: 5fdba1d0ca7e7d359290583d5f9c33b433be628e

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The visual behavior and tests are promising, but the final restore path lacks direct runtime proof, retains an ownership blocker, and cannot be fully inspected here.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The screenshots demonstrate the earlier visual card and dialog, but the PR explicitly lacks a final-head live gateway restore proving the later transcript-replacement behavior. Redact private endpoints, IPs, and tokens in added proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The screenshots demonstrate the earlier visual card and dialog, but the PR explicitly lacks a final-head live gateway restore proving the later transcript-replacement behavior. Redact private endpoints, IPs, and tokens in added proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Current main still lacks the requested behavior: Current main routes status items through the generic status card and has no structured compaction card or checkpoint action.
PR is not already on current main: The PR head is not an ancestor of current main; current main contains the later Chat anchoring fix instead.
Final patch blobs were unavailable: The blobless checkout could not retrieve required PR objects because github.com DNS resolution failed, preventing a complete source-level diff review.
Findings 1 actionable finding [P2] Extract checkpoint-restore history coordination
Security None None.

How this fits together

WinUI Chat renders gateway session history and compaction events. The new checkpoint action reuses session checkpoint APIs, then reloads the active transcript after a restore.

flowchart LR
  A[Gateway session history] --> B[Chat timeline]
  B --> C[Compacted-history card]
  C --> D[Checkpoint dialog]
  D --> E[Branch or restore]
  E --> F[Fresh gateway history]
  F --> B
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The screenshots demonstrate the earlier visual card and dialog, but the PR explicitly lacks a final-head live gateway restore proving the later transcript-replacement behavior. Redact private endpoints, IPs, and tokens in added proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Extract checkpoint-restore history coordination (P2) - The preceding review's P2 remains on this exact head. This method adds restore-specific generations, reload state, stale-notification suppression, and retry coordination to the provider even though the architecture ledger directs growth toward a history-loading seam. Move this cohesive workflow there and retain provider delegation.
  • Resolve merge risk (P1) - The final PR blobs could not be retrieved, so a complete source-level and security review cannot be completed in this checkout.
  • Resolve merge risk (P1) - A checkpoint restore replaces active transcript state, but the PR explicitly lacks a final-head live gateway restore proof for that behavior.
  • Complete next step (P2) - A complete final diff and final-head gateway restore proof are required before a safe merge or automated repair path can be chosen.
  • Improve patch quality - Extract checkpoint-restore history coordination from the Chat provider.
  • Improve patch quality - Add redacted final-head live gateway restore evidence.
  • Improve patch quality - Request a fresh review after the complete final diff is accessible.

Findings

  • [P2] Extract checkpoint-restore history coordination — src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs:1010-1013
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 18 files, +1001/-279 lines The PR combines visible Chat UX, shared dialog extraction, and transcript-state reconciliation.
Production and test delta production +697/-269, tests +304/-10 Most added lines change production behavior, making direct final-head proof and a clear owner boundary important.

Merge-risk options

Maintainer options:

  1. Extract and prove the restore path (recommended)
    Move checkpoint-restore transcript replacement into the history-loading seam, then provide a redacted final-head live gateway restore capture.
  2. Pause until review inputs are available
    Do not merge while the complete final-head source cannot be inspected and restore-state behavior lacks direct runtime evidence.

Technical review

Best possible solution:

Keep the Chat card and shared checkpoint dialog, move restore-specific reconciliation into the designated history-loading seam, then add redacted final-head gateway restore proof.

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

Yes, from source: current main sends compaction status events through the generic status renderer. A live reproduction was not run, and the final PR head could not be fully inspected.

Is this the best way to solve the issue?

No. Reusing the existing checkpoint workflow is the right user-facing path, but restore-specific history coordination should leave the growing Chat provider and be proved on the final head.

Full review comments:

  • [P2] Extract checkpoint-restore history coordination — src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs:1010-1013
    The preceding review's P2 remains on this exact head. This method adds restore-specific generations, reload state, stale-notification suppression, and retry coordination to the provider even though the architecture ledger directs growth toward a history-loading seam. Move this cohesive workflow there and retain provider delegation.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.68

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Chat usability and session-state fix without evidence of an urgent outage.
  • merge-risk: 🚨 session-state: The patch clears and rebuilds the active transcript after checkpoint restore, which can stale or lose visible session entries if wrong.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The screenshots demonstrate the earlier visual card and dialog, but the PR explicitly lacks a final-head live gateway restore proving the later transcript-replacement behavior. Redact private endpoints, IPs, and tokens in added proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The screenshots demonstrate the earlier visual card and dialog, but the PR explicitly lacks a final-head live gateway restore proving the later transcript-replacement behavior. Redact private endpoints, IPs, and tokens in added proof.

Evidence

What I checked:

  • Current main still lacks the requested behavior: Current main routes status items through the generic status card and has no structured compaction card or checkpoint action. (src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:922, ca8fb4a404ad)
  • PR is not already on current main: The PR head is not an ancestor of current main; current main contains the later Chat anchoring fix instead. (ca8fb4a404ad)
  • Final patch blobs were unavailable: The blobless checkout could not retrieve required PR objects because github.com DNS resolution failed, preventing a complete source-level diff review. (5fdba1d0ca7e)
  • Repository policy applies: Repository policy requires current-head visible UI and gateway-path proof when available, and directs additions to the Chat provider toward a history-loading seam. (docs/ARCHITECTURE.md:66, ca8fb4a404ad)

Likely related people:

  • Karen: Current-main history attributes the Reactor Chat migration and newest Chat timeline fix to this contributor. (role: recent Chat timeline contributor; confidence: medium; commits: 9acafa606a4d, ca8fb4a404ad; files: src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs)
  • Barbara Kudiess: Current history includes Chat data-provider work, and the supplied PR history attributes restore reconciliation to this contributor. (role: recent Chat data-provider contributor; confidence: medium; commits: 4806eaac7c24, 81f8098b6b2e; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)
  • Caleb Eden: Current history lists prior lifecycle-command and on-demand history work in the same Chat area. (role: prior Chat feature contributor; confidence: medium; commits: 2fb1da26c175, 282e583e7257; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)

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 (5 earlier review cycles)
  • reviewed 2026-08-04T22:14:08.689Z sha 23518cc :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-04T23:09:30.992Z sha 2a85a0d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-04T23:27:14.282Z sha 2a85a0d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-05T07:08:50.589Z sha 81f8098 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-05T07:19:13.672Z sha 5fdba1d :: needs real behavior proof before merge. :: [P2] Move replacement-history coordination out of the Chat provider

Restore checkpoint-focused compaction copy and open the shared checkpoint dialog directly over the invoking chat surface.

Co-authored-by: Copilot App <[email protected]>
@calebeden calebeden changed the title fix(chat): compaction events show generic status instead of details fix(chat): show checkpoint details for compacted history Aug 4, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 4, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. label Aug 5, 2026
@bkudiess
bkudiess merged commit d2de615 into openclaw:main Aug 5, 2026
15 checks passed
@calebeden
calebeden deleted the calebeden-restore-compaction-card branch August 5, 2026 16:53
@clawsweeper clawsweeper Bot mentioned this pull request Nov 18, 2026
7 of 16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants