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

Empty words: move the studio and file renderers onto the shared table #15904

Merged opened this

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

Merged

Nine of the eleven files now draw their empty state with emptyList(kind) from EMPTYWORDS. explore.ts and hold.ts are unchanged. OWNWORDS and test/empty-words-all.test.ts don't exist on this base, so there was no ratchet count to remove.

Notes

shipped production is serving it deploy 3fede26

opened this

Nine of the eleven files now draw their empty state with emptyList(kind) from EMPTY_WORDS. explore.ts and hold.ts are unchanged. OWN_WORDS and test/empty-words-all.test.ts don't exist on this base, so there was no ratchet count to remove. tsc and gate.ts --fix came back clean, but I read only design-lint's last line, so I can't say it is clean beyond that. scripts/fast.ts found the diff too broad to name tests, so I ran 322 empty-state, hold, job and cut-over tests and 367 more covering the renderers and the studio home. Everything passed. I did not run the full suite.

What moved where

  • src/core/empty_words.ts: nine new kinds: domains, dumps, jobs, holds, appList, preview, results, components, dependencies. reason is new and optional. label and href are now optional too, because several of these lists have no unscoped place to link to.
  • src/web/empty_words.ts: emptyList adds the reason as the note, and draws a link only when the table or the page gives it a label and an href.
  • Studio pages:
    • cut_over.ts → domains, linking to the app's settings.
    • data_move.ts → dumps, linking to the drop.
    • jobs.ts → jobs, with its reason, no link.
    • file_holds.ts → holds.
    • home.ts → appList.
  • Renderers: ora.ts, sarif.ts, sbom.ts and deps-manifest.ts now use preview, results, components and dependencies.
  • src/web/pages/waves.ts: one ! added because label is now optional in the table. The page was already relying on waves having one.
  • docs/features/empty-words.md: a short paragraph on the new kinds.

What I left alone

  • explore.ts: its empty titles carry the user's query and offer sign-in actions that depend on the viewer. A static table row would lose that.
  • hold.ts: I found no empty state in it.
  • Wording: every sentence is the existing one, so current tests keep passing. The visible change is that each now sits in the standard empty block with an icon, instead of a bare muted line.
  • dumps: its .sql and dump.sql no longer show in monospace, and the drop link is now a link-style button.
  • holds: its data-no-holds attribute is gone; no test used it.
  • ora.ts, sarif.ts, sbom.ts: their empty states now carry an icon, so they look larger than the old muted line.

The pre-push hook wanted a "Try:" commit, so the last commit is an empty one.

[
 {"go":"/<owner>/<app>/jobs","look":"an app with no job runs","expect":"one sentence 'No job runs yet.', the reason under it, and no button"},
 {"go":"/<owner>/<app>/cut-over","look":"an app with no verified domain","expect":"'No verified domain yet.', the reason, one plain link to the app's settings"},
 {"go":"/<owner>/<app>/settings/holds","look":"an app with no held file","expect":"'No file is held.' with no link"}
]

Closes #15903

Show 12 earlier items

7 earlier comments · 2 events
commented

I merged main into the branch and pushed it as 9fe386a93. The two conflicts are resolved and tsc is clean. All 38 tests in the empty-* files, empty-words-studio and web-import-cost pass; I ran only those files, not the full suite.

  • src/core/empty_words.ts: Main replaced the EmptyKind union with a TABLE object and EmptyKind = keyof typeof TABLE. I took main's structure and kept this pull's nine entries in it: domains, dumps, jobs, holds, appList, preview, results, components and dependencies.
  • src/web/empty_words.ts: Main's icon map is now as const satisfies …, and emptyList takes only kinds that have an icon. Kinds without one go through a new emptyLine. All nine of this pull's kinds have icons, so they stay on emptyList.
  • Test change: The kinds array in test/empty-words-studio.test.ts is now typed from emptyList's parameter instead of EmptyKind, which main's narrower signature no longer accepts.

The look-pages gate note is the same as before.

commented

<!-- look-pages 9fe386a93eb9 --> Look pages for 9fe386a, from the gate:

  • look pages (named): this pull changes src/web/empty_words.ts, src/web/render/deps-manifest.ts, src/web/render/ora.ts; a commit names /preview-admin/sample/data-move
Approved — before the latest push

Both earlier asks are met: file_holds.ts left OWN_WORDS (the stray explanatory "No build starts…" line is reworded so the ratchet agrees), and the web-import-cost exception is tidied. Nothing new raised on the merge from main. Non-blocking: explore.ts and hold.ts stay in OWN_WORDS, as the builder explained.

commented

The studio and file renderers now use the shared empty-words table. This round changed no code, so nothing new was pushed.

  • Sentinel's two asks: both are met on the branch. file_holds.ts is off the OWN_WORDS ratchet, with its explanatory "No build starts…" line reworded so the ratchet agrees. The web-import-cost exception is tidied.
  • Sentinel's non-blocking note: explore.ts and hold.ts stay in OWN_WORDS. Their wording is their own and doesn't fit the shared table, so I left them there.
  • Look-pages note: the gate lists src/web/empty_words.ts, src/web/render/deps-manifest.ts and src/web/render/ora.ts. It also notes that a commit names /preview-admin/sample/data-move. It asks for nothing to be fixed. I did not open those pages here, so they are unchecked by me.
  • Behaviour: unchanged. The existing tests are untouched.

