GeezerVison is showing github.com — fix(web): minimap hit strip no longer covers Copy button when lane shifts left by SimonLiu423 · Pull Request #42869 · pingdotgg/t3code
Conversation
Problem
When the chat lane is shifted left of center (for example by the floating details card, a ~1280px window, a wider sidebar, or the wide chat width), hovering or clicking an assistant message's Copy message button lands on the timeline minimap's hit strip instead. The action row fades out and the click jumps to another turn rather than copying.
Change
Measure the lane's real left gutter (contentRect.left - viewportRect.left) instead of assuming a centered lane with (viewportWidth - contentWidth) / 2, and pass the measured viewport and lane horizontal bounds into resolveTimelineMinimapHasPersistentGutter and resolveTimelineMinimapHitStrip. Also observe .messages-timeline-scroll alongside the viewport so ChatCanvas padding shifts re-measure the hit strip even when the viewport and lane widths stay unchanged.
Scope
Fixes #42858. Scoped to the timeline minimap gutter calculation and resize observation in apps/web plus its unit test table.
Verification
- Extended the
resolveTimelineMinimapHitStrip table in MessagesTimeline.logic.test.ts with left-shifted lanes (1024/652 at 48px and 12px left gutters) and a missing-lane case, asserting both hit strip bounds and persistent-gutter state; confirmed the new cases fail on main and pass with the fix.
- Ran
vp run check:changed upstream/main: format, lint, knip (1/2 & 2/2), typecheck (2 packages), React Compiler coverage (2 files), and 213 tests across 3 files (including MessagesTimeline.browser.test.tsx) all passed.
- Headless Chromium check (
apps/web with threadWithHistory at 1280×800, 256px sidebar, comfortable width): real left gutter measured 48px, hit strip clamped to 32..48 (+4px gap before the Copy button at 52..76), and elementFromPoint at the Copy button center hit "Copy message".
Reviewed with sol-loop: 1 round with gpt-6.2-sol on high. Sol verdict: approved
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ifts left
Measure the timeline lane's real left gutter (contentRect.left - viewportRect.left) instead of assuming a centered lane, and observe the scroller so ChatCanvas padding shifts re-measure the hit strip.
Fixes pingdotgg#42858
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Nov 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The minimap gutter now uses the content lane’s measured position within the viewport. Timeline resize observation includes the scroll element when present and refreshes the minimap when either observed element changes size.
Changes: Minimap gutter measurement
| Layer / File(s) |
Summary |
Rectangle-based gutter resolvers apps/web/src/components/chat/MessagesTimeline.logic.ts, apps/web/src/components/chat/MessagesTimeline.logic.test.ts |
The gutter resolvers accept viewport and content rectangles. The left gutter uses the content’s offset from the viewport and is clamped to the viewport width. Tests cover varied rectangle positions and widths, including a left-shifted lane. |
Timeline measurement and resize observation apps/web/src/components/chat/MessagesTimeline.tsx |
Timeline measurement passes viewport and content rectangles to the resolvers. Resize observation watches the viewport and its .messages-timeline-scroll descendant when present. Either resize triggers gutter measurement and minimap refresh. |
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: pixpmusic, juliusmarminge
Merge Risk: Minimal · up to 03e2c
-
The change measures the minimap's real left gutter so the hit strip no longer overlaps the Copy button when the chat lane is shifted left. No merge-blocking risk was identified in the supplied changes.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: the minimap hit strip no longer covers the Copy button when the chat lane shifts left. It matches the changeset, which measures the real left gutter from viewport and … |
| Description check |
 |
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the shifted-lane bug and the measured-gutter fix. It links issue #42858 and gives concrete verifica… |
| Linked Issues check |
 |
Issue #42858 requires that the minimap hit strip not cover the assistant Copy message button when the chat lane is shifted left. At the reviewed head, MessagesTimeline.logic.ts replaces the centered g… |
| Out of Scope Changes check |
 |
The whole-PR diff against the merge base touches only MessagesTimeline.logic.ts, MessagesTimeline.tsx, and the associated unit test file under apps/web. The logic changes replace the centered side-gut… |
Full details: Title check
-
Explanation
The title names the main change: the minimap hit strip no longer covers the Copy button when the chat lane shifts left. It matches the changeset, which measures the real left gutter from viewport and lane rectangles. It also follows the conventional commit style that the template recommends.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the shifted-lane bug and the measured-gutter fix. It links issue #42858 and gives concrete verification results, including unit test cases, the repo check run, and a headless Chromium check. It does not include the UI before/after screenshots that the template asks for on UI changes, and the bug is a UI behavior change, so that is a gap. The description also does not include a model/harness line, although the template asks for one when an agent did the work. The author does name the tool (Claude Code) in the footer, but that is not in the requested form. These gaps are minor compared with the rest of the description.
Resolution
Consider adding before/after screenshots or a short recording of the Copy button hover/click behavior in a shifted-lane layout, as the template requests for UI changes. Optionally end the description with the model and harness used, per the template note.
Full details: Linked Issues check
-
Explanation
Issue #42858 requires that the minimap hit strip not cover the assistant Copy message button when the chat lane is shifted left. At the reviewed head, MessagesTimeline.logic.ts replaces the centered gutter formula with resolveTimelineLeftGutter, which returns min(viewport.width, max(0, content.left - viewport.left)). Invalid or missing rectangles return 0. resolveTimelineMinimapHasPersistentGutter and resolveTimelineMinimapHitStrip both use this measured gutter. MessagesTimeline.tsx passes getBoundingClientRect() results for the viewport and [data-timeline-root] into these resolvers, so the hit strip follows the real left gutter. The strip is sized from that gutter, so its right edge stays inside the measured gutter, which addresses the issue's 'keep the strip short of the lane' fix. attachTimelineViewportElement also observes .messages-timeline-scroll, so ChatCanvas padding shifts trigger remeasurement [#42858]. The PR reports a headless Chromium check at 1280x800: measured gutter 48px, hit strip 32..48, and elementFromPoint at the Copy button center returning 'Copy message'. I did not re-run that check. The reported typecheck pass supports the array form of observeResize, but I did not read observeResize directly. The unit test table was not inspected in this review. No coding requirement from #42858 is unmet in the reviewed code.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff against the merge base touches only MessagesTimeline.logic.ts, MessagesTimeline.tsx, and the associated unit test file under apps/web. The logic changes replace the centered side-gutter helper with a measured left-gutter helper and update the two exported resolver signatures. The component changes update gutter measurement inside measureTimelineGutter and add .messages-timeline-scroll to resize observation. Each change serves the #42858 objective. The only incremental change since the previous review (0605137 to 03e2c68) is in these same areas, so no unrelated behavior change appears.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 0605137 and 03e2c68.
Files selected for processing: 1
-
apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for this. Main has the change since #42876.
Main now measures the actual left gutter and keeps the minimap hit strip off the Copy button, including when opening the details card shifts a full-width lane left. Compared your three-file diff with the merged gutter helpers, row-frame/lane resize observation, and browser regressions; main covers the same fix for the already-closed issue #42858.
Closing as superseded.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|