Compare commits

...
Author SHA1 Message Date
Brent Vatne 601aabfba4 Release 0.23.0 2026-10-29 17:25:58 -07:00
Daehyeon MunandClaude Opus 5.5 8273d032f0 Viewer: the minimap stays above cards fading in during a fast pan on iOS
A fast pan over a virtualized map mounts new cards, and each screenshot's reveal fade gives it
its own compositing layer in iOS WebKit. The minimap, without a layer of its own, was lifted
above them a frame late, so cards flickered over it (reproduced on an iPhone Duo simulator).
will-change: transform keeps it on its own layer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 13:27:57 +07:00
Brent Vatne 29ce5dea3c CLI: report long commands' status to the terminal with OSC 7501
capture, capture:baseline, explore:binary, explore:session, report:upload
and doctor --capture tell a terminal that supports OSC 7501 whether they
are working (with the latest progress line), waiting on a yes/no, done or
failed, so a tab left in the background shows it. A failing exit code
reports an error, and a local review names the targets with no report.
Ctrl+C clears the status.

Only an interactive stderr gets the sequence: not a pipe, CI, TERM=dumb
or --json. Messages are redacted as stderr's diagnostics are, since the
terminal keeps a done or error record after the process exits;
environmentSecrets now also matches *_PRIVATE_KEY, as reportCiError does.

Spec: https://superlogical.com/rex/docs/build/program-status
2026-10-24 20:07:40 -07:00
Daehyeon MunandClaude Opus 5.5 90d5d52dab Viewer: Compare's Split centres each frame under its name in WebKit
WebKit sized each Split side by the stage's available width instead of the
frame's height × aspect-ratio width, so on a folded iPhone Duo (Safari and
Chrome alike) each side stayed half the stage and its frame sat at the left,
off centre under Before/After. The frame's width is now spelled out from its
height and aspect, so every engine shrinks the side to the frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:57:52 +07:00
Brent Vatne 7fa07d2cc0 PR template: ask for code examples, and something reviewers can try (#75) 2026-10-23 21:58:50 -07:00
13 changed files with 210 additions and 10 deletions

No files matched your search

+28
View File
@@ -16,6 +16,34 @@ Write "No visible change" if there is none.
| --- | --- |
| | |
## Code examples
<!--
Required for any change to how Explore is used or what it writes: a CLI command or flag,
config.yaml, a workflow template, a file format (a replay or flows file, report JSON), or a
public type. Show it in use as a reader would write it: the command with its flags, the config
or file it reads, and what it prints or writes, trimmed to the lines that matter. When existing
usage changes, show it before and after.
Write "No change to usage" if there is none.
-->
```sh
```
## Try it
<!--
Optional, but recommended: something a reviewer can open or run to see the change for themselves.
- A Viewer change: the Viewer preview comment on this PR links a live build. Name the report,
screen and steps to look at.
- A capture or report change: a hosted report from a run of this branch (explore:binary,
explore:session or capture with --upload), or an app pull request whose review ran this branch.
- Otherwise: the commands that run it from a checkout of this branch, for example
`npm ci && npm run build`, then `node dist/cli.js <command>`, with any app or file it needs.
Write "Nothing to try" if there is nothing a reviewer could run.
-->
## Testing
<!-- What you ran and what you checked by hand. -->
+1 -1
View File
@@ -155,7 +155,7 @@ npx @expo/explore capture --base v1.3.0 --head v1.4.0 --scope all --upload
- Your checkout, index and branches are never touched. Your uncommitted changes, untracked files included, are reviewed as `eas build` would upload them; `--committed`, or `cli.requireCommit: true` in `eas.json`, leaves them out.
- Installs run without credential environment variables, which keeps tokens out of reach of a registry a commit's `.npmrc` names; that is not a sandbox. A registry that needs `${NPM_TOKEN}` in the project's `.npmrc` must be authenticated in your own `~/.npmrc`.
- Captures are cached in `~/.cache/expo-explore`, so the same base is not captured twice (`--no-cache` skips it); a capture unused for 30 days goes, and the cache stays under 2 GB. Ctrl+C stops the run's simulator sessions and local devices; when a run is stopped harder than that, the next local run stops what it left running.
- Like a CI review, it builds on EAS (reusing a matching build) and, unless it captures on a local simulator, runs EAS Simulator sessions: expect several minutes and EAS usage.
- Like a CI review, it builds on EAS (reusing a matching build) and, unless it captures on a local simulator, runs EAS Simulator sessions: expect several minutes and EAS usage. A terminal that supports [OSC 7501](https://superlogical.com/rex/docs/build/program-status) shows whether the run is working, done or failed while you are in another tab; `explore:binary`, `report:upload` and `doctor --capture` report it too.
- Saved runs take up to 2 GB in all, the oldest going first. `reports add <report.zip>` keeps a report you downloaded, such as a PR's `explore-review` artifact.
</details>
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@expo/explore",
"version": "0.22.1",
"version": "0.23.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@expo/explore",
"version": "0.22.1",
"version": "0.23.0",
"license": "MIT",
"dependencies": {
"@expo/repack-app": "0.10.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@expo/explore",
"version": "0.22.1",
"version": "0.23.0",
"description": "Source-driven mobile app maps, deterministic CI capture, and visual reviews",
"license": "MIT",
"type": "module",
+11
View File
@@ -5,6 +5,7 @@ import { resolve } from "node:path";
import { ExploreStore } from "./map/store.js";
import { QUERY_CONTRACT } from "./types.js";
import { EXPLORE_VERSION } from "./shared/package-paths.js";
import { enableProgramStatus, lastReportedStatus, reportFinished, reportStatus } from "./shared/program-status.js";
import { isTargetId } from "./config/explore-config.js";
import { command, resultContract, argumentError, validateCommandArguments, flag, has, setStore } from "./cli/args.js";
import { help } from "./cli/help.js";
@@ -69,6 +70,11 @@ const handlers: Record<string, () => Promise<void> | void> = {
/** Commands people type at a terminal; everything else answers agents and scripts in JSON. */
const HUMAN_COMMANDS = new Set(["setup", "doctor", "view", "help", "explore:binary", "explore:session", "report:upload", "reports"]);
/** Commands that run for minutes, so the terminal hears whether they are working, done or failed (see program-status). */
const LONG_COMMANDS = new Set(["capture:review", "capture:baseline", "explore:binary", "explore:session", "report:upload"]);
/** Stopped with Ctrl+C at the terminal: the person already knows, so the status is cleared rather than left as an error. */
const CANCELLED = new Set(["LOCAL_REVIEW_INTERRUPTED", "CAPTURE_CANCELLED"]);
function version(): void {
console.log(EXPLORE_VERSION);
}
@@ -77,10 +83,15 @@ try {
const handler = handlers[command];
if (!handler) argumentError(`Unknown command: ${command}`, undefined, "Run expo-explore help and choose a supported command.");
validateCommandArguments();
// Not with --json: under a pseudo-terminal the sequence would share a line with the JSON an agent parses.
if ((LONG_COMMANDS.has(command) || (command === "doctor" && has("capture"))) && !has("json")) { enableProgramStatus(); reportStatus("working"); }
const workspace = resolve(process.cwd(), flag("dir") ?? ".explore");
setStore(new ExploreStore(workspace));
await handler();
if (lastReportedStatus() === "working") reportFinished();
} catch (error) {
if (error instanceof CiError && CANCELLED.has(error.code)) reportStatus("clear");
else reportStatus("error", { message: error instanceof Error ? error.message : String(error) });
if (command.startsWith("capture:") || command.startsWith("source:") || command.startsWith("ci:") || command.startsWith("config:")) {
// The failure comment names the target from this: a capture, report or publication of one matrix target.
const target = (() => { try { return flag("target"); } catch { return undefined; } })();
+5 -2
View File
@@ -8,6 +8,7 @@ import { keepReports } from "./report-commands.js";
import { warnIgnoredExpiry } from "../config/explore-config.js";
import { argumentError, flag, flags, has, nonNegativeInteger, oneOf, output, positional, positiveInteger } from "./args.js";
import { readReplayPlan } from "../binary/replay.js";
import { reportFinished, reportStatus } from "../shared/program-status.js";
/** `--alias NAME` plus a fixed token from EXPLORE_PREVIEW_TOKEN: the hosted link stays the same from one run to the next (validated by the deploy). */
@@ -37,7 +38,7 @@ export async function exploreBinary(): Promise<void> {
const upload = simulator === "local" ? has("upload") : !has("no-upload");
const port = flag("port") === undefined ? undefined : nonNegativeInteger("port");
const started = Date.now();
const say = (message: string) => { process.stderr.write(`[explore ${Math.round((Date.now() - started) / 1000)}s] ${message}\n`); };
const say = (message: string) => { reportStatus("working", { message }); process.stderr.write(`[explore ${Math.round((Date.now() - started) / 1000)}s] ${message}\n`); };
const allowDestructive = flags("allow-destructive").flatMap(value => value.split(",")).map(value => value.trim()).filter(Boolean);
if (upload) await assertHostingExport();
const result = await runBinaryExploration({
@@ -77,6 +78,7 @@ export async function exploreBinary(): Promise<void> {
if (simulator === "eas" || hosted || has("no-open")) { console.log(`Next: ${summary.next.join(" | ")}`); return; }
const viewer = await startViewerServer({ root: outputDirectory, ...(port === undefined ? {} : { port }) });
console.log(`Viewer: ${viewer.url} (Ctrl+C to stop)`);
reportFinished();
openViewerInBrowser(viewer.url);
await waitForViewerShutdown(viewer);
}
@@ -100,7 +102,7 @@ export async function exploreSession(): Promise<void> {
const controller = flag("controller") === undefined ? undefined : oneOf("controller", ["agent-device", "argent"] as const);
const port = flag("port") === undefined ? undefined : nonNegativeInteger("port");
const started = Date.now();
const say = (message: string) => { process.stderr.write(`[explore ${Math.round((Date.now() - started) / 1000)}s] ${message}\n`); };
const say = (message: string) => { reportStatus("working", { message }); process.stderr.write(`[explore ${Math.round((Date.now() - started) / 1000)}s] ${message}\n`); };
const allowDestructive = flags("allow-destructive").flatMap(value => value.split(",")).map(value => value.trim()).filter(Boolean);
const envFile = await defaultSessionEnvFile(flag("env-file"));
if (has("upload")) await assertHostingExport();
@@ -140,6 +142,7 @@ export async function exploreSession(): Promise<void> {
if (hosted || has("no-open")) { console.log(`Next: ${summary.next.join(" | ")}`); return; }
const viewer = await startViewerServer({ root: outputDirectory, ...(port === undefined ? {} : { port }) });
console.log(`Viewer: ${viewer.url} (Ctrl+C to stop)`);
reportFinished();
openViewerInBrowser(viewer.url);
await waitForViewerShutdown(viewer);
}
+9 -1
View File
@@ -21,6 +21,7 @@ import { help } from "./help.js";
import { CiError } from "../shared/ci-errors.js";
import { cleanupAfterCapture, findOptionalBaseline, resolveCompareRefs, resolvePullRequest, writeCaptureOutputs, writeStepOutputs } from "../ci/workflow-steps.js";
import { stderrProgress } from "../shared/progress.js";
import { reportFinished, reportStatus } from "../shared/program-status.js";
import { appendTimingsSummary, timingsPathFor } from "../shared/timings.js";
import { maxParallelTargets } from "../ci/session-plan.js";
@@ -47,10 +48,12 @@ Fix the problems in steps 1–5 before a capture check.`);
}
if (!has("yes")) {
if (!process.stdin.isTTY || has("json")) argumentError("A capture check starts an EAS build and simulator session; pass --yes to confirm.", "yes");
reportStatus("blocked", { kind: "question", message: "Start a capture check on EAS?" });
const terminal = createInterface({ input: process.stdin, output: process.stderr });
const answer = await terminal.question(`This builds the app on EAS and runs an EAS Simulator session (EAS usage applies${report.mode === "agent" ? "; agent mode also uses your model API key or local claude/codex login" : ""}). Continue? (yes/no) `);
terminal.close();
if (!/^(y|yes)$/i.test(answer.trim())) return;
if (!/^(y|yes)$/i.test(answer.trim())) { reportStatus("clear"); return; }
reportStatus("working");
}
let result: Awaited<ReturnType<typeof runCaptureCheck>>;
try {
@@ -310,6 +313,8 @@ async function localReview(): Promise<void> {
}
// A target that failed outright has no report; the others still open, save and upload, and the command exits 1.
if (result.failures.length) process.exitCode = 1;
// The terminal keeps this record after the run, so it names what failed rather than what was open.
const finished = () => reportFinished(result.failures.length ? `No report for ${result.failures.map(({ target }) => target.id).join(", ")}` : undefined);
const summary = { ok: result.failures.length === 0, runId: result.runId, base: result.base, head: result.head,
...(result.failures.length ? { failures: result.failures.map(({ target, error }) => ({ target: target.id, code: error.code, message: error.message })) } : {}),
reports: result.reports.map(({ platform, target, directory, zip, changes, device }) => ({ platform, target: target.id, label: target.label, directory, zip,
@@ -331,15 +336,18 @@ async function localReview(): Promise<void> {
if (has("json")) output({ ...summary, ...(copied ? {} : { reports: summary.reports.map(({ directory: _directory, zip: _zip, ...report }) => report) }),
url: hosted.previewUrl, expiresAt: hosted.expiresAt });
else console.log(`Report: ${hosted.previewUrl}${hosted.expiresAt ? ` (until ${hosted.expiresAt.slice(0, 10)})` : ""}`);
finished();
return;
}
if (has("json") || has("no-open")) {
if (has("json")) output(summary);
else for (const report of result.reports) console.log(`${report.target.id}: ${report.zip}`);
finished();
return;
}
const server = await startLocalReportServer({ reports: zips, ...(has("port") ? { port: nonNegativeInteger("port") } : {}) });
console.log(`Viewer: ${server.url} (Ctrl+C to stop)`);
finished();
if (saved) console.log(`Saved as ${saved.id}: expo-explore reports reopens it, and reports upload ${saved.id} hosts it.`);
openViewerInBrowser(server.url);
await new Promise<void>(done => { process.once("SIGINT", () => done()); process.once("SIGTERM", () => done()); });
+1 -1
View File
@@ -57,7 +57,7 @@ export type CiErrorRenderOptions = { secrets?: readonly string[] };
/** The values of every variable that names a secret (a token, secret, password or API key), to redact from what Explore writes. */
export function environmentSecrets(environment: NodeJS.ProcessEnv): string[] {
return Object.entries(environment).filter(([key]) => /(?:TOKEN|SECRET|PASSWORD|API_KEY)/i.test(key)).flatMap(([, value]) => value ? [value] : []);
return Object.entries(environment).filter(([key]) => /(?:TOKEN|SECRET|PASSWORD|API_KEY|PRIVATE_KEY)/i.test(key)).flatMap(([, value]) => value ? [value] : []);
}
/** Redacts secret values, bearer and provider tokens, credentials in URLs, and signed-URL parameters from any text Explore writes. */
+63
View File
@@ -0,0 +1,63 @@
import { environmentSecrets, redactSecrets } from "./ci-errors.js";
/**
* Tells the terminal what a long command is doing with OSC 7501
* (https://superlogical.com/rex/docs/build/program-status), so a tab left in the background can show that a review is
* working, waiting on an answer, done or failed. Only an interactive stderr gets the sequence; a terminal that does not
* know it ignores it, as it does any unknown OSC (ECMA-48 §8.3.89). The spec's feature query is not sent: reading its
* reply would put stdin in raw mode under the command's own prompts.
*
* The terminal drops a `working` or `blocked` record when the process exits and keeps `done` and `error`, so an exit
* without a final report (a second Ctrl+C) leaves nothing behind.
*/
export type ProgramState = "working" | "blocked" | "done" | "error" | "clear";
export type BlockedKind = "permission" | "question" | "auth";
const APP = "expo-explore";
/** The spec allows 2048 bytes of decoded `msg`; 512 code points stay under it in any script. */
const MESSAGE_LIMIT = 512;
let write: ((text: string) => void) | undefined;
let last: ProgramState | undefined;
/**
* A message is redacted as stderr's diagnostics are, since a kept record outlives the process. Redacting comes first,
* so truncation cannot leave a partial secret the patterns no longer match.
*/
export function programStatusSequence(state: ProgramState, details: { message?: string; kind?: BlockedKind } = {}, environment: NodeJS.ProcessEnv = process.env): string {
const pairs = [`state=${state}`, `app=${APP}`];
if (state === "blocked" && details.kind) pairs.push(`kind=${details.kind}`);
const redacted = details.message === undefined ? undefined : redactSecrets(details.message, environmentSecrets(environment));
// The terminal discards a report whose message holds control characters, and shows one line.
const message = redacted?.replace(/[\p{Cc}\u2028\u2029]+/gu, " ").trim();
// By code points, so an emoji is not split; the first cut keeps Array.from off a long git stderr.
const shown = message && Array.from(message.slice(0, MESSAGE_LIMIT * 2)).slice(0, MESSAGE_LIMIT).join("");
if (shown) pairs.push(`msg=${Buffer.from(shown, "utf8").toString("base64")}`);
return `\x1b]7501;${pairs.join(":")}\x1b\\`;
}
/** CI is left out even under a pseudo-terminal (Buildkite, `docker run -t`), whose log would keep the raw sequences. */
export function terminalReportsStatus(stream: { isTTY?: boolean } = process.stderr, environment: NodeJS.ProcessEnv = process.env): boolean {
return stream.isTTY === true && environment.TERM !== "dumb" && !environment.CI;
}
/** Turns reports on for this process when stderr is a terminal; until then `reportStatus` writes nothing. */
export function enableProgramStatus(options: { write?: (text: string) => void } = {}): void {
if (options.write) write = options.write;
else if (terminalReportsStatus()) write = text => { process.stderr.write(text); };
}
export function reportStatus(state: ProgramState, details: { message?: string; kind?: BlockedKind } = {}): void {
last = state;
write?.(programStatusSequence(state, details));
}
/** `done`, or `error` when the command has already set a failing exit code (a review with a failed target). */
export function reportFinished(message?: string): void {
reportStatus(process.exitCode ? "error" : "done", message ? { message } : {});
}
/** The last state reported, so the command's end reports `done` only when nothing more specific came before it. */
export function lastReportedStatus(): ProgramState | undefined {
return last;
}
+6 -2
View File
@@ -1,7 +1,10 @@
import { reportStatus } from "./program-status.js";
/**
* One line per capture step on stderr, so a CI log or a terminal shows what Explore is doing while
* a build or a simulator session runs for minutes. Messages carry plan, route, and EAS identifiers
* only; never setup text, which can hold app-test secrets.
* a build or a simulator session runs for minutes; the same line becomes the terminal's status
* message (see program-status). Messages carry plan, route, and EAS identifiers only; never setup
* text, which can hold app-test secrets.
*/
export type Progress = (message: string) => void;
@@ -12,6 +15,7 @@ export function stderrProgress(options: { now?: () => number; write?: (text: str
const write = options.write ?? (text => { process.stderr.write(text); });
const started = now();
return message => {
reportStatus("working", { message });
const seconds = Math.max(0, Math.floor((now() - started) / 1000));
const elapsed = `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
write(`[explore ${elapsed}] ${message}\n`);
+76
View File
@@ -0,0 +1,76 @@
import assert from "node:assert/strict";
import test from "node:test";
import { enableProgramStatus, lastReportedStatus, programStatusSequence, reportFinished, reportStatus, terminalReportsStatus } from "../../dist/shared/program-status.js";
import { stderrProgress } from "../../dist/shared/progress.js";
const decode = sequence => {
assert.match(sequence, /^\x1b\]7501;.*\x1b\\$/);
return Object.fromEntries(sequence.slice(7, -2).split(":").map(pair => [pair.slice(0, pair.indexOf("=")), pair.slice(pair.indexOf("=") + 1)]));
};
const message = sequence => {
const { msg } = decode(sequence);
return msg === undefined ? undefined : Buffer.from(msg, "base64").toString("utf8");
};
test("a report names the state and the app, and carries its message as base64", () => {
assert.equal(programStatusSequence("done"), "\x1b]7501;state=done:app=expo-explore\x1b\\");
const pairs = decode(programStatusSequence("working", { message: "capturing Home — ✓" }));
assert.equal(pairs.state, "working");
assert.equal(Buffer.from(pairs.msg, "base64").toString("utf8"), "capturing Home — ✓");
});
test("only a blocked report carries its kind", () => {
assert.equal(decode(programStatusSequence("blocked", { kind: "question" })).kind, "question");
assert.equal(decode(programStatusSequence("working", { kind: "question" })).kind, undefined);
});
test("a message becomes one line without control characters, within the spec's size", () => {
const pairs = decode(programStatusSequence("error", { message: "build failed\n\x1b[31mexit 1\x1b[0m\t" }));
assert.equal(Buffer.from(pairs.msg, "base64").toString("utf8"), "build failed [31mexit 1 [0m");
assert.ok(Buffer.from(decode(programStatusSequence("working", { message: "あ".repeat(5000) })).msg, "base64").byteLength <= 2048);
// Cut by code points: an emoji at the limit is kept whole or dropped, never halved.
assert.equal(message(programStatusSequence("working", { message: `${"a".repeat(511)}😀😀` })), `${"a".repeat(511)}😀`);
assert.ok(Buffer.from(decode(programStatusSequence("working", { message: "😀".repeat(5000) })).msg, "base64").byteLength <= 2048);
assert.equal(decode(programStatusSequence("working", { message: " \n " })).msg, undefined);
assert.ok(programStatusSequence("working", { message: "x".repeat(5000) }).length <= 4096);
});
test("a message is redacted as stderr's diagnostics are", () => {
const environment = { EXPO_TOKEN: "expo-secret-value", SIGNING_PRIVATE_KEY: "private-key-value" };
const text = message(programStatusSequence("error", {
message: "git failed: https://user:[email protected]/o/r expo-secret-value private-key-value",
}, environment));
assert.doesNotMatch(text, /ghp_|expo-secret-value|private-key-value/);
assert.match(text, /\[REDACTED\]/);
});
test("only an interactive stderr that is not a dumb terminal or CI gets reports", () => {
assert.equal(terminalReportsStatus({ isTTY: true }, { TERM: "xterm-ghostty" }), true);
assert.equal(terminalReportsStatus({ isTTY: true }, { TERM: "dumb" }), false);
assert.equal(terminalReportsStatus({ isTTY: true }, { TERM: "xterm-256color", CI: "true" }), false);
assert.equal(terminalReportsStatus({ isTTY: false }, {}), false);
assert.equal(terminalReportsStatus({}, {}), false);
});
test("progress lines become the working status once reports are on", () => {
const written = [];
stderrProgress({ write: () => {} })("before");
enableProgramStatus({ write: text => written.push(text) });
stderrProgress({ write: () => {} })("planning routes");
reportStatus("done");
assert.deepEqual(written.map(decode).map(({ state, msg }) => [state, msg && Buffer.from(msg, "base64").toString("utf8")]),
[["working", "planning routes"], ["done", undefined]]);
assert.equal(lastReportedStatus(), "done");
});
test("a finished command reports done, or error once it has set a failing exit code", t => {
const written = [];
enableProgramStatus({ write: text => written.push(text) });
const exitCode = process.exitCode;
t.after(() => { process.exitCode = exitCode; });
process.exitCode = undefined;
reportFinished();
process.exitCode = 1;
reportFinished("No report for ios");
assert.deepEqual(written.map(text => [decode(text).state, message(text)]), [["done", undefined], ["error", "No report for ios"]]);
});
@@ -9,6 +9,9 @@
background: var(--canvas-minimap-background);
box-shadow: var(--shadow-md);
contain: layout paint;
/* iOS WebKit lifts the minimap above freshly composited cards (a screenshot's reveal fade, as a
fast pan mounts them) a frame late, so they flicker over it. Its own layer keeps it on top. */
will-change: transform;
pointer-events: none;
view-transition-name: canvas-minimap;
--canvas-minimap-background: color-mix(in srgb, var(--surface) 94%, transparent);
@@ -316,9 +316,13 @@
.compare-stage.mode-flip .compare-frame-wrap,
.sidebar-review-stage.mode-flip .compare-frame-wrap,
.sidebar-review-stage.mode-split.landscape .compare-frame-wrap { display: flex; justify-content: center; }
/* The width is spelled out, not left to aspect-ratio: WebKit sizes a flex item by its height + aspect-ratio box's
available width rather than its ratio width, so Split's two sides stayed half the stage each and each frame sat at
the left of its side, off centre under its name (seen on a folded iPhone Duo). */
.compare-frame {
position: relative;
display: block;
width: calc(var(--compare-frame-height) * var(--compare-aspect));
height: var(--compare-frame-height);
aspect-ratio: var(--compare-aspect);
overflow: hidden;