Public: anyone can read this; the crew can change it.

A visual test pins Talk's layout at 360, 1280 and 2560 px #16531

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

I added test/talk.looks.test.ts, which opens /talk at 360, 1280 and 2560 px. I could not check its measurements here: no Chromium starts in this sandbox, so all three cases skip. Seeding ran without error and tsc and gate.ts --fix came back clean, but the first real run will be on the forge.

Notes

shipped production is serving it deploy d5add18

opened this

I added test/talk.looks.test.ts, which opens /talk at 360, 1280 and 2560 px. I could not check its measurements here: no Chromium starts in this sandbox, so all three cases skip. Seeding ran without error and tsc and gate.ts --fix came back clean, but the first real run will be on the forge.

What it checks: it seeds one conversation with a 300-character code block, a 180-character link and a message carrying a long-named text attachment. At each width it fails if:

  • the page scrolls sideways;
  • the attachment pokes past the viewport;
  • the composer sits outside the viewport;
  • the thread is wider than the lesser of the viewport and its 46 rem (736 px) cap.

It also asserts that the code block, link and attachment are on the page, so it can't pass on an empty thread.

Skipping: with no Chromium it prints SKIPPING: no chromium that starts on this machine…, the same way signed-out-home.looks.test.ts does.

What I reused: evaluateLoaded and chromiumRuns from test/helpers/chrome.ts. The seeding follows test/talk-layout.test.ts, which already covers the code block, link, tablet and empty-visit cases but has no attachment and isn't in the looks lane.

File name differs from the issue: the issue says test/talk-looks.test.ts "added to the gate list". I named it .looks.test.ts because scripts/gate.ts (isLooksFile) routes that suffix to the looks lane automatically, so there is no gate list to add it to.

Left undone: I did not tick the boxes on #15734. I have no tool here to edit that issue's body, so a person needs to tick them and link the pulls that met each.

Try it: bun test test/talk.looks.test.ts on a machine with Chromium.

Closes #15817

1 earlier comment · 1 event
commented

I added test/talk.looks.test.ts, which opens /talk at 360, 1280 and 2560 px. I could not check its measurements here: no Chromium starts in this sandbox, so all three cases skip. Seeding ran without error and tsc and gate.ts --fix came back clean, but the first real run will be on the forge.

What it checks: it seeds one conversation with a 300-character code block, a 180-character link and a message carrying a long-named text attachment. At each width it fails if:

  • the page scrolls sideways;
  • the attachment pokes past the viewport;
  • the composer sits outside the viewport;
  • the thread is wider than the lesser of the viewport and its 46 rem (736 px) cap.

It also asserts that the code block, link and attachment are on the page, so it can't pass on an empty thread.

Skipping: with no Chromium it prints SKIPPING: no chromium that starts on this machine…, the same way signed-out-home.looks.test.ts does.

What I reused: evaluateLoaded and chromiumRuns from test/helpers/chrome.ts. The seeding follows test/talk-layout.test.ts, which already covers the code block, link, tablet and empty-visit cases but has no attachment and isn't in the looks lane.

File name differs from the issue: the issue says test/talk-looks.test.ts "added to the gate list". I named it .looks.test.ts because scripts/gate.ts (isLooksFile) routes that suffix to the looks lane automatically, so there is no gate list to add it to.

Left undone: I did not tick the boxes on #15734. I have no tool here to edit that issue's body, so a person needs to tick them and link the pulls that met each.

Try it: bun test test/talk.looks.test.ts on a machine with Chromium.

Approved

Test-only change; no security surface (loopback server, temp data dir, seeded user, no secrets). Selectors (.talk-log, .talk-compose, .talk-files a, .talk-body pre/a) and the 46rem cap match src/web/pages/talk.ts and talk_client.ts; the cookie and helpers match talk-layout.test.ts. It asserts the seeded content is present so it cannot pass on an empty page, and it skips with a stated reason when no Chromium starts. Gate routes the .looks.test.ts suffix to the looks lane. Caveat: the cases skip in this sandbox, so the first real measurement is the forge's check. Box 3 (ticking #15734) is not done by this diff.

commented

Left #15817 open: 1 unticked item remain (#15734's boxes are ticked on it with the pulls that met each.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs