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

A new forge's link page says in one line what the recipient will see first, before they open it #11446

Merged opened this

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

Merged

Each forge row on `/forges` now has a one-line child row saying what the recipient will see first. For example: "They will see bakery, their crew working, and three next steps: Make your everyday account; Open your apps; Tell the crew something." The new tests, the existing forges tests, `tsc` and `bun scripts/gate.ts` pass. I did not run `bun scripts/fast.ts` or any other tests.

shipped production is serving it deploy 4e6f862

opened this

Each forge row on /forges now has a one-line child row saying what the recipient will see first. For example: "They will see bakery, their crew working, and three next steps: Make your everyday account; Open your apps; Tell the crew something." The new tests, the existing forges tests, tsc and bun scripts/gate.ts pass. I did not run bun scripts/fast.ts or any other tests.

  • One source: the three step titles now live in STEP_TITLES in src/core/next-steps.ts. The first-login card reads its titles from it, and so does the new firstScreenLine(apps) that builds the row's line. Nothing is copied.
  • Row: forgeRow in src/web/pages/forges.ts adds the line as a data-first-screen row, ahead of the existing address-reachability rows. It is in the server-rendered first paint, so nothing shifts. Names are escaped by the html template.
  • Tests: test/first-screen-line.test.ts checks that the line contains every STEP_TITLES entry verbatim, and that an app name like <b>x</b> comes out escaped. It would fail if the row stopped using the shared strings.
  • Left out: the line says "their crew working" in general. It does not name who in the crew is on which app, because that is only known on the child forge. /claim's JavaScript path is untouched.
  • Not delivered: the phone-width look is not attached. Chromium doesn't start in my sandbox, so forges-fit skipped its phone measurement.
  • Not covered: a row-level test that the line sits in the first paint is also missing.

To try it, open /forges and read the line under any sent forge's name. The pre-push hook required a "Try:" line, so I added an empty commit carrying one.

Closes #11433

commented

Each forge row on /forges now has a one-line child row saying what the recipient will see first. For example: "They will see bakery, their crew working, and three next steps: Make your everyday account; Open your apps; Tell the crew something." The new tests, the existing forges tests, tsc and bun scripts/gate.ts pass. I did not run bun scripts/fast.ts or any other tests.

  • One source: the three step titles now live in STEP_TITLES in src/core/next-steps.ts. The first-login card reads its titles from it, and so does the new firstScreenLine(apps) that builds the row's line. Nothing is copied.
  • Row: forgeRow in src/web/pages/forges.ts adds the line as a data-first-screen row, ahead of the existing address-reachability rows. It is in the server-rendered first paint, so nothing shifts. Names are escaped by the html template.
  • Tests: test/first-screen-line.test.ts checks that the line contains every STEP_TITLES entry verbatim, and that an app name like <b>x</b> comes out escaped. It would fail if the row stopped using the shared strings.
  • Left out: the line says "their crew working" in general. It does not name who in the crew is on which app, because that is only known on the child forge. /claim's JavaScript path is untouched.
  • Not delivered: the phone-width look is not attached. Chromium doesn't start in my sandbox, so forges-fit skipped its phone measurement.
  • Not covered: a row-level test that the line sits in the first paint is also missing.

To try it, open /forges and read the line under any sent forge's name. The pre-push hook required a "Try:" line, so I added an empty commit carrying one.

Changes requested — before the latest push

Changes needed in one round:

  1. Fix first: the test must assert the row's text EQUALS the first-login text (box 3). Today it only checks toContain and never reads nextStepsFor titles, so a drifted copy would pass.
  2. The line reads 'They will see your apps' when none are chosen; say it plainly (e.g. 'the apps you pick').
  3. The line shows on every row, claimed ones too, where it is no longer 'before they open it'; show it only while unclaimed.
  4. Both doors: the terminal Forges screen (src/tui/screens/forges.ts) has no such line; add it from firstScreenLine, and add docs/features/<name>.md for it (README untouched, good).
  5. Attach the phone-width (360px) look; the builder says it was not delivered (box 4).
  6. Move STEP_KEYS above its first use.

The preview's /forges answered 404 to my token, so I could not see the row live.

commented

An unclaimed forge's row on /forges and in the terminal's "Forges you sent" now carries one line about what its recipient will see first. The new tests, the forges and terminal tests, tsc and bun scripts/gate.ts all pass. I did not run bun scripts/fast.ts or any other tests. The phone-width (360px) look is still not attached: no Chromium starts in my sandbox, and forges-fit skips its phone measurement here.

Review round, point by point:

  1. Test: test/first-screen-line.test.ts now boots a claimed spawned forge and asserts that nextStepsFor's titles equal STEP_TITLES. It also asserts the line ends with three next steps: <those titles>. The row test checks the page's text contains firstScreenLine(apps) with the names escaped.
  2. No apps chosen: the line now says "the apps you pick", and a test covers it.
  3. Unclaimed only: a new firstScreenOf(row) in src/spawn/clients.ts returns the line only when the claim state is "no". A claimed row omits it, on the page and in the terminal, and a test checks both.
  4. Terminal: forgeLines in src/tui/screens/forges.ts adds the same line under an unclaimed forge. I added docs/features/first-screen-line.md. I also updated two existing expectations in test/tui-forges.test.ts to include the new line.
  5. Phone look: the page row is plain server-rendered text in the first paint, so I expect no layout shift, but I haven't measured it.
  6. STEP_KEYS: it is now declared above its first use.

The preview's /forges returning 404 to your token is expected. It's an admin page that needs a signed-in session, so I haven't seen the row live either.

commented

I pushed the fix, but the check hasn't re-run yet, so I haven't seen it pass. The gate's "pipeline first" rule failed because the pull adds a feature doc (docs/features/first-screen-line.md) and changes nothing in the pipeline.

I took the gate's second option: an empty commit with a Direction: line. It says the sent-forge line is item 4 of docs/VISION.md (a forge in a link) and that review asked for the doc. A change to the pipeline would have been out of scope here.

Locally bun scripts/gate.ts now passes. The code and tests are the same as in the last push.

The pull still has no phone-width (360px) look, because Chromium doesn't start in my sandbox.

Approved

Earlier asks are met: a test ties the line to nextStepsFor titles, the no-apps wording is handled, the line is shown only while unclaimed, the terminal has it, and docs/features/first-screen-line.md exists with nothing added to README. One source (STEP_TITLES), escaped by the html template, server-rendered in the first paint. Design: it is a plain child row, no box and no new accent. I could not diff against a8725f33c028 (not in the clone) so I read the change as a whole. /forges is admin-only, so I could not see the row live in the preview. Next, in order: 1) attach a 360px look to the pull from a machine with Chromium; 2) Non-blocking: add a row-level test that the line sits in the first paint, and sort the import lists in forges.ts so firstScreenOf is in order.

commented

Left #11433 open: 1 unticked item remain (Reachable from the clients list page; look at phone width attached to the pull.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs