Skip to content

feat(native): add timeline follow state machine, turn anchoring, and minimap polish - #372

Merged
rynfar merged 6 commits into
nativefrom
nw/243-tv-follow-minimap
Nov 14, 2026
Merged

rynfar merged 6 commits into
nativefrom
nw/243-tv-follow-minimap

Conversation

@rynfar

@rynfar rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the remaining TV-FOLLOW and TV-MINIMAP parity gaps in the native GPUI client so timeline auto-follow, new-turn anchoring, position restoration, keyboard scrolling, and the timeline minimap match web behavior.

  • Pure follow & anchoring (crates/core/src/timeline/anchor.rs, anchor/tests.rs): Added TimelineFollow hysteresis (AT_END_THRESHOLD_PX = 40.), 150ms Scroll to end reveal delay (SCROLL_TO_END_REVEAL_DELAY), ANCHOR_TOP_OFFSET_PX = 24. first-user-message anchoring with tool/reasoning/settled release, RememberedPositions (LRU 100), scroll_to_end_summary, and ease_out_cubic / smooth_step_fraction motion math.
  • Minimap & cross-paragraph selection (crates/core/src/timeline/minimap.rs, minimap/tests.rs, crates/core/src/text_selection.rs, crates/app/src/selectable_text.rs, crates/app/src/thread_view/minimap.rs): Added ActiveMinimapTooltipOwner app-wide arbitration, observe_with_groups descendant group_lists scroll tracking, SafePolygon hover corridor, SelectionGroup cross-paragraph selection & copy inside the preview card, smooth scroll jumps, wheel glide forwarding, and navigation tooltip/preview enter/exit transitions.
  • Timeline wiring & glass pill (crates/app/src/thread_view.rs, apps/native/parity/LEDGER.md): Wired TimelineFollow, RememberedPositions, SmoothScroll (16ms SMOOTH_SCROLL_FRAME_INTERVAL with reduce_motion instant fallback), apply_new_turn_anchor (24px tail reservation), keyboard scrolling (Up/Down/PageUp/PageDown/Space/Home/End), the 150ms opaque Scroll to end glass pill (dropdown_surface + dropdown_border + webview::occluder), and marked TV-FOLLOW and TV-MINIMAP done in LEDGER.md.

Before / After

Theme Before (fork/native 63aca805dc) After (nw/243-tv-follow-minimap a7ad53f08f)
Dark (1440x900) Before Dark After Dark
Light (1440x900) Before Light After Light

Verification

  • cargo clippy --workspace --all-targets -- -D warnings: pass
  • cargo test -p t3-core -p t3-client: t3-client 110/110, t3-core 1379/1379, conformance 8/8
  • t3-native --features snapshot GPUI tests (--test-threads=1): thread_view:: 22/22, selectable_text:: 9/9, side_chat:: 4/4
  • node --test apps/native/parity/sync.test.ts: 42/42
  • vp fmt --check apps/native/parity/LEDGER.md: pass

Ref #243
Closes #70
Closes #273

Generated with Antigravity

@rynfar

rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Addressed all four review findings and synced fork/native (598e672430) in commit 7c33c7b46f8af18eb9564fc084185cdd43f9ea74:

  1. Pending scroll source & programmatic vs user separation: Removed suppress_scroll_release, last_scroll_snapshot, last_row_count_seen, and the else if changed && same_row_count heuristic; flush pending wheel/scrollbar navigation at the start of same-thread sync(), clear pending_scroll_source on programmatic jumps/restores/disclosures, and tag scroll-to-end (SmoothTarget::Bottom / reduce_motion) with ScrollSource::EndKey.
  2. Downward navigation, nested group_list wheel bubbling, and Find/Citation reveal_entry: wheel_should_track / handle_scroll_key_down no longer release Following on downward scroll/keys when already at the bottom (max_offset_for_scrollbar().y <= 0 or not anchored), ignore wheel events whose hit chain includes a nested scrollable group_list, and reveal_entry now passes ScrollSource::Find / ScrollSource::Citation through on_observed_list_scroll.
  3. Reused SelectionGroup reset in minimap preview: Added SelectionGroup::reset (clear_selection + clearing parts) and called it when switching turns, losing assistant_text, or closing the preview.
  4. Top-of-list restore & initial draft promotion: apply_pending_restore handles row_id.is_none() || scroll_top <= 0 immediately (preserving Home / header restore) and defers unmeasured scroll_top > 0 via pending_scroll_top on on_next_frame; observe_runs preserves first-run anchoring on initial hydration when runs.len() == 1 && total_user_messages == 1 && !has_tool_or_reasoning.

Verified after final edit:

  • cargo clippy --workspace --all-targets -- -D warnings: 0 warnings
  • cargo test -p t3-core -p t3-client: t3-client 110 passed, t3-core 1385 passed, conformance 8 passed
  • t3-native --features snapshot (--test-threads=1): 76 passed (thread_view:: selectable_text:: side_chat:: transcript::)
  • t3-native default (--test-threads=1): 19 passed (thread_view:: selectable_text::)
  • vp fmt --check apps/native/parity/LEDGER.md, node --test apps/native/parity/sync.test.ts (42/42), gen-theme.ts --check, conformance/generate.ts --check

@rynfar

rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Addressed PR #372 follow-up review findings in commit c18344b3c73006357281dcdf16f9d7f2433b04d4:

  1. group_list wheel guard & outer self.list isolation: Replaced pointer_in_scrollable_group_list with scrollable_group_list_at, verifying the RowKind::Work { expanded_group: true } item's offset_for_item range overlaps the live self.list scroll window [scroll_y, scroll_y + outer_bounds.height] so stale off-screen viewport_bounds() never suppress outer transcript wheel tracking. Added a sibling transcript-group-wheel-guard layer painted after transcript (firing before self.list in Bubble order): when the pointer is over an on-screen scrollable group_list that can scroll in the wheel direction, it scrolls only group_list and calls cx.stop_propagation() so outer self.list stays put; once group_list reaches its top/bottom boundary, wheel events chain cleanly out to self.list and track ScrollSource::Wheel.
  2. Pre-layout reveal_entry expansion: TimelineFollow::on_user_navigation keeps Find/Citation in FollowPhase::Released even when jumping near bottom, and reveal_entry skips the synchronous pre-layout on_observed_list_scroll when rederive just spliced unmeasured 0px rows (putting follow into Released { at_end: false } directly while letting observe_with_groups update at_end after layout measures).

Verified after final edit:

  • cargo clippy --workspace --all-targets -- -D warnings: 0 warnings
  • cargo test -p t3-core -p t3-client: t3-client 110 passed, t3-core 1385 passed, conformance 8 passed
  • t3-native --features snapshot (--test-threads=1): 77 passed (thread_view:: selectable_text:: side_chat:: transcript::, including new group_list_wheel_and_find_expand_follow_guards)
  • t3-native default (--test-threads=1): 19 passed (thread_view:: selectable_text::)
  • vp fmt --check apps/native/parity/LEDGER.md, node --test apps/native/parity/sync.test.ts (42/42)

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