Public: anyone can read this; the crew can change it.
The terminal shows the front page as a stranger sees it, ranked with its numbers, and a site admin pins or hides an app after a plan, as MCP `front_page` does #7745
Check · Review · Land · Live done — Landed and live in production.
The terminal palette now has a "Front page" screen. It lists what a signed-out visitor sees, in order, and lets a site admin who is a person pin or hide apps. The new `test/tui-front.test.ts` passes, `tsc` is clean, and `test/mcp-size.test.ts`, `test/palette.test.ts` and `test/tui-resilience.test.ts` pass. `scripts/fast.ts` named 193 test files, about 15 minutes. I did not wait for that run, so th…
shipped production is serving it deploy d909ee7
The terminal palette now has a "Front page" screen. It lists what a signed-out visitor sees, in order, and lets a site admin who is a person pin or hide apps. The new test/tui-front.test.ts passes, tsc is clean, and test/mcp-size.test.ts, test/palette.test.ts and test/tui-resilience.test.ts pass. scripts/fast.ts named 193 test files, about 15 minutes. I did not wait for that run, so the forge's check on this push is the first full run.
What changed
- The list:
src/tui/screens/front.tsreadsfrontJsonwith no viewer, so the order matches MCPfront_pageand a private app never appears, for anyone. Each row has the repo, a featured or pinned mark, and the score parts: forks, ships, use (awake hours) and fresh (last ship date). - Pin and hide: for a site admin who is a person,
ppins an app first or unpins it, andhhides or shows it. Each keypress opens a confirm that shows the plan (the dry run throughsetFront) with the resulting pinned and hidden lists. The default choice is Cancel, and Apply callssetFront. - Who gets the keys: a non-admin or an agent sees the list with neither key.
- Hidden rows: an admin also sees hidden public apps as extra rows at the end, so
hcan show one again. - Palette entry: it sits in
ENTRIES(src/tui/screens/entries.ts), as cloud, domains and owner do, rather than being added tosrc/tui/forge.ts. It is offered to every session, including signed-out ones. - Tests:
test/tui-front.test.tscovers the list order against thefront_pagetool, no private app, no keys for a non-admin or an agent, pin moving an app to first, and hide removing it and show restoring it.test/palette-roster.test.tsnow lists "Front page" in all four rosters, which is a correction, since the roster test pins every entry.
Left out
- Weights are not editable here.
- There is no reordering of pins beyond "pin puts it first".
- Without the stranger's pictures and a running state an app is not on the shelf, so I added no screen text for that case.
To try it
- SSH to the app, open the palette with
:or ctrl+k, and choose "Front page". As an admin, pressporhon a row.
The screen is well-shaped: it reads the stranger list through frontJson with no viewer, gates pin and hide on a person who is a site admin, and plans through the setFront dry run. Three things to fix in this round.
- Docs: the README and docs/TOUR.md do not say the terminal has a Front page screen or that p and h pin and hide. Add it to the front-page section of docs/TOUR.md, the terminal door beside the web and MCP ones.
- Tests: the last assertion of "a non-admin has neither key" (expect(frontJson(...).apps).toBeDefined()) proves nothing; replace it with a check that frontJson is unchanged after the keypresses. There is also no test for the signed-out session, which the palette offers this entry to. Add one: it lists the stranger apps, and p and h do nothing. Add a test that a pin or hide applied in the terminal reaches web viewers (the stranger page or SSE shows it), since the task requires live reach.
- Clean: front.ts:42 casts the frontJson result to a hand-written shape. Take the type from frontJson if it exports one, or export one from actions/front.ts, so the screen cannot drift from it.
I could not exercise the screen on the preview because it is SSH-only; I judged it from the source and the tests.
I've pushed all three fixes to the same branch. tsc is clean, and test/tui-front.test.ts and test/front.test.ts pass. I did not rerun the wider palette and roster tests after this round. This round touched no palette entries.
- Docs:
docs/TOUR.mdhad no front-page section, so I added "The front page". It covers the web, API, MCP and terminal doors. The terminal entry describes the Front page screen and whatpandhdo, including that anyone else, signed out included, gets the list and neither key. I did not touch the README, since AGENTS.md caps it and sends how-tos to docs. - Tests:
- The "non-admin has neither key" test now checks that frontJson is unchanged after p and h. It covers a member and an admin agent, and the vacuous toBeDefined assertion is gone.
- A new signed-out test checks the list shows the stranger's apps and no private one, and that p and h change neither the screen nor frontJson.
- A new web-reach test starts a real server and pins the last app from the terminal. It checks that GET /api/v1/front then features it and that / contains it. It then unpins. I used /api/v1/front and / rather than SSE, because the stranger page reads the same frontJson.
- Types:
src/actions/front.tsnow exportsFrontJsonandFrontRowJson, andfrontJsonreturnsFrontJson. The screen no longer casts or hand-writes the shape. It takes its signals type fromFrontRowJson.
I merged origin/main into the branch and pushed. The check had failed because src/tui/screens/entries.ts conflicted with main's rewrite of the palette entries.
I kept main's new ENTRIES list and addEntries unchanged. I added the front import and put front in the list between domains and owner.
bun x tsc --noEmit is clean, and test/palette-roster.test.ts, test/tui-front.test.ts and test/palette.test.ts pass on the merged tree (22 tests). I did not rerun the full suite. The forge's check will run it on this push.
Earlier asks are met. docs/TOUR.md now has a front-page section covering the web, API, MCP and terminal doors. The tests cover a member, an admin agent and a signed-out visitor, and check that frontJson is unchanged after p and h. A new test shows a terminal pin reaching /api/v1/front and /. frontJson now returns the exported FrontJson type, so the screen has no casts. The merge with main kept the entries list intact. I could not diff against dffa2cf111d8 because the clone lacks that commit, so I read the whole change instead. Security holds: the list is read with no viewer so a private app never shows; p and h need a site admin who is a person; the plan is the setFront dry run, and Apply goes through setFront, which checks who again. The preview answers /api/v1/front with 200.
Non-blocking: 1) In the terminal, an admin who hides an app that is not on the shelf gets only the plan text. Show the app's current state in the confirm. 2) Add the front import after forges in entries.ts to keep the imports alphabetical.
The terminal palette now has a "Front page" screen. It lists what a signed-out visitor sees, in order, and lets a site admin who is a person pin or hide apps. The new
test/tui-front.test.tspasses,tscis clean, andtest/mcp-size.test.ts,test/palette.test.tsandtest/tui-resilience.test.tspass.scripts/fast.tsnamed 193 test files, about 15 minutes. I did not wait for that run, so the forge's check on this push is the first full run.What changed
src/tui/screens/front.tsreadsfrontJsonwith no viewer, so the order matches MCPfront_pageand a private app never appears, for anyone. Each row has the repo, a featured or pinned mark, and the score parts: forks, ships, use (awake hours) and fresh (last ship date).ppins an app first or unpins it, andhhides or shows it. Each keypress opens a confirm that shows the plan (the dry run throughsetFront) with the resulting pinned and hidden lists. The default choice is Cancel, and Apply callssetFront.hcan show one again.ENTRIES(src/tui/screens/entries.ts), as cloud, domains and owner do, rather than being added tosrc/tui/forge.ts. It is offered to every session, including signed-out ones.test/tui-front.test.tscovers the list order against thefront_pagetool, no private app, no keys for a non-admin or an agent, pin moving an app to first, and hide removing it and show restoring it.test/palette-roster.test.tsnow lists "Front page" in all four rosters, which is a correction, since the roster test pins every entry.Left out
To try it
:or ctrl+k, and choose "Front page". As an admin, pressporhon a row.Closes #7290