Skip to content

cmux-next agent pane: the minimap lights where you are and the message it previews - #22879

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
cmux/minimap-followups
Oct 21, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
cmux/minimap-followups

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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.tsx covers 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.tsx passes the new scrolls prop.

Observed / Not run

  • Observed: scripts/web-lint.sh and prepush-gate.py passed.
  • 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 cmux-next agent pane: the thread minimap spans the transcript's height #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


View with [code]smith Autofix with [code]smith
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.

Written for commit bab3c97. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 20, 2026 20:29
…ll, and holds its card during a scrub

- ScrollMap compared the layout (which counts the composer's dock space) with the
  viewport above the dock, so a chat a little shorter than its pane showed a map
  whose bar filled the rail. The transcript now says whether it scrolls, the way
  its bottom fade already decides.
- A scrub dismisses the preview card and no longer reopens it on each mark
  crossed; hovering after the drag opens it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba9-9614-7832-8e39-d8ca0407c193&host=cosmic-gray
… previews

Leo: the hover preview did not highlight its message, and the map should show
where you are, at the bottom too (ChatGPT's rail does both).
- Both rails: the previewed prompt's tick stays lit while the pointer or focus
  is on its card. Before, leaving the rail for the card put it back to rest.
- Full map: the marks under the view bar draw as current, brighter than the
  rest, and stay so while the pointer is on the rail. The bar's covered marks
  are recomputed on its own scroll frame and render only when they change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba9-9614-7832-8e39-d8ca0407c193&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-cjt8o created for this PR by the cmux coordinator.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Unclear: web / react-apps-check (3) failed: no known signature; failed step: Build the web bundles. This PR merged before its CI finished: fix forward on main.

CI failed on bab3c97db0 (run 39540753617 attempt 1): 5 unknown.

Job Verdict Why
web / react-apps-check (3) unknown no known signature; failed step: Build the web bundles
web / react-apps-check (2) unknown no known signature; failed step: Build the web bundles
web / react-apps-check (1) unknown no known signature; failed step: Build the web bundles
web / react-apps-check (4) unknown no known signature; failed step: Build the web bundles
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Not re-run automatically: web / react-apps-check (3), web / react-apps-check (2), web / react-apps-check (1), web / react-apps-check (4), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; base red: the same failure on the base dea0d5a; does not block
red: web / react-apps-check; base red: the same failure on the base dea0d5a; does not block
red: web / react-apps-check (1); base red: the same failure on the base dea0d5a; does not block
red: web / react-apps-check (2); base red: the same failure on the base dea0d5a; does not block
red: web / react-apps-check (3); base red: the same failure on the base dea0d5a; does not block
red: web / react-apps-check (4); base red: the same failure on the base dea0d5a; does not block

Tour of bab3c97db0 (run): no media. The tour did not run: only webview code changed (6 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label to tour it on a Mac.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

owner: 01a15ba9-9614-7832-8e39-d8ca0407c193

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Merging under the base-red rule. Every red here is red on base too:

  • react-apps-check fails at "Build the web bundles" on a stale Native/OptChat/optchat-chief/inspector/index.html.
  • defaults-snapshot.
  • The review-link job.

Not run: the base bundle red stops this PR's webview tests (jsdom and browser) before they run, so the new tests are unverified in CI. The independent review passed (code read only).

@teamleaderleo
teamleaderleo marked this pull request as ready for review October 21, 2026 03:55
@teamleaderleo
teamleaderleo merged commit 33596f5 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cmux/minimap-followups branch October 21, 2026 03:55
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

high-signal review link / link is red on 20 of 26 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…23285)

check-scrollbars (SCROLLBARS-THIN) fails cmux-next checks on
feat-cmux-next: the thread minimap's list (#22879) and the Apps Discover
chips hid their scrollbars with scrollbar-width and ::-webkit-scrollbar,
which turn WebKit's overlay scroller into a custom one. They now keep the
shared thin overlay scroller, hidden until the user scrolls. That takes the
check from 13 hits to 10, back under its ceiling.


Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-aabc-7850-af29-f0655b1d2a1a&host=cosmic-gray

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…e left edge) (#23735)

* test(webviews): the agent chat ships with no thread minimap (red)

The default arm of thread-minimap-layout is full since #22784, so every
agent chat draws the full-height ScrollMap (a dash per message and a view
box) down the transcript's left edge, and the compact rail's list shows a
second scroller since #23285. These tests fail until the default is off
and the list stops scrolling on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-a80b-79c0-ab31-500e58883d27&host=cosmic-gray

* fix(webviews): the agent chat draws no thread minimap by default

Leo on the nightly (2026-10-21): a column of dashes and a thumb box down
the left edge of the chat, and a second scroller. That is the full-height
ScrollMap, the default arm since #22784 (lit band #22879), and the compact
rail's own list, which shows a scroller since #23285 dropped its hiding.

- thread-minimap-layout gets an off arm, and off is the default: no map,
  no rail, nothing at the left edge. Previous and Next Turn and the
  bookmarked-prompt steps still work. full and compact stay selectable
  from cmux.experiments for dogfood.
- The compact rail's list is overflow: hidden: it still scrolls from
  script and focus (band follow, scrub, Tab) but never draws a scroller,
  so the transcript keeps its one shared thin scroller (SCROLLBARS-THIN).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-a80b-79c0-ab31-500e58883d27&host=cosmic-gray

* style(webviews): format the minimap experiment and its test

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant