Skip to content

feat(sessions): Add clickable minimap of user messages#3677

Draft
thmsobrmlr wants to merge 1 commit into
mainfrom
posthog-code/conversation-minimap
Draft

feat(sessions): Add clickable minimap of user messages#3677
thmsobrmlr wants to merge 1 commit into
mainfrom
posthog-code/conversation-minimap

Conversation

@thmsobrmlr

Copy link
Copy Markdown
Contributor

TL;DR

Long chats are hard to move around in. This adds a row of small dots down the right edge of the chat — one per message you sent. Click a dot to jump to that message; hover to see what it said. The dot for the message you're reading right now is highlighted.

Problem

In long agent conversations there is no quick way to see where your own messages sit or to jump back to one. The Cmd/Ctrl+J picker and Alt+Up/Down exist, but nothing gives a spatial, always-visible overview of the thread.

Changes

  • New ConversationMinimap: a vertical rail docked left of the scrollbar with one clickable marker per user message, hover tooltips with a one-line preview, and an accent on the message currently on screen. Hidden when the conversation has fewer than two user messages and in compact embeds (command center, canvas panel).
  • Wired into both thread renderers behind the useNewChatThread setting: the new ChatThread uses the scroller engine's currentAnchorId and scrollToMessage; the legacy ConversationView reuses its jump-to-message path and tracks the current message through a new onFirstVisibleRowChange callback on VirtualizedList (fires only when the topmost row changes, so scrolling does not re-render the thread).

How did you test this?

  • Added ConversationMinimap.test.tsx (6 tests: marker filtering/preview truncation, hidden under two messages, click-to-jump, aria-current on the active marker) — passing.
  • pnpm --filter @posthog/ui test src/features/sessions (478 tests) and pnpm --filter @posthog/ui typecheck — both clean; Biome clean on changed files.
  • Could not run the Electron app in this sandbox (no display), so no screenshot; the rail follows the same overlay conventions as the existing scroll-to-bottom button and sticky header.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

A slim rail on the conversation's right edge shows one marker per user
message. Click a marker to scroll to that message; hover for a preview.
The marker for the message currently on screen is accented.

Wired into both thread renderers: the new ChatThread uses the scroller
engine's anchor id and scrollToMessage, the legacy ConversationView gets
a new onFirstVisibleRowChange callback on VirtualizedList to track the
current message. Compact embeds hide the rail.

Generated-By: PostHog Code
Task-Id: 186f473f-a304-4f14-885b-74a00e79fad0
@trunk-io

trunk-io Bot commented Jul 22, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

React Doctor found 3 issues in 3 files · 3 warnings.

3 warnings

src/features/sessions/components/ConversationMinimap.tsx

src/features/sessions/components/ConversationView.tsx

src/features/sessions/components/VirtualizedList.tsx

Reviewed by React Doctor for commit f72a8c1.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant