feat(ui): stabilize shared M4.8 review viewer

This commit is contained in:
DCCONSTRUCTIONS
2026-08-24 22:36:08 +03:00
parent 992c5a8b74
commit 4fa6597b18
44 changed files with 6463 additions and 147 deletions
@@ -326,6 +326,47 @@ test("spatial timeline renders synchronized accumulation and playback controls",
assert.equal((markup.match(/type="range"/g) ?? []).length, 2);
});
test("recorded observation timeline uses compact icon transport and one inline rate trigger", () => {
const idleMarkup = renderToStaticMarkup(createElement(ObservationTimeline, {
active: true,
sourceCount: 2,
mode: "recorded",
seekable: true,
rangeNs: { min: 0, max: 20_000_000_000 },
currentNs: 5_000_000_000,
playing: false,
playbackRate: 1,
onSeek: () => undefined,
onPlayingChange: () => undefined,
onPlaybackRateChange: () => undefined,
}));
const playingMarkup = renderToStaticMarkup(createElement(ObservationTimeline, {
active: true,
sourceCount: 2,
mode: "recorded",
seekable: true,
rangeNs: { min: 0, max: 20_000_000_000 },
currentNs: 5_000_000_000,
playing: true,
playbackRate: 1,
onSeek: () => undefined,
onPlayingChange: () => undefined,
onPlaybackRateChange: () => undefined,
}));
assert.match(idleMarkup, /aria-label="Воспроизвести"/);
assert.match(idleMarkup, /lucide-play/);
assert.match(idleMarkup, /fill="currentColor"/);
assert.match(idleMarkup, /stroke-width="0"/);
assert.match(playingMarkup, /aria-label="Пауза"/);
assert.match(playingMarkup, /lucide-square/);
assert.match(playingMarkup, /fill="currentColor"/);
assert.match(idleMarkup, /nodedc-select-inline/);
assert.match(idleMarkup, />1×<\/span>/);
assert.doesNotMatch(idleMarkup, /nodedc-select-trigger__chevron/);
assert.doesNotMatch(idleMarkup, />Воспроизвести<|>Пауза</);
});
test("Rerun expands only root-relative session recordings onto the current origin", () => {
assert.equal(
resolveRerunSourceUrl(