Repository navigation
fix: keep public conversations steady during live refresh - #173181
Conversation
Co-authored-by: vincentkoc <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR adds public-conversation navigation controls and preserves reading position during in-place refresh. Example: A reader scrolls back in /chat/main/topic while new messages arrive.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this PR addresses a current public-reader problem, but identical tool groups share an identity and can restore the wrong reading position. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway renders publication-filtered transcripts into public HTML; its inline browser script polls the same URL and updates the readable document. flowchart TD
A[Public conversation URL] --> B[Gateway publication checks]
B --> C[Transcript projection]
C --> D[Public HTML renderer]
D --> E[Browser reader]
E --> F[Conditional refresh request]
F --> B
Technical reviewBest possible solution: Keep the existing reader owner and give each tool group an opaque, distinct identity that remains stable across refresh and page rollover. Do we have a high-confidence way to reproduce the issue? Current main visibly lacks scroll restoration in its refresh implementation, and source inspection establishes the introduced duplicate-tool identity failure; no runtime reproduction was performed. Is this the best way to solve the issue? Extending the existing renderer is appropriate, but item identity must come from distinct transcript origins rather than rendered tool summaries. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 801d463f8921. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +58, Tests +142, Docs +4. Total +204 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 15, 2026, 10:19 AM ET / 14:19 UTC. |
|
Merged via squash auto-merge.
|
…73181) Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Fixes public conversations losing the reader’s place and failing to follow new messages when the live view refreshes, with no quick way back to the top or latest message.
User Impact
Readers can jump to Top or Latest, refresh without reloading, and keep reading older messages without being pulled away. Updates follow only when the reader is at the conversation’s end, including short conversations and late-loading layout changes. Public-sharing permissions and revocation remain unchanged.
Why This Change Was Made
The public reader owns scroll intent and preserves a visible message anchor plus expanded tool steps across live-page rollover. Canonical and legacy public links now share conditional in-place refresh, catch up after visibility/reconnection, and show recoverable refresh failures while leaving readable content intact. No JavaScript still has a readable document and refresh fallback; earlier pages remain still.
Requested by @vincentkoc.
Work sessions
Evidence
Before
After
Four new behavior regressions fail against the original inline reader script. Focused reader/render/login tests pass: 46 tests, 3 files, 20.36 seconds wall time (Vitest 7.60 seconds). CI workflow elapsed: 1,018 seconds (not a per-file test benchmark).
Chromium with the shipped CSP: Top/Latest, new-message follow, late layout, page-rollover reading anchor, in-place refresh, and 375px light layout passed with no script errors. Synthetic public content only.
Targeted lint, formatting, production typecheck, and changed-test gateway type graph pass (type graph 19.9 seconds). Fresh independent P0–P2 review is clean after repairing the short-conversation finding, covered by initial-view and explicit-Latest regressions.
Broader HTTP proof was interrupted during expensive fixture compilation before test execution; it is not claimed as passing. PR CI supplies broad coverage.
Completed CI run: success at the exact reviewed head; 35 successful jobs and 27 skipped, no failures.