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

Contraction: fold landing/site into the studio home's empty state #436

Merged opened this

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

Merged

A signed-out visitor now gets the studio's door at `/` in either mode. The dev landing ("Your code, your machine.") and its fallback are removed. Code under `src/` drops by 27 lines (163 added, 190 removed), and `pages/site.ts` goes from 1166 to about 990 lines.

shipped production is serving it deploy a5415ba

opened this

A signed-out visitor now gets the studio's door at / in either mode. The dev landing ("Your code, your machine.") and its fallback are removed. Code under src/ drops by 27 lines (163 added, 190 removed), and pages/site.ts goes from 1166 to about 990 lines.

What moved where

  • src/web/studio/home.ts: new studioDoor(ctx) holds the hero, the Sign in / Create an account buttons (or the edge sign-in) and the forge's ssh line. Below them is a shelf of public apps, live first: running, then asleep, deploying, failed, stopped, and newest first within each.

- Following #288, the shelf is built from three grouped reads (apps, their repositories, their looks), and runtime state is an in-memory lookup. - Following #76, a forge with nothing public up shows the same door with an empty "Nothing public is up yet" shelf, not the git pitch.

  • src/core/apps.ts: new listPublicApps(db, limit) is one query joining apps to public repositories. Plain repositories can no longer push an app off the shelf the way the old window of the 24 newest repositories did.
  • src/web/pages/site.ts: landing and studioLanding are deleted. home() now sends a signed-out visitor to studioDoor, a signed-in visitor in studio mode to studioHome, and anyone else to the dev dashboard, which is unchanged.
  • CSS: the now-unused .hero-points styles are gone. The .app-tile / .app-shelf / .hero styles stay.
  • docs/STUDIO.md describes the door as it is now. docs/DESIGN.md never named the landing, so it already lists only surviving surfaces and is unchanged.

Tests (test/studio.test.ts)

  • Changed because they asserted the behaviour this issue removes:

- ?mode=dev for a stranger now expects the door, not the dev landing. - "A forge with no public apps falls back to the dev landing" is replaced by a test that checks each old landing address: / with no cookie, / with the studio cookie, / with the dev cookie, /?mode=dev, and /?mode=studio. Each must return 200 with the door and an empty shelf, no git pitch, and no plain public repository on the shelf.

  • New: a test that 25 newer public plain repositories don't crowd the apps out, and that a running app sorts ahead of a newer stopped one.

What to look at

  • The ?mode=dev behaviour: a stranger asking for dev mode now gets the same door; the repository list stays a signed-in person's dev home.
  • Site-wide description still uses the old line: the layout's <meta description> still says "Your code, your machine." I left it alone because the layout is outside this fold.

Checks

  • Full check: the forge.json check passes: tsc plus 577 tests in 38 files.
  • Pre-existing failures: two N+1 tests in test/surfaces-adversarial.test.ts fail on main too. That file is not in the check, and this pull doesn't touch them.

To try it: sign out and open / and /?mode=dev. On a fresh forge both show "Apps, live." with an empty shelf. Make a public app and it appears there, live ones first.

🤖 Generated with Claude Code

Closes #396

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs