Repository navigation
fix(chat): preserve reasoning and tool trace after navigation - #118332
fuller-stack-dev merged 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 9:37 PM ET / August 3, 2026, 01:37 UTC. ClawSweeper reviewWhat this changesThe branch preserves sanitized reasoning and tool-call blocks in mixed assistant history messages, then renders enabled reasoning in native chat while leaving copied and exported text answer-only. Merge readinessKeep this member-authored, maintainer-labeled PR open for explicit maintainer review. Current Priority: P2 Review scores
Verification
How this fits togetherPersisted assistant transcript messages are sanitized by the Gateway before flowchart LR
A[Persisted assistant transcript] --> B[Gateway history request]
B --> C[Sanitized display projection]
C --> D[History response]
D --> E[Control UI reload]
D --> F[Native chat rendering]
E --> G[Reasoning and tool trace restored]
F --> G
Decision needed
Why: The author is a repository member and the PR carries the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +158, Other +30. Total +196 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the Gateway sanitizer as the canonical history-projection owner, preserve its bounded and stripped blocks, and land the replay-parity repair only after the exact-head Apple checks are green or their failure is shown unrelated. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main's mixed-tool history projection at Is this the best way to solve the issue? Yes. Repairing the Gateway display projection is the narrowest maintainable fix because it serves both Control UI and native consumers after per-block sanitization; the native change only renders already-canonical structured thinking under its existing reasoning-display option. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f2af4e97b356. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
b453dd9 to
f281e07
Compare
f281e07 to
f258ef6
Compare
|
Merged via squash.
|
Summary
chat.historyprojects a mixed assistant messageRoot cause
Transcript persistence retained the complete assistant turn. The loss occurred later in the gateway display projection: the mixed text/tool branch rebuilt the message from visible text blocks only, discarding sanitized
thinkingandtoolCallsiblings. Live events could therefore show the full trace, while authoritative history replay after navigation could not.The durable invariant is that history projection may sanitize and bound blocks, but must not change their visibility merely because visible text and tool activity share one assistant message.
Validation
3c4dbea2ed17f084d8584ca78dcfb49ffee94ae1: mixed history returned text only (Testbox run)swift test --package-path apps/shared/OpenClawKit --filter ChatMessageVisibleTextTests: 8 passedchanged=false; Android and Apple inventories verified (Testbox run)pnpm check:changed: passed all selected core, core-test, and app lanes (Testbox run)Production delta is +11 lines net; tests add the gateway regression, native enable/disable and copy guard, and the browser navigation contract.