feat(diff-reply): support selection replies from diff panel#37
Merged
Conversation
- Add DiffSelectionReplyToolbar component with selection detection and floating toolbar - Extend QuotedContext type with optional filePath field for diff-sourced selections - Differentiate diff-sourced quotes (emerald) from text quotes (violet) in composer UI - Replace shortenPath with relativizePath for workspace-relative file path display - Track session running state in work log derivation for accurate task status - Improve diff line rendering with better color contrast and separator styling - Fix sidebar padding in fullscreen mode
- Refactor SelectionReplyToolbar for efficient container registry with selection callbacks - Add global selection handler for smoother selection state updates - Adjust user message height estimation to account for quoted contexts - Improve toolbar positioning logic with state ref synchronization - Add overflow-anchor CSS fix for smoother scrolling in ChatView
Remove @tanstack/react-virtual from MessagesTimeline in favor of native CSS containment. Variable-height messages (markdown, diffs, quoted contexts), async content (Suspense highlighting), and expandable sections made height estimation unreliable. CSS content-visibility: auto skips painting offscreen content natively without positioning bugs. Simplify row rendering: all rows render in normal document flow with containIntrinsicBlockSize hints. Remove virtualizer snapshot telemetry.
MessagesTimeline was refactored to use CSS content-visibility: auto instead of JavaScript virtualization. The virtualization browser test harness (estimateMessagesTimelineRowHeight, height measurements, virtualizer snapshots) is no longer applicable.
- Introduce TextRevealContainer component that triggers a sweep-down mask animation when assistant messages finish streaming - Animation duration auto-scales based on text length (0.7ms per char, clamped 400–1600ms) - Uses performant CSS mask-image + keyframe (no JS animation loop) - Remove virtualization test assertions (renderedInVirtualizedRegion) — no longer applicable with content-visibility: auto rendering
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.
Summary
DiffSelectionReplyToolbarcomponent — floating toolbar for replying to selected text in the diff panelfilePathfield onQuotedContexttypeQuotedContextInlineChipwith diff-specific styling (emerald theme, diff icon) to distinguish from message quotesrelativizePathfor workspace-aware formattingSelectionReplyToolbarto prevent selection escapeisSessionRunningparameter toderiveWorkLogEntriesfor accurate task status reporting when session is idleTesting
session-logic.test.tsto passisSessionRunning: trueparameter to test casesgetComposedRanges)<quoted_context file_path="...">blocksCmd/Ctrl+Shift+RandEscapekeyboard shortcuts work in diff panel