Repository navigation
improve(chat): load conversation history on demand - #1040
Merged
shanselman merged 6 commits intoJul 21, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 831649d0-a3be-4df1-9734-8dbff43bd2b3
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 831649d0-a3be-4df1-9734-8dbff43bd2b3
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 831649d0-a3be-4df1-9734-8dbff43bd2b3
calebeden
marked this pull request as ready for review
July 21, 2026 17:38
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f08214a3-7553-4cfe-bad3-8d9527d05f08
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f08214a3-7553-4cfe-bad3-8d9527d05f08
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: improve(chat): load conversation history on demand This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
shanselman
added a commit
to calebeden/openclaw-windows-node
that referenced
this pull request
Jul 21, 2026
Integrate openclaw#1040 demand-loaded history (LoadHistoryCoreAsync split, generation CTS, connection version guards) with PR openclaw#1036 authoritative reload path. Resolve provider conflicts preserving both connection-versioned history flights and authoritative reload pending queue. Address review findings: - Replace hardcoded 'New session' with localized Chat_PendingNewSessionTitle across all 5 locales (en-us, fr-fr, nl-nl, zh-cn, zh-tw) - Fix authoritative reload dropping valid live entries without OpenClawSeq when gateway clock skews behind local time: entries with no seq are now preserved since history coverage cannot be determined - Add post-timeout session list reconciliation for /new failures so user can see potentially-created sessions (protocol has no idempotency key; guidance message retained by design) - Add behavioral composer submission policy tests (reference equality, identity preservation, edit-during-send) - Add behavioral pending selection survival test for stale snapshots Co-authored-by: Copilot App <[email protected]> Copilot-Session: d2982ca8-bb56-4728-85bd-29542ce9d554
4 of 16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Windows tray previously loaded the full transcript for every known session during startup and reconnect. Users with many sessions paid for unnecessary gateway requests, transcript processing, telemetry volume, and startup work even when they opened only one conversation.
Why This Change Was Made
sessions.listmetadata remains eager and complete for the session picker, whilechat.historyis demand-loaded for the current/default or explicitly selected session. Successful loads are cached only for the current connection generation. Disconnect, reconnect, disposal, delayed retries, stale responses, notifications, and queued UI delivery are generation-guarded so old work cannot mutate or report against a newer connection or consume its retry budget.OpenClawChatRootremains the initial/selected-session load owner;ChatWindowno longer starts a second eager path. Render-driven requests run only while the snapshot is connected.User Impact
Users with many sessions should see less startup and reconnect work. Session discovery remains unchanged. Selecting an unopened conversation loads it once; returning to a transcript already loaded in the same connection generation reuses the cached timeline. Failures from a superseded/disposed generation no longer surface stale error UX.
Change Type
Scope
winnodeValidation
Validated on merged current
origin/main(54927b46) at PR head6bfa6a8c:$env:OPENCLAW_REPO_ROOT=(Get-Location).Path; .\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --settings <sequential-runsettings>dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-build -c Debug -r win-x64 --filter "Category!=Accessibility"Category=Accessibility)mainBuild and Test, CodeQL, and push workflows are green at54927b46.6bfa6a8cThe default parallel Tray run twice exposed the pre-existing shared identity-file race in different connection tests. Each failed test passed in isolation; the complete Tray suite passed with xUnit collection parallelism disabled.
Real Behavior Proof
6bfa6a8c.Sending frame: chat.history; no transcript contents, IDs, prompts, or responses were included in proof output.chat.historyrequest; returning to the generation-cached default emitted 0 additional requests. Both transcripts rendered normally.d802c016emitted exactly 1 startup request. Final follow-ups affect generation, retry, notification, and delivery ordering; current-head proof directly reverified selected-session+1and cached-return+0behavior.Concurrency and Telemetry Coverage
Deterministic behavioral tests verify:
sessions.listhistory fan-out;_historyInFlightreservation are atomic under_gate;_gate, while cancellation/disposal occurs outside it;initial/forcedsources and privacy-safe exception-type-only failure telemetry.Review
Accepted and fixed review findings:
NotificationRequestedneeded post-callback telemetry/retry revalidation;_gaterisked callback deadlock and old CTS instances were not disposed;Final code-review and rubber-duck passes on the completed implementation found no significant actionable issues. The bundled
autoreviewcommand was attempted twice earlier but blocked before model execution by the local Codex helper-path restriction; it is reported as blocked, not clean.GitHub review conversations: no inline/review findings. ClawSweeper has started a fresh review of current head
6bfa6a8cand currently shows only itsreview startedplaceholder.Security Impact
chat.historycalls are reduced; endpoint and payload shape are unchanged.Compatibility and Migration