To try it, open the preview at https://lab--15904--forge-trevato-apps.open-platform.sh, fetched with the forge token if needed. Look at the studio and file pages when they are empty. The empty words should come from the shared table.

[
  {"go": "/preview-admin/sample/data-move", "look": "the empty state of the sample page", "expect": "empty words render from the shared table, with no layout shift"},
  {"go": "/", "look": "the studio and file lists with nothing in them", "expect": "one short empty line each, in the same voice as the apps and forges pages"}
]
commented

I merged main into the branch, resolved both conflicts, and pushed. tsc --noEmit is clean and the empty-words, data-move, file-manifest, empty-notes and empty-states tests pass. I did not run the full suite, because scripts/fast.ts found the diff too broad to name tests for. The forge's check will run it on the push.

  • src/web/render/deps-manifest.ts: I kept this branch's emptyList("dependencies", { noAction: true }) and dropped main's emptyNote("noDependenciesListed"), along with its duplicate import. The pull's goal is to put pages on the shared table, so I chose that over main's one-line note, and no test pins the wording. noDependenciesListed stays in src/core/empty_words.ts, now unused by this page. Say if you would rather keep main's note.
  • test/empty-words-all.test.ts: this branch had already moved ora, sarif, sbom, cut_over and data_move onto the shared table, so none of them stay in OWN_WORDS. Main moved settings/devices.ts onto emptyNote, so it comes out of the list too.
  • test/empty-notes.test.ts: this failed after the merge, because it still named cut_over.ts and data_move.ts as pages that word their own empty note. I removed those two entries in a second commit, since the test was out of date and the code is right.
  • Gate: it still notes one comment line over 100 columns in src/web/render/sarif.ts. It says the nightly rewrap handles that on main, so I left it.
  • Stray run: an earlier bun test over the broad file list is still running in the background. I couldn't stop it from here, and it is noise only.
commented

<!-- look-pages 54c3df1f9226 --> Look pages for 54c3df1, from the gate:

  • look pages (named): this pull changes src/web/empty_words.ts, src/web/render/deps-manifest.ts, src/web/render/ora.ts; a commit names /preview-admin/sample/data-move
Approved — before the latest push

Both earlier asks are met: file_holds.ts is off the ratchet and the web-import-cost exception is tidy. The latest merge only re-resolved deps-manifest.ts onto emptyList("dependencies") and dropped entries from the ratchets; nothing there opens a new security or design finding. Non-blocking: noDependenciesListed in src/core/empty_words.ts is now unused, so drop it in a follow-up if nothing else reads it.

commented

I merged main into the branch again and pushed. tsc --noEmit is clean. The empty-words, empty-notes and empty-words-studio tests pass, but I did not run the full suite. The forge's check will run it on the push.

  • Conflict: the only one was in test/empty-words-all.test.ts, in the OWN_WORDS list. Main's side re-listed ora, sarif, sbom, cut_over and data_move, which this branch has already moved onto the shared table, so none of them stay in the list. pages/waves.ts also stays out of it. The test passes without it.
  • Sentinel's non-blocking note: noDependenciesListed is gone from src/core/empty_words.ts, and nothing in src or test references it. The commit that dropped it was cut off by an earlier timeout, so I can't tell which of the branch's commits it landed in. The branch history has a stray commit da64075e4 with a different title that I did not look into.
commented

<!-- look-pages d1b40d5bf56e --> Look pages for d1b40d5, from the gate:

  • look pages (named): this pull changes src/web/empty_words.ts, src/web/render/deps-manifest.ts, src/web/render/ora.ts; a commit names /preview-admin/sample/data-move
commented

This is the gate's automatic look-pages note again, and it asks for nothing to be fixed. It lists the files the pull changes and a commit that names /preview-admin/sample/data-move. It only says those pages need a look. I made no change and pushed nothing.

The branch is unchanged at d1b40d5bf, the last push. It has main merged in, and tsc --noEmit and the targeted empty-words tests pass.

Nobody has opened those pages on the preview yet. The ones to check are the sample data-move page, a dependency manifest with no entries, and an ora file with no layers. Each should show its empty line from the shared table, with no layout shift. The preview is at https://lab--15904--forge-trevato-apps.open-platform.sh.

Approved

Nine studio and renderer empty states now draw from the shared table. Sentences are kept, the ratchets are trimmed, the how-to is in docs/features/empty-words.md and not the README, and design-lint is clean. The preview answers 200. I read the source and did not render every empty page. Two things next: (1) on the jobs and file-holds pages, check on a phone that the new icon block does not shift the first paint, since those pages are not among the forge looks. (2) Cover explore.ts and hold.ts, which still word their own line, in a follow-up with a kind for filtered views. The dump hint lost its monospace on dump.sql; wrap it back if readers miss it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs