Repository navigation
fix: preserve WebChat reply context after reloads - #122169
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
80dd8cb to
253cbfe
Compare
|
Codex review: needs changes before merge. Reviewed August 11, 2026, 3:04 PM ET / 19:04 UTC. ClawSweeper reviewWhat this changesThe PR stores WebChat reply metadata in user-turn transcripts and adds reply previews that can fetch, reveal, and highlight source messages after reload or history pagination. Merge readiness⛔ Blocked by patch quality or review findings - 6 items remain Keep this PR open: both blockers from the prior ClawSweeper review remain on the current head, so the advertised reload and navigation behavior is still incomplete. Priority: P2 Review scores
Verification
How this fits togetherWebChat sends a user reply through the Gateway, which writes transcript metadata that is later projected into the Control UI history. The UI then renders the reply preview and either finds the source locally or loads older history before scrolling to it. flowchart LR
A[WebChat reply action] --> B[Gateway chat send]
B --> C[User-turn transcript]
C --> D[History projection]
D --> E[Reply preview]
E --> F[Find or load source]
F --> G[Scroll and highlight]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +523, Tests +298, Generated 0. Total +821 across 43 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Mantis proof suggestionA WebChat transcript can directly show reply context surviving reload and navigation to an initially unloaded source after the two code blockers are repaired. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve replyToId and replyToPreview at the transcript writer's replacement-hook boundary, then make reply navigation reveal a source that search currently filters out rather than treating it as already visible. Do we have a high-confidence way to reproduce the issue? Yes, from source: a supported before_message_write hook that returns a replacement user message drops the new reply fields, and an active chat search can hide an otherwise loaded reply target from navigation. Is this the best way to solve the issue? No: the transcript owner and existing Gateway lookup are the right seams, but the PR must preserve the new durable fields through replacement hooks and handle search-filtered targets before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 79701dfc84b9. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
232d3be to
94731e6
Compare
94731e6 to
4ee9994
Compare
|
Resolved the current-main conflicts and every actionable item from the latest completed ClawSweeper review:
The production growth is the durable history/navigation capability itself (+758/-214 production, +373/-5 tests, generated net 0); the blocker repairs reuse the existing transcript metadata and live render-context owners rather than adding parallel state or navigation paths. Exact-head CI for |
* origin/main: (1725 commits) fix(agents): preserve reply cleanup when cancellation throws (#122252) fix(ui): render disallowed link schemes as plain text (#122311) fix(test): isolate gateway helper env stubs (#122319) fix(ui): keep chat Markdown block rhythm consistent (#122289) test(cli): trim duplicate Hooks process cases (#122278) fix(ui): retain identity while agent roster loads fix(ui): preserve configured agent labels fix(plugins): keep startup convergence read-only (#122330) fix: preserve WebChat reply context after reloads (#122169) fix(ui): make DONE moves visibly reversible (#122303) fix(ui): keep inline-code punctuation attached (#122291) fix(google-meet): publish exports atomically (#122306) fix(channels): preserve failed agent run reactions (#122009) fix(ui): label patch file operations accurately (#122287) fix(windows): preserve Unicode LAN route aliases (#122263) test(media): synchronize transcode pool completion (#122279) fix(android): keep completed subagent activity visible for sixty seconds (#122089) fix(ui): humanize bare GitHub item links (#122285) refactor(qqbot): install plugin from Tencent package (#107295) chore: scope SQLite session lifecycle CI (#121917) ...
What Problem This Solves
Fixes an issue where WebChat users replying to an earlier message would lose the visible reply context after sending or reloading history. Replies to messages outside the currently loaded history window also had no reliable way to reveal their target.
Why This Change Was Made
The Gateway now persists bounded reply metadata with user turns, and WebChat reconstructs reply previews from persisted history. Selecting a reply preview resolves unloaded targets by fetching older history, then scrolls to and highlights the original message without changing the model-visible message text.
AI-assisted: Yes (Codex).
User Impact
Reply context remains visible after send, refresh, and session reload. Users can select a reply preview to navigate to its source even when that message was not initially loaded.
Evidence
tbx_01kzrwj8pbyaymepq1bbe7zag7, including core/core-test/UI typechecks, all lint shards, API baselines, dead-code, i18n, import-cycle, and policy guards.