Skip to content

fix(ui): restore Latest after jumping to a reply’s original message - #205493

Merged
vincentkoc merged 1 commit into
mainfrom
fix/chat-reply-reveal-latest-c34
Nov 26, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/chat-reply-reveal-latest-c34

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

In the Control UI, opening a reply’s original message can take you far back in the chat while the transcript still treats you as following the latest message. Once the highlight fades, the Latest button can be unavailable.

User Impact

You can read the original while new messages arrive, then use Latest to jump back to the end. Opening a message at the end of the chat keeps new messages in view.

Why This Change Was Made

The transcript now records the destination when it finds the original message bubble. When the active scroll reaches that destination, it updates the reader’s position using the same policy as manual scrolling. This also handles smooth scrolling and a message that is already in position.

Evidence

  • On the parent commit, the reduced-motion browser test reached the original message but found no accessible Latest button. All nine reply-attribution Chromium cases passed on the repair, including normal and reduced motion.
  • In a mounted chat, opening the original placed it 7,743 pixels from the end. An incoming message left it at the same viewport position. Activating Latest returned to zero pixels from the end. Manual scrolling to the same message, reopening an already-centered original and following new messages at the end also passed.
  • Scoped type-aware lint and formatting passed. Paged replies and position-rail navigation were traced to the shared reveal path.

Hosted validation

All nine Chromium reply-attribution cases passed, including the return to Latest with reduced and normal motion. Both real-Gateway shards built the runtime and Control UI. Chromium results

The background-work test timed out at 120 seconds while observing the child’s in-flight startup response. Main recorded the same test, stage and timeout. Knip’s script and full-tree reports flagged the two known Parallels preflight exports. Its production report passed. The aggregate retained these failures. Gateway job · Main comparison · Dependency job

A separate mounted Chromium journey using this head and the empty-search fix returned to the same original message at exactly the same height after closing Find. Clicking Latest then reached the physical end. The signed-head Chromium suite and the mounted journey used a mocked Gateway. They recorded actions and positions. The successful browser job did not publish screenshots or video of the reveal in a shipped UI.

@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 25, 2026
@vincentkoc vincentkoc self-assigned this Nov 25, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR restores Latest after navigating to a reply’s original message by settling the reveal through the transcript’s reader policy.

Example: Select the reply link on Field note 77 to reveal Field note 10 in a 78-message chat.

  • Before: The original appears, but Latest can remain unavailable after the highlight fades.
  • After: The original becomes the reader’s position, and Latest returns to Field note 78.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The production repair is focused and appears correct, but required shipped-behavior evidence is absent and the dependency-check failure remains unclassified.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Opening an older reply target can leave readers without Latest and with incorrect follow state.
Reason: This restores documented navigation behavior with a small shared-owner repair; the maintainer-authored PR supplies the direction decision.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: it addresses a current transcript-navigation defect through the existing scroll owner, and inspection found no definite introduced production bug.

Reviewed head: f5920c01dbb2c3e2430b7782a35edf0a70a8018c

Before merge

None.

Findings

None.

Tests

  • Low-value test ui/src/e2e/chat-reply-attribution.e2e.test.ts:111: Remove the polling count assertion immediately before Latest is clicked; the click already waits for the same uniquely resolved, actionable control.
    Surviving check: ui/src/e2e/chat-reply-attribution.e2e.test.ts:112, await latest.click()
    Same regression: If reveal settlement fails to expose Latest, both the count assertion and the surviving click fail; duplicate matching controls also make the strict click fail.
  • Missing end-to-end proof: Attach redacted before/after screenshots or a recording from the shipped Control UI against an isolated Gateway showing the older-original reveal, preserved position during incoming output, and Latest returning to the end; include normal and reduced motion and remove IPs, keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

Reply navigation resolves a message into the virtualized transcript; the offset observer translates its final viewport position into follow state and Latest visibility.

flowchart LR
  A[Reply attribution link] --> B[Reply navigation]
  B --> C[Transcript message reveal]
  C --> D[Virtualizer scroll destination]
  D --> E[Transcript offset observer]
  E --> F[Reader follow policy]
  F --> G[Latest button]
Loading

Technical review

Best possible solution:

Keep reveal settlement in the existing offset observer and reuse the established reader policy to preserve history position and restore Latest.

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

Current main retains a message-navigation command without settling reader policy, matching the reported missing Latest button; the body also records a parent-commit browser failure, but this review ran no target code.

Is this the best way to solve the issue?

The patch makes a focused repair at the shared reveal and offset owners, handles synchronous and smooth arrival, and preserves existing end-follow policy without adding configuration or persistence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bf3729e40c48.

Provenance checked

  • Bubble-offset reveal keeps the original intent (d534c31: Replace the virtualizer’s row target with the selected bubble’s position so reconciliation cannot undo message navigation.)
  • Deferred reveal completion keeps the original intent (89aa274: Keep reveal completion with its owner while preserving commit-driven deep-message navigation and preventing unrequested startup history paging.)
  • Reader takeover policy keeps the original intent (253a985: Publish upward reader intent before native movement so incoming output cannot restart following.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 89aa274 adds ui/src/pages/chat/components/chat-message-reveal.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 89aa2740aa23; files: ui/src/pages/chat/components/chat-message-reveal.ts)

PR surface

Source +25, Tests +49. Total +74 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 39 14 +25
Tests 1 50 1 +49
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 89 15 +74

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the shipped-UI capture described in the proof assessment.
  • Classify the failed dependency check from its full diagnostic output and repair it only if caused by this diff.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 25, 2026, 1:37 PM ET / 18:37 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 25, 2026 18:45
@vincentkoc
vincentkoc merged commit c818ae7 into main Nov 26, 2026
231 of 235 checks passed
@vincentkoc
vincentkoc deleted the fix/chat-reply-reveal-latest-c34 branch November 26, 2026 20:43
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant