Skip to content

Draw compared timeline runs on one time axis under one playhead - #4803

Merged
max-sixty merged 4 commits into
mainfrom
timeline-shared-axis
Oct 31, 2026
Merged

max-sixty merged 4 commits into
mainfrom
timeline-shared-axis

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Compared timelines were separate lf-timeline widgets, 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-timeline now holds lf-run children, each with a label and 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-run of 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 at code-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.

This was written by Claude Code on behalf of max-sixty

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.
@max-sixty
max-sixty merged commit 310e2ef into main Oct 31, 2026
4 checks passed
@max-sixty
max-sixty deleted the timeline-shared-axis branch October 31, 2026 03:24
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]>
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.

2 participants