Repository navigation
feat(web): align timeline cursor with revision changedTime and display secondary log cursor - #1200
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
October 30, 2026 03:20
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for a secondary cursor on the timeline to represent the log timestamp when it differs from the selected revision's changed time, along with tooltip updates to show time deltas. It also updates the selection manager to track and highlight specific revisions rather than just logs, helping to disambiguate revisions sharing the same log index. Feedback on these changes suggests disabling empty tooltips in the diff list, removing a redundant defensive check for onHighlightRevision, simplifying a redundant Math.max clamping logic in the timeline frame, and deduplicating the minQueryTimeNs calculation in TimelineSmartComponent.
kyasbal
commented
Oct 30, 2026
Merged
via the queue into
GoogleCloudPlatform:main
with commit Oct 30, 2026
b305dca
17 checks passed
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.
Background
In KHI, a resource
Revisionhas two potentially distinct timestamps:revision.changedTime: when the resource state transition actually occurred (for example,status.containerStatuses[].state.running.startedAtormetadata.deletionTimestamp).log.timestamp: when the underlying log entry reporting that state transition was recorded (for example, an asynchronously syncedNode/PodPATCH audit log or a log used to infer an initial state atchangedTime = 0).Previously, selecting or hovering over a revision on the timeline chart placed the vertical timeline cursor and anchored the hover popup search window at
log.timestampinstead ofrevision.changedTime, even though revision bars on the timeline canvas are drawn starting atrevision.changedTime. Whenlog.timestamplagged behindrevision.changedTimeby several seconds (or when an initial-state revision atchangedTime = 0was inferred from a later log), clicking or hovering a revision bar caused the cursor and hover popup to jump away from the revision's visual boundary, making the cursor appear misaligned. Additionally, when a single log entry produced multiple revisions on the same timeline (such as container termination and restart reported in one Pod status update), selection and hover state in the hover overlay and Diff list could not distinguish between those revisions because they matched only bylogIndex.Approach
Align Primary Cursor and Hover Target with
revision.changedTime:selectedRevision.legacyChangedTimeMs(clamped tominQueryLogTimeMSfor initial-state or pre-query revisions) when a revision is selected, while keepingselectedLog.legacyTimestampMsfor event and log selections.revision.changedTimewhen targeting a revision, clamping the hover target to the visible portion of the revision bar when its start is scrolled off-screen to the left.changedTimeprecedesminQueryLogTimeMS.Display a Secondary Log Timestamp Cursor:
changedTimediffers from its underlyinglog.timestamp, render a secondary dashed vertical cursor line and a second-tier header label (Log: <ISO timestamp> (+4.4s)) atlog.timestampso both the state transition time and the log recording time remain visible simultaneously.Disambiguate Multi-Revision Logs Across Selection, Hover Overlay, and Diff List:
highlightedRevisioninSelectionManagerand preserveselectedRevisionwhenonSelectLogis invoked for a log that corresponds to multiple revisions on the active timeline.SelectedandHoveredstates inTimelineHoverOverlayComponentandDiffListComponentby revision identity (revision.id/revision.index) rather thanlogIndexalone, and add a tooltip on Diff list timestamps explaining the delta whenchangedTimeandlog.timestampdiverge.