cmux-next agent pane: the minimap lights where you are and the message it previews
Merged
TE
15d ago+99+99+01234567890123456789-10-10-01234567890123456789
The thread minimap now shows where you are and which message it is previewing, as ChatGPT's rail does. It also hides on chats that don't scroll. This follows up #22784 with Leo's feedback and #22784's review.
Changes
- Previewed message stays lit (both rails). While the pointer or keyboard focus is on a prompt's preview card, that prompt's tick stays highlighted. Before, moving from the rail onto the card set the tick back to rest, so the card pointed at nothing.
- Where you are (full map). Marks under the view bar draw as current, brighter than the rest, at the top and at the bottom of the chat, and they stay that way while the pointer is on the rail. The covered marks are recomputed in the bar's own scroll handler, and React renders only when the covered set changes.
- No map for a chat that doesn't scroll. ScrollMap compared the layout, which includes the composer's dock space, with the viewport above the dock. A chat slightly shorter than its pane drew a map whose bar filled the rail. The transcript now passes
scrolls, using the same test as its bottom fade. - Quiet card during a scrub. Dragging dismisses the preview card and no longer reopens it on every mark it crosses. Hover after the drag opens it again.
Tests
test/thread-scroll-map-rail.test.tsxcovers three things: current marks at the top and the bottom, the previewed prompt staying lit while focus is on its card's bookmark, and no map on a chat that fits its pane.test/thread-bookmarks.test.tsxpasses the newscrollsprop.
Observed / Not run
- Observed:
scripts/web-lint.shandprepush-gate.pypassed. - Not run locally: the tests (no test runs on Leo's Mac). CI is the first run.
- No test covers the dock-space case of the "doesn't scroll" fix, because jsdom does not measure the dock. The no-map test covers a plainly short chat.
- Leo's screenshot showed the compact rail, which the build he was running still has. The full map from #22784 is the default now. The "stays lit" fix covers both rails.
Changelog
- Changed: The chat's minimap brightens the messages on screen and keeps the previewed message highlighted while you read its preview.
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
The thread minimap now lights the messages on screen in your current view and keeps the previewed message highlighted while you read its preview, and it no longer appears on chats that don't scroll.
- Marks under the view bar render as current, brighter than the rest, at the top and bottom of the chat; bookmarked ticks among them keep full opacity while hovering the rail.
- The previewed prompt's tick stays lit while the pointer or keyboard focus is on its card.
- A chat that fits its pane above the composer no longer draws a map; the transcript now passes
scrolls, the same test its bottom fade uses, where ScrollMap previously compared the full layout with the viewport. - Scrubbing the rail dismisses the preview card and doesn't reopen it on every mark crossed; hovering after the drag opens it again.