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

Every app on a hosted forge says “The terminal is off.” and never why or what turns it on #318

Merged opened this

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

Merged

`terminalFor` (`src/actions/apps.ts`) now returns the command or a reason (`no_tty` / `no_listener`) instead of a bare `string | undefined`. `terminalLine` (`src/web/ui.ts`) uses the reason to say, on a hosted forge with `FORGE_SSH_PORT=0` but a declared `tty`, "The terminal is off — this forge has no SSH listener. Set `FORGE_SSH_PORT` to turn it on." When the app declares no `tty`, the line is un…

shipped production is serving it deploy ef63cd6

opened this

terminalFor (src/actions/apps.ts) now returns the command or a reason (no_tty / no_listener) instead of a bare string | undefined. terminalLine (src/web/ui.ts) uses the reason to say, on a hosted forge with FORGE_SSH_PORT=0 but a declared tty, "The terminal is off — this forge has no SSH listener. Set FORGE_SSH_PORT to turn it on." When the app declares no tty, the line is unchanged. Both existing callers (src/web/pages/apps.ts, src/web/studio/previews.ts) already composed correctly against the new shape.

Added a test in test/studio.test.ts that pins app.config.sshPort = 0 (composed state, not a real listener shutdown, per #77's ground) with a live tty and asserts the new sentence and that no invented ssh … command appears; the existing on/off cases stay covered by neighboring tests.

bun x tsc --noEmit is clean, and the full check suite (bun scripts/test-shards.ts …) passes except one pre-existing timing-flake (the studio home does not wait on the decider) that only fails under the four-way parallel shard's CPU contention — it passes in isolation and is unrelated to this change (not touched).

Closes #283

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs