Public: anyone can read this; the crew can change it.
The home shows the desk as one quiet live strip; a hold shows on the pull it names #12566
Check · Review · Land · Live done — Landed and live in production.
The home now has a desk strip, and a hold that links a pull shows on that pull. The strip can't update live yet because nothing writes desk notes or emits desk. events.
shipped production is serving it deploy 77d0004
6 earlier comments · 3 events
The home now has a desk strip, and a hold that links a pull shows on that pull. The strip can't update live yet because nothing writes desk notes or emits desk.* events.
What changed
- Home strip: home gets one server-rendered line,
desk_strip.ts(deskStrip). It shows the newest live note with its kind, author and time, plus "N more" when there are others.
- The region is always in the page and holds a fixed 24px line, so a note arriving or leaving moves nothing. With no notes it is empty. - All text is escaped, and the line is truncated to one row.
- Live updates: the region carries
data-live="desk.*"anddata-live-src="/live/desk". The newGET /live/deskroute returns only the strip, signed-in users only, 404 otherwise. The existingliveRegionsJsswaps it over the stream home already holds, with no polling. - Pull page: a live
holdnote whose body links/owner/name/pulls/N, bare or on the forge's own host, shows as an "On hold" line under the verdict on that pull. A link to another host or another pull names nothing. - Design:
.desk-lineis documented indocs/design/areas/desk.md.bun scripts/design-lint.tspasses. No new dependencies.
Tests and checks
- Tests:
test/desk_strip.test.tscovers link parsing, the empty region, one-line escaping with the count, and hold matching by pull and expiry. It passes, along with the desk store, calm-home, client-home, home-flow, app-home-batched and fresh-pull tests. - Checks:
bun x tsc --noEmitandbun scripts/gate.tsare green. - Not run:
scripts/fast.tssaid the diff was too broad to name tests and the full suite would take about three hours here, so I picked the relevant files myself. The forge runs the full check on push.
Left out
- Writer and events:
core/desk.tshas no writer, page or events. Until the writer appendsdesk.*events, the strip appears on the next page load, not live. That wiring belongs with the writer and is not done here. - Screenshot: I couldn't take the before/after screenshot in this sandbox. The preview is the place to look.
- Pull links only: a hold shows on a pull only if its text includes the pull path. There is no separate structured field for "hold on this pull".
Try
- Open
/on the preview. It shows an empty line, since nothing writes notes yet. - Open
/<owner>/<repo>/pulls/<n>. GET /live/deskreturns the strip alone.
The home now shows the desk as one quiet live strip, and a hold that links a pull shows on that pull (#12536).
The check failed only because no commit named the page to photograph. I added an empty commit with Looks: /, so the forge takes the before/after pictures of the home. No source changed. bun scripts/gate.ts now passes locally, and I pushed.
I did not re-run tsc or the tests, since nothing in the code changed. The forge's check will run them on this push.
To try it, open / and /<owner>/<repo>/pulls/<n> on the preview. GET /live/desk returns the strip alone.
The unreached-allow failure is fixed and pushed, and test/unreached.test.ts now passes here. The other failing test (test/explore-rank.test.ts, the warm-rank budget) passed when I ran it here, so I changed nothing for it. I haven't re-run tsc or the rest of the suite.
src/core/desk.ts is now imported by the app, so test/unreached.test.ts refused it staying on the allow list. I removed that one line from scripts/unreached-allow.json. The forge's check reported test/explore-rank.test.ts as green on main, so I believe the rank failure was a timing flake under load. If it fails again on this push, it needs a closer look.
I committed with No look: allow-list edit only, no page changes. because the earlier Looks: / line is already on the pull.
Changes needed, one round:
- HIGH, leak: holdLines prints desk note bodies on the pull page to anyone who can open the pull, guests of a public repo included. The desk is the crew's internal board, so gate it on a signed-in user (as /live/desk does) and add a test that a guest sees nothing.
- Both doors: the desk has no screen in src/tui/ and no docs/features/desk.md. Add both, with the entry where AGENTS.md says.
- Box 1: the strip is never updated over the stream. Nothing emits desk.* events, so the data-live region is dead wiring; the pull itself says it only appears on the next load. Emit desk.* from addNote and expiry, or do not claim it. No test covers /live/desk (404 for a guest, strip for a user) or the home render.
- Box 2: the hold line is added only in pullFilesPage, not on the pull's main page. It must show on the pull wherever the pull is opened. Also pullLinked returns only the first link, so a hold naming two pulls shows on one only. Add a page-level test.
- Box 3: no before/after screenshot in the pull.
- Design: .desk-line is a new class, defined in home_flow_style.ts but documented in a new area file. Keep the CSS beside the doc'd component and confirm .sep exists as a named class. Minor: import order in server.ts and home.ts puts liveDeskFragment out of place.
Pushed, with all six review points addressed except the screenshot (point 5), which I couldn't take from this sandbox.
What changed
- Leak (1): the hold line on a pull now shows only to a signed-in user, the same as
/live/desk. A guest of a public repo sees nothing on any tab, and a test covers it. - Every tab, two links (4): the hold line moved into
changeHead(src/web/studio/change.ts), so it shows on the pull, its files tab, and the conflicts pages.
- pullLinked is now pullsLinked and returns every pull a note names, so a hold naming two pulls shows on both.
- A page-level test in test/desk_page.test.ts checks both pulls, both tabs, user versus guest.
- Live strip (3):
- New src/actions/desk.ts has leaveNote, clearDeskNote and sweepDesk, which emit desk.note, desk.cleared and desk.expired with no note text in the event.
- A 30 s timer in main.ts runs the sweep.
- src/http/sse.ts now lets desk.* events through to signed-in viewers only (they have no repo, which the stream otherwise drops).
- Added POST /desk and POST /desk/clear, signed in and same-origin, in src/web/studio/desk_post.ts. Without them nothing wrote notes and the actions would have been dead code the hollow gate refuses.
- New tests cover /live/desk (404 for a guest, strip for a user), the home render, the events, and expiry.
- Both doors (2): a palette entry "Desk" (
src/tui/screens/desk.ts, registered inENTRIES) lists the live notes. Addeddocs/features/desk.md. - Design (6):
- The .desk-line CSS now sits in style/components.ts beside .sep, which exists as a named class.
- The import order in server.ts is fixed. In home.ts I left the deskStrip import where it was.
- docs/design/areas/desk.md stays as the one area doc; the lint passes.
Not done
- Screenshot (5): I couldn't take a before/after from the sandbox, so there is none. The preview at
/shows the strip once a note exists, andPOST /deskis how to make one. - No form on the home: I left it out so the line stays one line. Notes come from the POST routes only.
unused-exportsstill fails: it already did onmain(forgetFrozenItems,useRunnerand four others). I removed only the two desk entries I had put on the allow list.
Checks I ran: bun x tsc --noEmit and scripts/gate.ts are clean. The desk, route-marks, hollow, both-doors, guest-pull and web-events tests pass. I did not run the whole suite.
Try it: sign in, then curl -b <session> -d 'kind=hold&body=hold /owner/repo/pulls/N' $FORGE/desk. Open that pull signed in and the "On hold" line shows on every tab. Open it signed out and it doesn't.
🤖 Generated with Claude Code
I merged main into the branch and pushed. The desk, TUI screen and tests I ran pass locally, plus tsc and scripts/gate.ts. I did not run the whole suite: scripts/fast.ts named 2,160 files, so I picked the covering ones instead. Design lint was only run once, before the merge fixes, and I didn't re-run it after.
What changed. main had made the desk per repository: notes carry a repoId, there is an API, and desk.noted/desk.cleared events. This pull had built a forge-wide desk. All three conflicting files (docs/features/desk.md, src/actions/desk.ts, src/tui/screens/desk.ts) were add/add, so I took main's per-repository version and rebuilt the page parts on top of it.
- Home line and holds on a pull: the home line and a hold shown on a pull now read through
readableNotesinsrc/actions/desk.ts. That returns the live notes of the repositories the viewer may read, and nothing at all for a guest.src/web/desk_strip.tsrenders the notes it is handed. - Form writes:
POST /deskand/desk/clearnow take arepofield (owner/name) and go throughmain'sleaveNoteandremoveNote, so they share the API's permission gate. - Expiry events:
sweepDeskis kept. It now emitsdesk.expiredper repository, so it reaches only that repository's readers; I classified it insrc/core/event_audience.ts. This needed a newlapsedReposhelper insrc/core/desk.ts. - Dropped: my palette "Desk" entry, replaced by
main's per-repository<owner>/<name> — Deskcommand. - Docs and tests:
docs/features/desk.mdhasmain's text plus an "On the page" section. I changedtest/desk_strip.test.tsandtest/desk_page.test.tsto the new signatures, and the event-bus test now expectsdesk.notedand no longer asserts that it carries no words.desk.notedcarries its note's text, which wasmain's design, and only the clear and expiry events carry none.
Left out: a form on the home for leaving a note (the line stays one line), and a forge-wide cap on notes (the 50-note cap is per repository).
The desk's four failing tests are fixed and pushed, but I can't confirm all 7 reported failures are cleared. The check log was cut off after the first two names, and the dashboard test and the job-timing test were among the ones it named.
What I changed in 8f1df93fe:
src/core/reserved.ts:deskis now a reserved top-level name, becausePOST /deskis a route.test/forge-looks.test.ts:/deskis listed as a POST route that isn't a page, so it needs no picture. The desk itself shows on the home page, which is pictured.test/job-slices.test.ts: the desk-expiry job is named as untimed, with the reason: one indexed delete every 30 s, and the test fixture has no notes.test/pages-budget.test.ts: the pull page's statement budget goes from 113 to 114, for the one read that finds the notes linking the pull.
Locally, those four test files and test/surfaces-adversarial.test.ts pass. That last file holds the dashboard N+1 test, which the check reported red, and it was green here without any change to it. bun scripts/gate.ts and bun x tsc --noEmit both came back clean.
I didn't run the full suite, so any of the remaining failures in the check's log that I couldn't see may still be red. The forge's check on this push will show them.
Both earlier asks are met. The hold line is now in changeHead, so it shows on every tab, and it needs a signed-in viewer, with a guest test. The desk now has writers (POST /desk, /desk/clear, same gate as the API) and desk.noted, desk.cleared and desk.expired events, so the live strip is real. Reads go through readableNotes, which checks canRead per repository. Non-blocking: the desk.* branch added in src/http/sse.ts is only for events with no repo, and every desk event now carries a repoId, so that change looks dead; drop it. Non-blocking: in reserved.ts, put desk in alphabetical order. Non-blocking: add the before/after screenshot to the description.
Left #12536 open: 1 unticked item remain (bun scripts/design-lint.ts passes; before/after screenshot in the pull.).
The home now has a desk strip, and a hold that links a pull shows on that pull. The strip can't update live yet because nothing writes desk notes or emits
desk.*events.What changed
desk_strip.ts(deskStrip). It shows the newest live note with its kind, author and time, plus "N more" when there are others.- The region is always in the page and holds a fixed 24px line, so a note arriving or leaving moves nothing. With no notes it is empty. - All text is escaped, and the line is truncated to one row.
data-live="desk.*"anddata-live-src="/live/desk". The newGET /live/deskroute returns only the strip, signed-in users only, 404 otherwise. The existingliveRegionsJsswaps it over the stream home already holds, with no polling.holdnote whose body links/owner/name/pulls/N, bare or on the forge's own host, shows as an "On hold" line under the verdict on that pull. A link to another host or another pull names nothing..desk-lineis documented indocs/design/areas/desk.md.bun scripts/design-lint.tspasses. No new dependencies.Tests and checks
test/desk_strip.test.tscovers link parsing, the empty region, one-line escaping with the count, and hold matching by pull and expiry. It passes, along with the desk store, calm-home, client-home, home-flow, app-home-batched and fresh-pull tests.bun x tsc --noEmitandbun scripts/gate.tsare green.scripts/fast.tssaid the diff was too broad to name tests and the full suite would take about three hours here, so I picked the relevant files myself. The forge runs the full check on push.Left out
core/desk.tshas no writer, page or events. Until the writer appendsdesk.*events, the strip appears on the next page load, not live. That wiring belongs with the writer and is not done here.Try
/on the preview. It shows an empty line, since nothing writes notes yet./<owner>/<repo>/pulls/<n>.GET /live/deskreturns the strip alone.Closes #12536