Skip to content

fix(web): keep the timeline minimap off the chat column at wide chat widths - #1

Merged
otavio merged 2 commits into
otavio:feat/chat-width-settingfrom
saphid:agent/web-chat-width-minimap
Sep 23, 2026
Merged

otavio merged 2 commits into
otavio:feat/chat-width-settingfrom
saphid:agent/web-chat-width-minimap

Conversation

@saphid

@saphid saphid commented Sep 23, 2026 •

Copy link
Copy Markdown

Follow-up for pingdotgg#11594, addressing the minimap gap @v1b3coder reported there.

Problem

The timeline minimap sizes its hover strip from TIMELINE_CONTENT_MAX_WIDTH = 768, assuming the chat column is capped at 48rem. With Full chat width the real gutter is only the list padding (about 20 to 26px), but the helpers still computed a ~770px gutter and kept the full 40px strip. That invisible strip sat on top of the first 20 or so pixels of every message and swallowed clicks and text selection there. The minimap's prev/next turn buttons had the same problem independently: they stay clickable whatever the strip width, and their hitbox reaches 26px from the viewport edge.

Fix

  • The gutter and hit-strip helpers take the rendered column width instead of assuming 768px. MessagesTimeline measures the first mounted [data-timeline-root] row (every row type uses that wrapper) and re-measures when chatWidth changes. If no row is mounted, it treats the column as full width, so the strip stays inert.
  • The prev/next buttons ignore the pointer unless the strip is wide enough to contain them (14px). Keyboard focus still reaches them.

Comfortable behaves as before. Wide at typical window sizes still has a full gutter, so nothing changes there either.

Verification

  • apps/web: vp test run src/components/chat/MessagesTimeline.test.tsx: 51 passed. The helper tests now cover Comfortable, Wide, and Full column widths, plus the button guard.

  • packages/contracts: vp test run src/settings.test.ts: 126 passed.

  • tsc --noEmit -p apps/web: clean.

  • Real client: vp run dev web build in headless Chrome with a 2560px window (2304px timeline) on a thread with 763 messages. I measured the strip and buttons against the first row's bounding box, switched Chat width through Settings → Appearance, then reopened the thread:

    • Before (current feat/chat-width-setting head), Full: the column starts at 26px, the strip is 40px wide and overlaps the column by 26px, and a click on the column's left edge lands on the minimap strip.
    • After (this branch), Full: the strip shrinks to 14px, overlap is 0px, and the prev/next buttons end at 26px, exactly at the column edge.
    • Comfortable and Wide, before and after: the column starts at 768px and 576px, the strip is 40px, and overlap is 0px. No change.
  • Not exercised in a real client: overlay scrollbars, where the Full column starts about 20px from the edge. The unit tests cover that geometry (8px strip, buttons inert). I also didn't live-switch the setting while a thread stays mounted, because Settings is its own route. The chatWidth effect dependency covers that case.

Audited by GPT-6 Astra (high) in T3 Code. Round 1 found the prev/next button overlap. Round 2 caught that a keyboard-opened preview re-armed those buttons, and the final commit fixes both.

Made with Claude Opus 5.5 in Claude Code, running inside T3 Code.

🤖 Generated with Claude Code

github-actions Bot and others added 2 commits September 23, 2026 15:35
The minimap gutter and hover-strip helpers assumed the chat column is
capped at 768px. With the Wide or Full chat width, the real gutter is
narrower or gone, so the 40px hover strip sat on top of the message text
and swallowed its pointer events. Measure the rendered column instead and
re-measure when the Chat width setting changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ters

The previous and next turn buttons hang above and below the minimap strip
and stayed clickable regardless of the strip's width cap. With Full chat
width and overlay scrollbars they covered the first few pixels of message
text. Make them inert to the pointer unless the gutter can hold them;
keyboard focus still reaches them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Sep 23, 2026
@otavio
otavio merged commit 89f7d18 into otavio:feat/chat-width-setting Sep 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants