Skip to content

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.

revert(merge): replay controls at phone width fail on Linux [A10,C7]

Corey Olsoncdcf163c5769
diff --git a/src/view.css b/src/view.css
index 0a214c9d..6c2cd93f 100644
--- a/src/view.css
+++ b/src/view.css
@@ -575,19 +575,11 @@ 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); }
-/* 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-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); }
.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.js
index a50d20fc..43234954 100644
--- a/test/cockpit/snapshot.test.js
+++ b/test/cockpit/snapshot.test.js
@@ -338,7 +338,8 @@ 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. */
-const replayControlsStayPut = (wideFonts) => async function replayControlsStayPutCase() {
+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 executable = chromeExecutable();
assert.ok(executable, 'Chrome is required for replay control geometry coverage');
const box = machine();
@@ -365,32 +366,10 @@ const replayControlsStayPut = (wideFonts) => async function replayControlsStayPu
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');
@@ -398,7 +377,6 @@ const replayControlsStayPut = (wideFonts) => async function replayControlsStayPu
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')");
@@ -416,18 +394,13 @@ const replayControlsStayPut = (wideFonts) => async function replayControlsStayPu
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 (wideFonts ? [375] : [375, 1280])) {
+ for (const width of [375, 1280]) {
await verifyWidth(width);
}
} finally {
@@ -435,13 +408,7 @@ const replayControlsStayPut = (wideFonts) => async function replayControlsStayPu
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();