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

Home's Terminal block is a plain heading and the ssh command, not a boxed card #10012

Merged opened this

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

Merged

Home's Terminal block is now a plain section: an `<h2>Terminal</h2>`, the `sshCommand` text printed verbatim with the host-key line, and the SSH keys link. It is no longer wrapped in `card(...)`. With the terminal off it still renders nothing.

shipped production is serving it deploy aa46b8b

opened this

Home's Terminal block is now a plain section: an <h2>Terminal</h2>, the sshCommand text printed verbatim with the host-key line, and the SSH keys link. It is no longer wrapped in card(...). With the terminal off it still renders nothing.

I checked bun x tsc --noEmit, bun scripts/design-lint.ts and the new test plus test/ssh-site.test.ts; all passed, and the new test fails with the old card code. I ran only those two test files, not the whole suite.

  • Change: terminalCard in src/web/pages/site.ts now returns <section class="settings-block" id="terminal">, the same shape as the everyday-account block from #10002. I dropped the unused card import.
  • Test: test/home-terminal-block.test.ts signs in as admin and fetches /feed. With the terminal on, it asserts the Terminal heading, the exact sshCommand(app) output and the /settings/keys link, and that class="card is absent from that section. With the terminal off, it asserts there is no Terminal heading.
  • Left alone: terminalCard is only rendered by the signed-in feed at /feed. The / page shows the lean or KPI home and never had a Terminal block, so I didn't add one there.

To try it, boot with an SSH port set and open /feed signed in.

Closes #10005

commented

Home's Terminal block is now a plain section: an <h2>Terminal</h2>, the sshCommand text printed verbatim with the host-key line, and the SSH keys link. It is no longer wrapped in card(...). With the terminal off it still renders nothing.

I checked bun x tsc --noEmit, bun scripts/design-lint.ts and the new test plus test/ssh-site.test.ts; all passed, and the new test fails with the old card code. I ran only those two test files, not the whole suite.

  • Change: terminalCard in src/web/pages/site.ts now returns <section class="settings-block" id="terminal">, the same shape as the everyday-account block from #10002. I dropped the unused card import.
  • Test: test/home-terminal-block.test.ts signs in as admin and fetches /feed. With the terminal on, it asserts the Terminal heading, the exact sshCommand(app) output and the /settings/keys link, and that class="card is absent from that section. With the terminal off, it asserts there is no Terminal heading.
  • Left alone: terminalCard is only rendered by the signed-in feed at /feed. The / page shows the lean or KPI home and never had a Terminal block, so I didn't add one there.

To try it, boot with an SSH port set and open /feed signed in.

commented

The gate failed because no commit message had a Try: line. I pushed an empty follow-up commit that has one, and I didn't rewrite history. bun scripts/gate.ts printed nothing locally, which I'm reading as a pass. I haven't seen the forge's check result for the new push yet.

The Terminal block on the signed-in home is now a plain section: an <h2>Terminal</h2>, the exact ssh command with the host-key line, and the SSH keys link. It no longer sits in a card, and it still renders nothing when the terminal is off.

  • Where it shows: the block is only on /feed, the signed-in home. / shows the lean or KPI home and never had one, and I didn't add one there.
  • Test: test/home-terminal-block.test.ts covers the terminal on and off, and it fails on the old card code.
  • Checks: tsc and design-lint were clean, and the new test and test/ssh-site.test.ts passed. I didn't run the rest of the suite.

To try it: sign in on the preview and open /feed. The Terminal block in the side column is a heading and the ssh command, with no card around it.

Approved

Clean, small, on-pattern. terminalCard now renders a settings-block section with h2 Terminal, the verbatim ssh command (terminalCommand) and the SSH keys link, and nothing when the terminal is off. No card, no new class, no new accent, link stays an <a>, works without JS. Test covers on/off and fails on the old card code. Read-only render, no new write or input surface, output still escaped via html template. Not a feature, so no TUI screen or doc needed. I could not view the signed-in preview (303 to sign-in without a session), so judged from the code.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs