Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(view): keep replay controls on fixed tracks [A10,N26]
Corey Olson84aedf3ac078
diff --git a/src/view.css b/src/view.cssindex 6c2cd93f..0a214c9d 100644--- a/src/view.css+++ b/src/view.css@@ -575,11 +575,19 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.flow g:hover > .box, .flow g:hover > .edge { stroke-width: 2.2; }.console { position: static; width: min(560px, calc(100% - 32px)); margin: 8px auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 38vh; overflow: auto; cursor: pointer; }.console.ok { border-color: var(--accent); } .console.no { border-color: var(--reject); }-.snapshot-controls:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 12px 16px; }-.snapshot-controls > span { font-weight: 600; }-#replay-play { min-inline-size: 12em; }-.snapshot-controls label { display: flex; align-items: center; gap: 6px; }-.snapshot-controls output { color: var(--ink-muted); font: 12px/1.5 var(--mono); }+/* Changing Play and event labels occupy their own tracks, so they cannot rewrap a tap target. */+.snapshot-controls:not([hidden]) { display: grid; grid-template-columns: minmax(0, 18rem) max-content max-content; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; }+.snapshot-controls > span { grid-column: 1 / -1; font-weight: 600; }+#replay-play { grid-column: 1; min-inline-size: 0; }+#replay-pause { grid-column: 2; }+.snapshot-controls label { grid-column: 3; display: flex; align-items: center; gap: 6px; }+.snapshot-controls output { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; color: var(--ink-muted); font: 12px/1.5 var(--mono); }+@media (width < 600px) {+ .snapshot-controls:not([hidden]) { grid-template-columns: minmax(0, 1fr) max-content; }+ #replay-play { grid-column: 1 / -1; }+ #replay-pause { grid-column: 1; justify-self: start; }+ .snapshot-controls label { grid-column: 2; }+}.snapshot #new-item, .snapshot form, .snapshot [data-new], .snapshot [data-release], .snapshot [data-shout], .snapshot [data-go^="decide:"] { display: none !important; }.read-only:not(.requests) #new-item, .read-only:not(.requests) form, .read-only:not(.requests) [data-new], .read-only:not(.requests) [data-release], .read-only:not(.requests) [data-shout], .read-only:not(.requests) [data-go^="decide:"] { display: none !important; }.person-requests { margin-bottom: 12px; padding: 12px; min-width: 0; }diff --git a/test/cockpit/snapshot.test.js b/test/cockpit/snapshot.test.jsindex 43234954..a50d20fc 100644--- a/test/cockpit/snapshot.test.js+++ b/test/cockpit/snapshot.test.js@@ -338,8 +338,7 @@ test('replay speed is judged by its scheduled delay [A10,C7]', { timeout: 90_000});/** Measure every interactive replay control through its real start, pause, and end states. */-test('the replay controls don\'t move when the replay starts [A10,C7]', { timeout: 60_000 }, // budget: hang-only ceiling for two viewport geometry passes.-async function replayControlsStayPut() {+const replayControlsStayPut = (wideFonts) => async function replayControlsStayPutCase() {const executable = chromeExecutable();assert.ok(executable, 'Chrome is required for replay control geometry coverage');const box = machine();@@ -366,10 +365,32 @@ async function replayControlsStayPut() {return [selector, { x: rect.x, y: rect.y, width: rect.width, height: rect.height }];})))`));+ /** Measure the visible Play label's glyph extent to name the changing width in the wide-font case. */+ const readPlayLabel = async () => JSON.parse(await chrome.stable(`JSON.stringify((() => {+ const node = document.querySelector('#replay-play');+ const range = document.createRange();+ range.selectNodeContents(node);+ const textWidth = [...range.getClientRects()].reduce((sum, rect) => sum + rect.width, 0);+ return { text: node.textContent, textWidth, boxWidth: node.getBoundingClientRect().width,+ letterSpacing: getComputedStyle(node).letterSpacing };+ })())`));/** Exercise real browser input and compare control geometry within one viewport. */const verifyWidth = async (width) => {await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });await chrome.waitFor(`innerWidth === ${width}`);+ if (wideFonts) {+ await chrome.stable(`(() => {+ const sheet = document.styleSheets[0];+ sheet.insertRule('.snapshot-controls, .snapshot-controls * { letter-spacing: .12em !important; }', sheet.cssRules.length);+ return true;+ })()`);+ const spacing = JSON.parse(await chrome.stable(`JSON.stringify(+ ['#snapshot-controls > span', '#replay-play', '#replay-pause', '#replay-speed', '#replay-progress']+ .map((selector) => getComputedStyle(document.querySelector(selector)).letterSpacing)+ )`));+ assert.ok(spacing.every((value) => Number.parseFloat(value) > 0),+ `375: every changing replay label receives wide letter spacing: ${JSON.stringify(spacing)}`);+ }await chrome.stable(`(() => {replayPosition(0);const speed = document.querySelector('#replay-speed');@@ -377,6 +398,7 @@ async function replayControlsStayPut() {speed.dispatchEvent(new Event('change', { bubbles: true }));})()`);const atStart = await readControlBoxes();+ const playLabelAtStart = wideFonts ? await readPlayLabel() : null;assert.equal(await chrome.stable("document.querySelector('#replay-play').textContent"), 'Play',`${width}: the start-state label is the short Play label`);await press(chrome, "document.querySelector('#replay-play')");@@ -394,13 +416,18 @@ async function replayControlsStayPut() {assert.equal(await chrome.stable('snapshotReplay.index'), total, `${width}: final Play renders the end state`);assert.equal(await chrome.stable('snapshotReplay.playing'), false, `${width}: replay stops at its final event`);const atEnd = await readControlBoxes();+ const playLabelAtEnd = wideFonts ? await readPlayLabel() : null;assert.equal(await chrome.stable("document.querySelector('#replay-play').textContent"), 'Play from first event',`${width}: the end-state label exercises the longer Play text`);+ if (wideFonts) {+ assert.ok(playLabelAtEnd.textWidth > playLabelAtStart.textWidth,+ `${width}: the longer Play label grows from ${JSON.stringify(playLabelAtStart)} to ${JSON.stringify(playLabelAtEnd)}`);+ }for (const [state, boxes] of Object.entries({ whilePlaying, whilePaused, atEnd })) {assert.deepEqual(boxes, atStart, `${width}: every interactive replay control keeps its box unchanged ${state}`);}};- for (const width of [375, 1280]) {+ for (const width of (wideFonts ? [375] : [375, 1280])) {await verifyWidth(width);}} finally {@@ -408,7 +435,13 @@ async function replayControlsStayPut() {await host.close();rmSync(profile, { recursive: true, force: true });}-});+};++test('the replay controls don\'t move when the replay starts [A10,C7]', { timeout: 60_000 }, // budget: hang-only ceiling for two viewport geometry passes.+ replayControlsStayPut(false));++test('the replay controls hold their place at 375 with wide fonts [A10,C7]', { timeout: 60_000 }, // budget: hang-only ceiling for one viewport geometry pass.+ replayControlsStayPut(true));test('static export redacts structured checkout paths but preserves paths people wrote [A10]', async () => {const box = machine();