feature(DT-3929): Timeline - Collapsible Idle Time#3569
Draft
tegan-temporal wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Squash-rebase of the collapse-idle-time feature onto SharedHistoryBuffer's timeline performance rewrite (window virtualization, grouped-event-buffer, sticky-canvas scroll compositing, imperative panel-shift transforms). The collapse feature is layered onto SHB's architecture in the timeline-graph/ directory layout: - X-axis time->pixel projection flows through the collapse-aware TimelineScale/Viewport (projectX); SHB's Y-axis row virtualization and imperative active-panel transform are preserved. The two axes are orthogonal so they compose cleanly. - validTimeToDate routes its parse through SHB's cachedParseJSON, keeping the session parse cache inside the feature's abstraction. Reconciliations where the two approaches were mutually exclusive: - Dropped the per-row position cache: it keyed on (width,y,len) and would serve stale points when collapse toggles; its parseJSON cost is now covered by cachedParseJSON. - Kept SHB's CSS grid background and label-only axis (the axis ticks are no longer collapse-aware; collapsed regions are still marked by the overlay). - group-details-row uses SHB's ResizeObserver/onHeight panel-height path instead of the $activeGroupHeight store. Includes one fix to a pre-existing SHB type error in svg/timeline-graph-row-rendering.test.ts (literal-narrowed comparison).
Timeline segments are $derived from the streaming event list, so applying the default collapse on init (mid-stream) made the idle-time zigzag appear and shift as partial-data gaps resolved during initial load. - Apply collapseAllSegmentsByDefault() from an $effect gated on historyCtx.fetchComplete instead of in onTimelineInit, so the default collapse runs once against the final, stable segment set. - Hide TimelineCollapsedLayer while loading so no zigzag/handles render on unstable segments. - Disable the show/hide idle-time toggle until fetchComplete and show the Button's loading spinner in place of its icon while the history streams in.
f39406d to
6f0ffa8
Compare
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.
Description & motivation 💭
Add ability to collapse / expand idle time
Screenshots (if applicable) 📸
CleanShot.2026-06-24.at.14.37.09.mp4
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed DT-3929
Docs
Any docs updates needed?