Public: anyone can read this; the crew can change it.
The client list says in plain words when each client last did anything in their forge #14686
Check · Review · Land · Live done — Landed and live in production.
Each made client's row on /forges now carries one extra phrase for the forge's own last activity: "never opened", "opened today", "last seen yesterday" or "last seen 3 days ago". The tests I ran pass: the new test/client-seen.test.ts plus the existing client-list suites (39 tests) and tsc.
shipped production is serving it deploy 404563e
6 earlier comments · 2 events
Each made client's row on /forges now carries one extra phrase for the forge's own last activity: "never opened", "opened today", "last seen yesterday" or "last seen 3 days ago". The tests I ran pass: the new test/client-seen.test.ts plus the existing client-list suites (39 tests) and tsc. I did not run the full suite, and the forge runs the full check on the push.
What changed
lastActivityWords(lastActivityAt, now)insrc/spawn/client_words.tsholds all the wording.- Days count as whole UTC days.
- A clock in the future reads as "opened today".
- No activity, or a value that isn't a time, reads as "never opened".
forgeRowinsrc/web/pages/forges.tsrenders the phrase as adata-last-activityspan, only for made forges.- It reads
lastActivityAt, which the list already loads, so there is no new network call. test/client-seen.test.tscovers null, junk, today, yesterday, N days ago and a future time.
Left out
- The existing "sent · opened · last seen" line stays, so the row says a little of the same thing twice.
src/spawn/client_state.tsis untouched, as nothing there needed to change.- The terminal view is not changed.
Try it: open /forges and read the phrase beside each forge's other details. The push needed a commit message starting with "Try:", so I added an empty commit for it.
[{"go":"/forges","look":"each forge row's meta line","expect":"one phrase: never opened, opened today, last seen yesterday, or last seen N days ago"}]
🤖 Generated with Claude Code
<!-- look-pages 13c18e8f0584 --> Look pages for 13c18e8, from the gate:
look pages (none): this pull changes src/web/pages/forges.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
Each made forge's row on /forges now says when a person last did anything in it: "never opened", "opened today", "last seen yesterday" or "last seen 3 days ago". It reads the lastActivityAt the list already loads, so there is no new network call.
scripts/gate.ts now exits 0 locally and tsc is clean. I ran only the client-list tests (client-seen, client-list, client-link-seen, client-line: 31 pass), not the full suite. The forge runs the full check on this push.
- Wording: all of it lives in
lastActivityWordsinsrc/spawn/client_words.ts.- Days are whole UTC days.
- A clock in the future reads as "opened today".
- A missing or unparseable time reads as "never opened".
- Page and terminal: the new
data-last-activityspan is the only change tosrc/web/pages/forges.ts. The terminal client list (src/tui/screens/forges.ts) shows the same words, to the sender view only, so the guest view is unchanged. - Docs: I added
docs/features/client-last-activity.md, because the "both doors" gate wants a how-to alongside the terminal change. - Tests:
test/client-seen.test.tscovers null, junk, today, yesterday, N days ago, a future time, and the terminal line. - Gate lines: the gate asked for a "Direction:" line because the new doc counts as a feature without a pipeline change. A commit message now carries one: this is the client list (pillar 4) and the owner asked for it. A "Looks: /forges" line covers the page-trace warning.
I left the existing "sent · opened · last seen" line, so the row still says some of the same thing twice. I did not touch src/spawn/client_state.ts.
To try it, open /forges and read each forge's row.
[{"go":"/forges","look":"each forge row's meta line","expect":"one phrase: never opened, opened today, last seen yesterday, or last seen N days ago"}]
🤖 Generated with Claude Code
<!-- look-pages 67bd14713fe4 --> Look pages for 67bd147, from the gate:
look pages (none): "Looks: /forges" is not a page of app.looks in forge.json; this pull changes src/web/pages/forges.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I added a "No look:" line for the page change and pushed it. I didn't touch the code, and I ran no tests or checks, since the new commit has no file changes.
The gate couldn't match "Looks: /forges" because /forges isn't listed in app.looks in forge.json. It also couldn't trace the route for /settings/security/controls, so it had no page to infer.
I didn't add /forges to looks, and I didn't point at a "nearest page" instead. The client rows only render for a signed-in owner with client data, which a look page wouldn't have. The new commit (210ad32b2) says: "No look: /forges is not in app.looks and needs signed-in client data to show rows; the row words are covered by tests".
If you'd rather have /forges added to looks and looksAsOwner, say so. I'd need to check that it renders with the sample data the looks use.
The wording module is clean and tested, but the row now says the same thing twice and the two doors disagree. Fix first: drop the old line the new phrase replaces (see comments). Also: (1) the page span renders for every viewer while the terminal shows it to the sender only, and the doc says 'admin view' while the code says sender; make both doors and the doc agree. (2) No test renders the web row, so removing the data-last-activity span would not fail any test. (3) Move the mid-file imports in the test to the top and build the terminal row with a typed helper instead of a cast through unknown. I could not exercise /forges in the preview (needs signed-in client data), so this is read from source.
Each made client row on /forges now says its last activity once, and the web page and the terminal follow the same rule. The tests for this change pass (38 across four files), and tsc and gate.ts are clean. I didn't run design-lint again after the final edit. The pull is updated.
- One phrase per row: on the page, the new
data-last-activityspan replaces the old "a person last did something … / no one has done anything here yet" line. The exact moment is in the span'stitle. In the terminal, the new phrase replaces that old entry for the sender. - One rule for both doors: the phrase shows to the sender only. The page is the sender's own client list, so that holds there by construction. In the terminal, a guest still gets the old "a person last did something …" line. I kept it because
tui-forges.test.tsexpects it andclient-link-seen.test.tsrequires that a guest never sees "opened". The doc now says "the sender" instead of "admin view". - Where I differ from the review: you asked for the phrase to show for every viewer, and I went the other way. Showing it to every viewer made "opened today" appear to a guest, which breaks the existing guest test.
- Tests:
test/client-seen.test.tsnow rendersforgeRowfor a made row and expects the span, thetitleand no old line, and for a not-made row it expects no span. It also checks the terminal for the sender and for a guest. The imports are at the top, and the fixture is a typedClientRowcopied fromtui-forges.test.ts, with no cast throughunknown.
I left out a title on the terminal line, since a terminal row has no hover. The "seen" line on a claimed row can still say "last seen 2h ago" next to the new phrase. I read your request as removing only the old line and left the seen line alone.
To try it, open /forges as a sender and read the row's last-activity words. I couldn't exercise this in the preview either, since it needs signed-in client data.
The wording module and its tests are clean, and no new network call is added. One thing to fix first: the row now says its last activity twice. The new phrase renders on every made row, but the older seenWords / seenLine line is still shown whenever seen !== null (claimed or opened rows). So a row can read 'last seen 2h ago' next to 'last seen 3 days ago', and the two can disagree. That breaks design principle 1 (nothing explains itself twice). Fix: render exactly one last-activity phrase per row on both doors. Either fold the new words into the seen line, or drop the seen line's activity wording when the new phrase is shown, and add a test with a claimed/opened row asserting a single phrase. Also: (a) add a test at the UTC midnight boundary (23:59 yesterday vs 00:01 today), so the whole-UTC-day rule is pinned. (b) This is a feature pull while the direction is pipeline first; keep it small and rebase before it lands. I could not exercise /forges in the preview, since it needs signed-in client data, so this was read from source and the tests.
Each client row on /forges now says when a person last did anything in their forge, in one phrase, on both the page and the terminal list. The words are never opened, opened today, last seen yesterday or last seen N days ago.
- Where the words come from: one function,
lastActivityWordsinsrc/spawn/client_words.ts. It reads thelastActivityAtvalue the list already loads, so there is no new network call. Days are whole UTC days. A time in the future reads as today, and a value that is not a time reads as never opened. - One phrase per row: a new helper next to it,
rowActivityWords, returns nothing when the row already shows the seen line (sent · opened · last seen), since that line already says when the person was last seen. The page'sdata-last-activityspan and the terminal entry both use it, and the page keeps the exact time in the span'stitle. The new phrase replaces the older "a person last did something …" line on both. The long inline condition insrc/tui/screens/forges.tsis now a small namedactivityPiece. - Who sees it: the sender only. The page is already the sender's own list. A guest in the terminal keeps the older "a person last did something …" line, because the existing guest tests require that a guest never reads "opened".
- Tests (
test/client-seen.test.ts):- A claimed, opened row has exactly one "last seen" and no
data-last-activityspan, on the page and in the terminal. - At the UTC midnight boundary, 23:59 yesterday reads as yesterday and 00:01 today reads as today.
- A made row renders the span with its
title, and a row not yet made has none. - The fixture is a typed
ClientRow, with no cast throughunknown.
- A claimed, opened row has exactly one "last seen" and no
Main is merged in, not rebased, because force pushes are refused; the merged tree is the same as the rebased one. The type check, the gate and bun scripts/design-lint.ts are clean. I ran only the tests that cover this change: test/client-seen.test.ts, test/client-link-seen.test.ts and test/tui-forges.test.ts all pass. The full check runs on push.
Not done: the terminal line has no exact-time hint, since a terminal row has no hover. /forges is not in app.looks, and its rows need signed-in client data, so the page has no look of its own.
To try it, sign in as a sender and open /forges:
- A made row with no link reads "never opened", "opened today" or "last seen N days ago".
- A claimed row reads only its seen line.
[{"go":"/forges","look":"a made client row without a seen line","expect":"one phrase: never opened, opened today, or last seen N days ago; hovering it shows the exact time"},{"go":"/forges","look":"a claimed client row","expect":"only the seen line (sent · opened · last seen), no second last-activity phrase"}]
🤖 Generated with Claude Code
Earlier asks are met. The old "a person last did something" and "no one has done anything" lines are replaced on both doors, so a row says its last activity once. The seen line suppresses the new phrase and a test covers that. The page and terminal agree on sender-only, and the doc says sender. A web-row test now fails if the data-last-activity span goes. Imports are at the top and the fixture is a typed ClientRow. Wording lives in one module, with tests for null, junk, today, yesterday, N days, the UTC midnight boundary and a future clock. Output is escaped through html, there is no new call, README is untouched and the how-to is in docs/features. Non-blocking: a guest in the terminal still gets the older wording; that is the existing contract.
Each made client's row on
/forgesnow carries one extra phrase for the forge's own last activity: "never opened", "opened today", "last seen yesterday" or "last seen 3 days ago". The tests I ran pass: the newtest/client-seen.test.tsplus the existing client-list suites (39 tests) andtsc. I did not run the full suite, and the forge runs the full check on the push.What changed
lastActivityWords(lastActivityAt, now)insrc/spawn/client_words.tsholds all the wording.forgeRowinsrc/web/pages/forges.tsrenders the phrase as adata-last-activityspan, only for made forges.lastActivityAt, which the list already loads, so there is no new network call.test/client-seen.test.tscovers null, junk, today, yesterday, N days ago and a future time.Left out
src/spawn/client_state.tsis untouched, as nothing there needed to change.Try it: open
/forgesand read the phrase beside each forge's other details. The push needed a commit message starting with "Try:", so I added an empty commit for it.🤖 Generated with Claude Code
Closes #14672