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

One press on the home page opens a pack: what it brings and the one command that deploys it #9604

Merged opened this

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

Merged

The public home page now has one press per pack (Games, Business). Each press opens `/packs/:name`, where the deploy command is. I didn't write the plan on the issue with `keep_plan`, because I don't have that tool here.

shipped production is serving it deploy 7ab3f87

opened this

The public home page now has one press per pack (Games, Business). Each press opens /packs/:name, where the deploy command is. I didn't write the plan on the issue with keep_plan, because I don't have that tool here.

The new test, tsc, bun scripts/gate.ts and bun scripts/design-lint.ts pass, as do 276 tests across the packs, home, door and front test files. I didn't run the full suite; scripts/fast.ts found the diff too broad to name tests, so I picked those files myself. I haven't opened the home page in a browser, so the layout-shift risk is only covered by the design lint and tests, not looked at.

  • Home page (src/web/studio/home.ts): the "Coming" line under "Get your own forge" is replaced by packPresses(), built from the pack catalog. Each press names the pack, its description, its app and crew counts, and a "See what it brings" link. They are server-rendered in the existing door section, with no script. They sit side by side from 720px.
  • Slot for "host it for me": each press has an empty data-slot="host" in .door-press-actions, hidden while empty. There is no dead button.
  • Pack page (src/web/pages/packs.ts): the deploy commands are now one block, #pack-command, in which one click selects everything. A copy button sits beside it.
  • Copy without script: a button can't copy without script. With script it copies the block. Without script, the one-click select-all is what works, and the page says so beside the button.
  • Style and docs: new classes .door-press-row, .door-press, .door-press-actions and .pack-command are in src/web/style/content.ts and named in docs/design/areas/front.md. .door-packs there now reads "ready-made forges", not "coming".
  • Test (test/packs.test.ts): fetches /, checks both presses and the host slot, then follows each pack link and finds the scripts/pack.ts deploy <name> command and #pack-command.

I added no "host it for me" action and no new dependencies.

To try it, run the app, open /, and press "See what it brings" under Games or Business.

Closes #9572

commented

The public home page now has one press per pack (Games, Business). Each press opens /packs/:name, where the deploy command is. I didn't write the plan on the issue with keep_plan, because I don't have that tool here.

The new test, tsc, bun scripts/gate.ts and bun scripts/design-lint.ts pass, as do 276 tests across the packs, home, door and front test files. I didn't run the full suite; scripts/fast.ts found the diff too broad to name tests, so I picked those files myself. I haven't opened the home page in a browser, so the layout-shift risk is only covered by the design lint and tests, not looked at.

  • Home page (src/web/studio/home.ts): the "Coming" line under "Get your own forge" is replaced by packPresses(), built from the pack catalog. Each press names the pack, its description, its app and crew counts, and a "See what it brings" link. They are server-rendered in the existing door section, with no script. They sit side by side from 720px.
  • Slot for "host it for me": each press has an empty data-slot="host" in .door-press-actions, hidden while empty. There is no dead button.
  • Pack page (src/web/pages/packs.ts): the deploy commands are now one block, #pack-command, in which one click selects everything. A copy button sits beside it.
  • Copy without script: a button can't copy without script. With script it copies the block. Without script, the one-click select-all is what works, and the page says so beside the button.
  • Style and docs: new classes .door-press-row, .door-press, .door-press-actions and .pack-command are in src/web/style/content.ts and named in docs/design/areas/front.md. .door-packs there now reads "ready-made forges", not "coming".
  • Test (test/packs.test.ts): fetches /, checks both presses and the host slot, then follows each pack link and finds the scripts/pack.ts deploy <name> command and #pack-command.

I added no "host it for me" action and no new dependencies.

To try it, run the app, open /, and press "See what it brings" under Games or Business.

commented

The check failed because no commit message had a Try: line. I added an empty commit that has one and pushed it. The code is unchanged. bun scripts/gate.ts passes locally and prints nothing. I haven't seen the forge's re-run yet.

The line reads: "Try: open / on the preview, press Games or Business under "Get your own forge", and find the deploy command on /packs/<name>".

Changes requested — before the latest push

The home presses work and the slot is clean, but the pack page misses box 2 and departs from the design system.

  1. Box 2: the copy button does nothing without script. It is a visible type=button with only a data-copy hook, so with JavaScript off it is a dead control, and the page admits it in a hint. Make the copy work without script, or do not show a button that cannot. At minimum, hide it when script is off and let the select-all block carry the no-script case.
  2. DESIGN: src/web/ui.ts already has copyField for a string people copy (a command, with a copy button), and the pack page hand-rolls a <pre> plus iconBtn instead. Use the named component, or extend it once if a multi-line command needs it, rather than adding .pack-command and a new bespoke pattern.
  3. Both doors: a pack has a terminal screen (src/tui/screens/packs.ts), but the pull does not show that the terminal reaches the same command. Confirm it shows the deploy command, and add a test if it does not. docs/features/packs.md is not updated to describe the home presses and the copy block.
  4. Test: it only checks that strings exist. Nothing would fail if the copy button were dead, and nothing checks that the press is a link (<a>) inside the pack row. Assert the press anchor and the copy control's target id. The test should also fail if the slot is removed from the markup.
  5. Not verified: the author did not look at the page in a browser. Check the 360px layout of the <pre>: it scrolls sideways, so confirm there is no page-level overflow.
commented

I've addressed all five points and pushed. I still haven't looked at the 360px layout.

  1. Dead copy button. The pack page's command is now a copyField. Its copy button carries js-only, so it is only on the page when script runs. Without script you get a read-only text area to select. The no-script hint is gone. This applies to every copyField caller: the copy button in each is now hidden without script. That is the shell's own rule for controls that need script.
  2. Design. I extended copyField once with an optional lines for multi-line commands, which renders a read-only <textarea wrap="off">. I deleted the hand-rolled <pre>, .pack-command and its entry in front.md.
  3. Terminal. packLines in src/tui/screens/packs.ts already prints deployCommands. test/packs-hands.test.ts already asserts scripts/pack.ts deploy games in it, so I added no test. docs/features/packs.md now describes the home presses, the empty host slot and the copy block.
  4. Test. It now parses / and /packs/:name with happy-dom. It checks that:

- There are two .door-press elements, each with h3 > a[href="/packs/<name>"] and a link in .door-press-actions. - .door-press-actions > [data-slot="host"] exists and has no children, so removing the slot fails the test. - #pack-command holds the deploy command. - [data-copy="pack-command"] exists and is js-only.

  1. 360px layout. The sandbox has no browser, so I couldn't check it. The textarea takes the field's width, with wrap="off", so the long line should scroll inside the field and not widen the page. Please check it on the preview.

bun scripts/gate.ts, tsc and design-lint pass. The packs, door, front, web and copyField-using tests pass (171 in the last run). One axe test, test/axe.test.ts, "in a real browser: an unlabelled input yields one axe:label finding…", fails here, and it fails the same way with my changes stashed.

Approved

Earlier asks are met. The dead copy button is now js-only, so without script the page shows only the read-only text area. The hand-rolled markup is gone: copyField gained one optional lines. The test parses both pages and asserts the empty host slot, #pack-command and the js-only copy button. docs/features/packs.md carries the how-to and README is untouched. The preview serves the textarea with the full command and the home page has the presses. The terminal already prints deployCommands.

Next, two things:

  1. Non-blocking: look at 360px on a real phone. The textarea uses wrap=off, so it should scroll inside the field, but nobody has looked.
  2. Non-blocking: copyField is shared, so every caller now hides its copy button without script. That is correct, but check the other callers once.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs