feat(sessions): Add clickable minimap of user messages#3677
Draft
thmsobrmlr wants to merge 1 commit into
Draft
Conversation
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
|
Merging to
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 |
|
React Doctor found 3 issues in 3 files · 3 warnings. 3 warnings
Reviewed by React Doctor for commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
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).useNewChatThreadsetting: the newChatThreaduses the scroller engine'scurrentAnchorIdandscrollToMessage; the legacyConversationViewreuses its jump-to-message path and tracks the current message through a newonFirstVisibleRowChangecallback onVirtualizedList(fires only when the topmost row changes, so scrolling does not re-render the thread).How did you test this?
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) andpnpm --filter @posthog/ui typecheck— both clean; Biome clean on changed files.Automatic notifications
Created with PostHog Code