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

Working together, visible: who is here, a quiet live strip, a landing said once #16415

Merged opened this

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

Merged

Talk pane and repository page: "ben and maya are here · juniper is building #15" (absent when alone), the last three things done on the repository, and "ben's change landed: Live has it now" once with See Live / Reply to ben / Dismiss.

Notes

shipped production is serving it deploy 3fede26

opened this

Talk pane and repository page: "ben and maya are here · juniper is building #15" (absent when alone), the last three things done on the repository, and "ben's change landed: Live has it now" once with See Live / Reply to ben / Dismiss. Presence lives in memory only (WeakMap per forge, bounded, dropped on close or 45 s silence), readers only, agents only as what they build. Only the landing line moves the frame, only on Live. One set of words for page and terminal (design/together.ts).

🤖 Generated with Claude Code

3 earlier comments · 1 event
commented

<!-- look-pages 93e70a5cee8a --> Look pages for 93e70a5, from the gate:

  • look pages (named): this pull changes src/web/client.ts, src/web/pages/repo.ts, src/web/pages/talk.ts; a commit names /talk
commented

<!-- look-pages 08d5f817e8d9 --> Look pages for 08d5f81, from the gate:

  • look pages (named): this pull changes src/web/client.ts, src/web/pages/repo.ts, src/web/pages/talk.ts; a commit names /talk
commented

<!-- look-pages f1f157650cc6 --> Look pages for f1f1576, from the gate:

  • look pages (named): this pull changes src/web/client.ts, src/web/pages/repo.ts, src/web/pages/talk.ts; a commit names /talk
Changes requested — before the latest push

The idea is sound and the work is mostly there: the seat is taken only after canRead, the fragment answers 404 to non-readers, the terminal has its own lines, and the how-to is in docs/features/talk.md rather than README. I want these changes in one round.

  1. (Fix first) Presence caps can be filled by one person. MAX_SEATS = 64 counts streams, not people. One signed-in user can open 64 /events?here= streams on any public repository, and from then on nobody else gets a seat there, so nobody else shows up on the line. MAX_ROOMS = 500 has the same problem across repositories. That is a cap added where removing something would do, which the direction rules out. Give each user one seat per repository: count several streams of one user as one seat, and drop the room cap. Memory then grows with the number of people on a repository, not with the number of streams they open. Add a test where one user opens many streams and a second user still appears.
  2. Presence on public repositories. canRead is true for every signed-in user on a public repository, so anyone who views one is named to every other viewer. docs/features/talk.md says 'no history of who looked at what', but this is live exposure of what someone is looking at. Either name only people who have write or member access to the repository, or say plainly in the docs that on a public repository every signed-in reader is named. I prefer the first.
  3. Design (docs/DESIGN.md):
  • Principle 1: the together-faces initials repeat the names in the sentence next to them, so the line says who is here twice. Drop the faces.
  • Principle 6: .together-face has a border: 2px solid var(--bg) ring, a border that is not a hairline marking where something ends.
  • Principle 4/5: the hand-set font-size: 11.5px, the 20px face and the pixel gaps in togetherCss should be tokens or the named classes. .together ul styles an element nothing renders; delete it.
  1. The byte caps in test/talk-page.test.ts were raised (script 54,800 to 57,000, page 54,000 to 56,000) along with the size budget. Loosening the guard is the opposite of removing something. Keep the added client JS small enough to stay within the old caps, or say in the pull what shrank to pay for it.
  2. Test stability. The new talk-page test replaces Date.now and relies on microtask polling for the landing. Drive the clock through an injected now instead, so it cannot flake.

No other security finding: the body is built from escaped html templates, the ?here= value is parsed and checked against the viewer, and agents take no seat.

commented

<!-- look-pages 18ea03f80fb5 --> Look pages for 18ea03f, from the gate:

  • look pages (named): this pull changes src/web/client.ts, src/web/pages/repo.ts, src/web/pages/talk_client.ts; a commit names /talk
Approved

My earlier ask is met: seats are now keyed by person (one seat per user however many tabs), and MAX_SEATS and MAX_ROOMS are gone. Memory now grows with people, and the per-person TABS limit only drops that person's oldest stream, so it can't lock anyone else out. I read the new code for the usual problems and found none. Identity comes from the session. The ?here= value is checked with canRead on the server. Agents and inactive users take no seat. On a public repository only writers are named and other readers are only counted. The /together fragment answers 404 to anyone who can't read the repository. Output goes through html escaping. Nothing is stored. The how-to is in docs/features/talk.md and the README is untouched. The terminal prints the same lines and has an L key for Live. Tests cover presence, visibility, the stream and the page script. I did not re-run the suite or the preview. Non-blocking: the TUI's inline IIFE in talk_chats.ts is hard to read and would be clearer as a small helper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs