Repository navigation
Draw compared timeline runs on one time axis under one playhead - #4803
Merged
Merged
Conversation
A comparison of runs was two lf-timelines, often in tabs, and each scaled its axis to its own run, so a run that took 63% longer drew the same width. An lf-timeline now holds lf-run children, each with its lanes: every run shares the axis, scaled to the longest, and the playhead, so each step shows every run at the same moment, and the step list names each event's run. A timeline of bare lanes draws as before. The lost-update example compares its two runs in one timeline instead of two tabs, and the timeline's author instructions say to compare that way.
… marks up down the lanes Reviews of the shared axis found four gaps. A run with no lanes vanished, so a comparison silently lost a side; every run now takes its heading row. A bare lane beside runs drew as part of the run above it; the widget now reports it, as it reports a span that ends before it starts. Each step row repeated the run name before every event; it now names each run once, while announcements and comment labels keep the full name. Marks in a lower run sat far from the ruler; a dotted line at each labelled second now runs down every lane, in single-run timelines too. A step's row also stays on one sheet when printed, and later runs stand a little further from the run above them.
leaf-agent
approved these changes
Oct 31, 2026
This was referenced Nov 4, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 4, 2026
#4803 added `lf-run` (one run of a compared sequence in an `lf-timeline`) without an `x-example`, so the widget quality report's `example` check found no worked example showing the tag, and the nightly journey `test_bundled_widgets_meet_the_widget_quality_checks[timeline]` has failed since. This adds a worked example to `lf-run`'s registry entry: one timeline with a "Before the fix" and an "After the fix" run sharing their Client and Server lanes, which also gives the package's other quality checks an `lf-run` to read. The intent of #4803 and the timeline's interface are unchanged. The journey test fails on main with `<lf-run> example: no worked example shows it` and passes with this change; the model-tier widget-quality, layer and theme tests also pass. Closes #5186 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
Compared timelines were separate
lf-timelinewidgets, usually one per tab, and each scaled its axis to its own run. In the lost-update example the broken run (5.2 s) and the fixed run (8.5 s) filled the same width, so one 4 s bar covered 77% of one track and 47% of the other, and the 3.3 s the lock costs never showed.One timeline, several runs. An
lf-timelinenow holdslf-runchildren, each with alabeland its own lanes. Every run shares the axis, scaled to the longest run, and one playhead, so each step shows every run at the same moment, and Next goes to the next moment in any run. A row of the step list names each run once; announcements and comment labels name it for every event. An empty run keeps its heading, and a bare lane beside runs is reported as a page error, as a span that ends before it starts already is. A timeline of bare lanes draws as before. Keeping runs in one widget, rather than linking separate timelines to a shared axis, shares the axis and the playhead without code to keep them in agreement;timelineModel's docstring records the choice.Gridlines. A dotted line at each labelled second runs down every lane, so a mark in a lower run still reads against the ruler at the top. Single-run timelines get them too. A step's row also stays on one printed sheet.
Authoring. The timeline's author instructions now say to put each compared run in an
lf-runof one timeline, replacing "give each run its own timeline, stacked or in tabs". The lost-update example shows its two runs in one timeline instead of two tabs; the stills states follow it, and the browser-support note that used its tabs now points atcode-comparison.Testing: two new runtime tests (shared axis, steps, headings and step-row names; an empty run and a bare lane) and one browser test (marks at the same time line up across runs, the playhead spans every run, and the announcement names the run). The touched timeline runtime and browser tests, the example's page check, registry example validation and widget quality pass. A Codex review and a cold UI review ran on the change; their findings are fixed in the second commit. The step-row print fix is unchecked on paper.