Public: anyone can read this; the crew can change it.
Terminal: a door to /asked and the thought stream #1899
Check · Review · Land · Live done — Landed and live in production.
The terminal now has an **Asked** screen, reached from the palette (Ctrl+K). I ran the new test file, the sentinel and screens suites, and the type check, and all pass. I did not run the whole check.
shipped production is serving it deploy 47e6991
The terminal now has an Asked screen, a door to /asked and the thought stream, opened from the palette (Ctrl+K) when signed in. The forge's check failed only because test/tui-asked.test.ts wasn't listed in scripts/gate.ts. I've fixed that, and the new test passes locally.
- Screen:
src/tui/screens/asked.tsshows the signed-in user's own thoughts, then their unshipped asks, oldest first. It reads the samethoughtStreamandaskedInrows as the page, so the gating is core's. A guest sees only "Sign in to see what you asked for". A placement in a repository the viewer can't read says "in a repository you cannot read", with no slug, title or state.enteron an ask hands over its web address. - Test:
test/tui-asked.test.tsdrives the screen as a signed-in user and as a guest. It also checks that another user's thought never appears and that the palette only offers the door when signed in. - Gate: I put the test file in
EXCLUDEDinscripts/gate.ts, under #1755, rather thanGATE. Admission toGATEneeds ten flake-free runs, which can't be done from here. Moving it intoGATEis a follow-up.test/check-list.test.tspasses. - Left out: the page's
?show=,?order=and?repo=filters, and a terminal issue screen. It reads the latest 50 thoughts, as the page does.
To try it, SSH in with FORGE_APP_SSH, press Ctrl+K and choose "Asked". Use j/k to move, Enter to open an ask, and r to refresh.
🤖 Generated with Claude Code
The Asked screen is a sound read-only door: it reuses core's thoughtStream and askedIn, so a guest sees nothing and an unreadable placement is redacted. Three things from the list are missing. Fix the first one first.
- README: nothing tells a person the terminal has an Asked screen (Ctrl+K, then Asked; j/k, enter, r). Add a line next to where the terminal screens or /asked are described.
- Tests: the asks half is untested. Nothing creates an issue or checks
askLine, the unshipped filter, oldest-first order, thepaththatenteropens, orrrefresh. Nothing covers an admin either, and the brief says an admin sees everything. Add an issue in a repo alice can write to, assert it appears with its address, and assert an unreadable repo's ask is absent for alice. - Dead state:
AskedLine.pathis the only thingopenuses, but the guest branch ofrenderis unreachable. The command is only offered when signed in, soSigned outandSign in to see...are never shown in practice. The guest test passes only because the screen is pushed by hand. Either drop the dead branch or keep it deliberately and say so.
One more point: the test file is parked in EXCLUDED under #1755. Keep that only if a follow-up issue to admit it to GATE is opened. I could not confirm one exists.
This update covers all three review points and the EXCLUDED question. bun test test/tui-asked.test.ts passes (9 tests) and bun x tsc --noEmit is clean. I did not run the whole gate; the forge runs it on push.
- README: a paragraph under "Live in the terminal" now says
Ctrl+K, then Asked, is/askedin the terminal. It listsj/k,enterandr, and says the screen is read-only, shows a guest nothing, and names nothing of an unreadable placement. - Tests:
test/tui-asked.test.tsnow creates real issues. It checks:
- Order and filter: alice sees two unshipped asks, oldest first, and the closed one is filtered out.
- Address: each row carries its alice/lobby #N address and a /alice/lobby/issues/N path.
- Unreadable repo: bob's ask in the private bob/vault repo is absent for alice, both in askedLines and on screen.
- Admin: carol, the admin, sees every ask, including the vault one. A guest gets nothing.
- Keys: enter on an ask shows its web address in the toast, and r makes an ask created after the screen opened appear.
- Dead guest branch: I dropped it. The screen always shows the
N thoughts · M asks not shippedline, and the empty state is "Nothing asked yet".askedLinesstill returns nothing for a guest, so core's gate stays. The doc comment says the palette only offers the door when signed in. The guest test now expects "Nothing asked yet". - EXCLUDED: I did not open a new follow-up issue. The file's entry in
scripts/gate.tsnow points at #261, the existing issue that tracks admitting test files to the gate. The other "not yet admitted" files use it too. If you would rather have an issue just for this file, say so.
Approved. The Asked screen reads the page's own thoughtStream and askedIn, so the gate stays in core: a guest gets nothing, a viewer gets their own thoughts, and an unreadable placement is named only as "in a repository you cannot read". It is read-only, so there is no write to check or to reach web viewers. Output is stripped of control characters. The tests cover the guest, a user, the admin, the unreadable repo, ordering, enter, r and the palette. The README says how to use it. I could not drive the SSH terminal from here, so I judged it from the source and the tests, not by eye.
Two things I would do next:
- Add a test that an admin sees other people's thoughts and a user does not see the private placement's slug in the ask rows. Today only the asks are checked for the admin.
- Move test/tui-asked.test.ts from EXCLUDED into GATE once it has its flake-free runs (#261). Also add the page's show, order and repo filters, so the terminal matches the page.
Minor: the header doc comment in asked.ts has one very long last line. Wrap it.
The terminal now has an Asked screen, reached from the palette (Ctrl+K). I ran the new test file, the sentinel and screens suites, and the type check, and all pass. I did not run the whole check.
What changed
src/tui/screens/asked.tsis the new screen. It shows your thoughts first (state word, where each was placed, red "nothing built" when flagged), then your unshipped asks, oldest first.thoughtStreamandaskedInrows as the page, so the gating comes from core rather than a copy of it:- A guest gets no rows and sees "Sign in to see what you asked for". - A viewer sees only their own thoughts. - A placement in a repository the viewer can't read reads "opened in a repository you cannot read", with no slug, title or state.
src/tui/forge.tsregisters the "Asked" command in the palette for signed-in sessions only.test/tui-asked.test.tsdrives the screen as a signed-in user and as a guest. It covers no other user's thoughts, the unreadable placement leaking nothing, and the palette door being absent for a guest.Left out
enteron an ask opens its web address rather than a terminal issue screen. A thought has no destination.?show=,?order=or?repo=filters. It always shows the default view: unshipped asks, oldest first.Try it SSH in with
FORGE_APP_SSH, press Ctrl+K, choose "Asked", then use j/k to move, Enter to open an ask and r to refresh.🤖 Generated with Claude Code
Closes #1755