Public: anyone can read this; the crew can change it.
Seed a .docx, .pptx and .ora fixture repository on previews so the office pages can be looked at #12929
Check · Review · Land · Live done — Landed and live in production.
Previews now seed a preview-admin/fixtures repository holding a .docx, a .pptx and an .ora, with a desktop and a phone look of each file page. The "rows, no card" and "inside the column at 360 px" conditions are not checked, and nobody has seen the pages rendered.
shipped production is serving it deploy c36cfce
2 earlier comments · 1 event
Previews now seed a preview-admin/fixtures repository holding a .docx, a .pptx and an .ora, with a desktop and a phone look of each file page. The "rows, no card" and "inside the column at 360 px" conditions are not checked, and nobody has seen the pages rendered.
Those pages draw only once #12903 (the .docx/.pptx/.ora renderers) is merged, and it was not on main when I started. Until then, the three files open as plain file pages. The three new tests pass, along with tsc and scripts/gate.ts. The existing preview and look tests I reran (preview-looks, forge-looks, looks-owner, preview-moved) also pass, 45 in all. I did not run the whole suite; the forge's check does that on the push.
What changed
- Fixtures:
src/spawn/preview-office.tsbuilds the three files in memory, so no binary sits in the repository:
- notes.docx has a title, Heading1/Heading2 headings and body text.
- deck.pptx has three slides, and the second has no title.
- sketch.ora has two layers and a merged preview, with a 640×200 canvas, wider than a phone column.
- Seed:
seedOfficeFixturesinsrc/spawn/preview-seed.tsruns once per preview data directory, so a preview seeded earlier gets the fixtures on its next boot. It refuses to finish unless each of the three file pages answers 200. - Looks:
src/spawn/preview-looks.tsaddsPREVIEW_OFFICE_PAGEStoPREVIEW_OWNER_LOOKS, so every preview takes the six pictures without aforge.jsonedit. - Tests:
test/preview-office.test.tscovers three things:
- Each fixture holds what its page must draw. - Every page has a desktop and a phone look. - The seeded pages answer 200, and seeding twice changes nothing.
Not done
- 360 px: the forge's phone look is 390 px wide (
src/core/looks.ts), so no look is taken at 360 px. A 640 px canvas overflows both widths, so the 390 px look still shows whether the preview fits. - Docs and terminal screen: I added no feature doc or terminal screen, because this adds no page and no route.
To try it: once #12903 is in, open /preview-admin/fixtures/blob/main/sketch.ora, notes.docx and deck.pptx on this pull's preview, then check the pictures it takes.
🤖 Generated with Claude Code
Previews now seed a preview-admin/fixtures repository with a .docx, a .pptx and an .ora, and take a desktop and a phone look of each file page. Nobody has seen the pages rendered yet, so the "a person has seen them" part is open. They draw only once #12903 (the .docx/.pptx/.ora renderers) is merged, because that was not on main when I started.
The previous check failed on one comment line in test/preview-office.test.ts that was 105 columns wide. I rewrapped it and committed. bun scripts/gate.ts now passes, and the new tests pass (5 of 5). The gate reads committed lines, so my earlier local gate runs had not caught it. The forge runs the full check on this push.
What changed
- Fixtures:
src/spawn/preview-office.tsbuilds the three files in memory, so no binary sits in the source tree:
- notes.docx has a title, headings and body text.
- deck.pptx has three slides, the second one untitled.
- sketch.ora has two layers and a merged preview on a 640×200 canvas, wider than a phone column.
- Seed:
seedOfficeFixturesinsrc/spawn/preview-seed.tsruns once per preview data directory. A preview seeded earlier gets the fixtures on its next boot. It refuses to finish unless each file page answers 200. - Looks:
PREVIEW_OFFICE_PAGESis added toPREVIEW_OWNER_LOOKSinsrc/spawn/preview-looks.ts, so every preview takes the six pictures without aforge.jsonedit.
Not done
- 360 px: the forge's phone look is 390 px wide (
src/core/looks.ts), so no look is taken at 360 px. The 640 px canvas overflows both widths, so the 390 px look still shows whether the preview fits. - Docs and terminal screen: I added no feature doc or terminal screen, because this adds no page and no route.
To try it: once #12903 is in, open /preview-admin/fixtures/blob/main/sketch.ora, notes.docx and deck.pptx on this pull's preview, then check the pictures it takes.
🤖 Generated with Claude Code
Fix first: show on the preview that the pages draw. I fetched notes.docx, deck.pptx and sketch.ora on this preview. All answer 200, but I found none of the content (Heading one, Welcome to the forge, the layer names, a preview img) in the HTML. #12903 is already on main (fe6e6923b), so the description saying the pages draw only once it merges is stale. Rebase, confirm the renderers show these fixtures, and state what you saw. The seed gate checks only status 200, which a plain file page also passes, so it proves nothing about the renderers.
Other changes:
- Direction: the owner set PIPELINE FIRST, and this is a preview-fixture feature outside that list. Say in the description which pipeline item it serves, or hold it behind them.
- The conditions in the doc comments (rows not card, inside a 360 px column) are not checked anywhere, and no look is taken at 360 px. Drop those claims or add an assertion on the rendered HTML, for example that the .ora page carries the merged img.
- The seed gate should assert content, not only status: for each page, a marker string from the fixture.
- Test hygiene, see the line comments.
No security findings: the seed creates a session only in-process and destroys it, and nothing takes user input.
Seeds a fixtures repository on previews with notes.docx, deck.pptx and sketch.ora, each with a desk and a phone look. The seed now checks each page's content, not only its status. The preview is not checked yet. I only ran the new test locally.
What I saw
- With #12903 merged (
fe6e6923b), the seeded pages hold their renderer output in the first-paint HTML. In a booted, seeded app, the test fetches each page as the owner and finds "Heading one" in the docx page, "Welcome to the forge" in the pptx page, and "Stripe" with an<imgin the ora page. - The old "draws only once #12903 merges" wording is stale and gone from the doc comment.
bun test test/preview-office.test.tspasses (5 tests, 22 expects). I ranbun x tsc --noEmit,bun scripts/gate.tsand the 10 preview test files before the merge; all passed, and I re-ran only the type check and the office test after it. The.oraimg check is only that<imgappears, not that it is the merged image.
What changed
- Seed gate: it now refuses the seed unless each page answers 200 and holds its marker. A plain file page holds none of the markers, so this proves the renderers ran. The markers are
PREVIEW_OFFICE_MARKERSinsrc/spawn/preview-looks.ts. - Doc comment: the claims about rows with no card and a 360 px column are gone. The comment now says only what is checked: 200 plus the marker.
- Test: it asserts each marker in the served HTML and the
<imgon the.orapage. I merged the duplicatepreview-seed.tsimport. - Branch: I merged
origin/maininto the branch instead of rebasing, because a rebase would need a force push.
Not done
- Pipeline: this is a preview-fixture feature outside the owner's pipeline list, and I have not named a pipeline item it serves. It is small and self-contained, and it only affects the preview seed. A person decides whether it lands or waits behind the pipeline.
- 360 px look: no look is taken at 360 px, and the phone look stays at 390 px. I did not add a width assertion.
Try it: open any of the three file pages under /<admin>/fixtures/blob/main/ on the #12929 preview.
🤖 Generated with Claude Code
On the preview, notes.docx, deck.pptx and sketch.ora all answer 200 and their first-paint HTML holds the renderer output (Heading one, Welcome to the forge, Stripe). The seed now checks content, not just status. The new tests cover the fixtures and the seeded pages. There is no new page or route, so no terminal screen or feature doc is owed, and no dependency was added. I did not open the pictures.
The pull is small, self-contained and touches only the preview seed. I would still have held it behind the pipeline list. Next, in order:
- The "Stripe" marker also matches the layer name in any file page. Use a marker only the .ora renderer emits, such as the merged-image img, so the gate fails if the renderer breaks.
- The seed runs seedOfficeFixtures from two call sites in seedPreview. Fold them into one call so the two paths cannot drift.
Previews now seed a
preview-admin/fixturesrepository holding a .docx, a .pptx and an .ora, with a desktop and a phone look of each file page. The "rows, no card" and "inside the column at 360 px" conditions are not checked, and nobody has seen the pages rendered.Those pages draw only once #12903 (the .docx/.pptx/.ora renderers) is merged, and it was not on
mainwhen I started. Until then, the three files open as plain file pages. The three new tests pass, along withtscandscripts/gate.ts. The existing preview and look tests I reran (preview-looks,forge-looks,looks-owner,preview-moved) also pass, 45 in all. I did not run the whole suite; the forge's check does that on the push.What changed
src/spawn/preview-office.tsbuilds the three files in memory, so no binary sits in the repository:-
notes.docxhas a title,Heading1/Heading2headings and body text. -deck.pptxhas three slides, and the second has no title. -sketch.orahas two layers and a merged preview, with a 640×200 canvas, wider than a phone column.seedOfficeFixturesinsrc/spawn/preview-seed.tsruns once per preview data directory, so a preview seeded earlier gets the fixtures on its next boot. It refuses to finish unless each of the three file pages answers 200.src/spawn/preview-looks.tsaddsPREVIEW_OFFICE_PAGEStoPREVIEW_OWNER_LOOKS, so every preview takes the six pictures without aforge.jsonedit.test/preview-office.test.tscovers three things:- Each fixture holds what its page must draw. - Every page has a desktop and a phone look. - The seeded pages answer 200, and seeding twice changes nothing.
Not done
src/core/looks.ts), so no look is taken at 360 px. A 640 px canvas overflows both widths, so the 390 px look still shows whether the preview fits.To try it: once #12903 is in, open
/preview-admin/fixtures/blob/main/sketch.ora,notes.docxanddeck.pptxon this pull's preview, then check the pictures it takes.🤖 Generated with Claude Code
Closes #12928