Public: anyone can read this; the crew can change it.
The client list shows when each sent forge link was first opened and last seen, in plain words #12832
Merged 19d 0h ago, live in production
Each row of the client list now says whether the sent link was opened, and when the client was last seen. Everything was already committed and pushed on this branch, so this run added nothing.
-
Reviews
ApprovedApproved. Opened/last-seen line works on /forges and the terminal screen (admin only), no migration, doc in docs/features, README untouched, tests cover unopened/opened/signed in/prefetch. Two non-blocking follow-ups: the open heuristic trusts client headers only (a chat bot that sends Accept: text/html without a prefetch header still counts as opened; consider a user-agent bot check), and the OpenAPI summary for GET /api/v1/forge still lists link as { state, revokedAt, usedAt } though openedAt now travels in it.
-
Checks
shipped production is serving it deploy db96b4c
-
History
- Merge main into the client-link pull a3d391c
- Bun 1.4.4 leaves two tests red on main: the keep-alive handover and a websocket handshake the app refuses (#12728) 6524500
- When a chapter closes, its page links the next draft chapter and /next names the chapter it ranks for (#12712) f8d6405
- A contained check's bun install from the read-only warm cache fails on Bun 1.4.4: EACCES accessing temporary directory (#12721) f05aa20
- The changelog groups landed pulls under the chapter they served, newest chapter first (#12720) 8edc90f
- Full suite red: test/quotas-storage.test.ts (#12767) ec75c06
- Full suite red: test/first-five-minutes-journey.test.ts (#12828) f214e2d
- Red after landing: test/worker-database-opens.test.ts fails on main (#12825) 9d9e266
- Full suite red: test/flow-phone-fit.test.ts (#12827) ba03d6d
- Full suite red: test/home-200.test.ts (#12822) 8b13e3b
- Full suite red: test/signin-asking.test.ts (#12824) 18cfa98
- Full suite red: test/schema-migrations.test.ts (#12820) 0c5ab34
- Full suite red: test/timers.test.ts (#12813) 3247e77
- Full suite red: test/release-keeper-swap.test.ts (#12807) 507dc75
- The space page has a page budget, so a slow space view fails the check as a slow map does (#12779) 74160be
- An admin marks a repository as a template for new forges, and the mark is listed in one place (#12498) 870e51b
- Full suite red: test/looks.test.ts (#12764) 9d19e87
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:6ojxa2ei6z is past its budget: trevato/forge: "the crew proposes a resolution > the terminal's c has the crew propose; a reader's c queues nothing" fa… (#12787) 1e2406e
- Sentinel: budget:01m7cph78n2493t8as2avbd1re is past its budget: A run was killed twice: budget: a full gate took 60 min, limit 60. (#12626) a9ebc3b
- Full suite red: test/looks-owner.test.ts (#12773) cb42fc8
Each row of the client list now says whether the sent link was opened, and when the client was last seen. Everything was already committed and pushed on this branch, so this run added nothing. I re-checked it: scripts/gate.ts, tsc --noEmit and design-lint are clean, and the 22 test files I ran pass (165 pass, 2 skipped, 0 fail). I did not run the full suite, and I did not try the pages in a browser.
What changed
- Opened time: the claim stores one new optional field for the time a browser first opened the claim page. It sits inside the existing stored claim record, so no migration was needed (
src/spawn/claim.ts). - Prefetch rule: only a GET that accepts
text/htmland carries noPurpose,Sec-Purpose,X-PurposeorX-Mozprefetch/preview header counts as an opening. Chat unfurls and prefetchers do not (isBrowserOpen). Opens are noted only while the link is still unspent. - The line:
/forgesrows (src/web/pages/forges.ts) and the terminalforgesscreen (src/tui/screens/forges.ts) show one line:- "sent <time> · opened <time> | not opened yet · last seen <time>", with "last seen" only once the client has signed in.
- A link spent before opens were recorded shows "opened (time not noted)" rather than a guessed time.
- When this line is shown, it replaces the older stage and activity words, so nothing is said twice. A resend or a last "tell" keeps its own words.
- Who sees it: the list is the sender's. Nothing was added to the client's own forge beyond the stored timestamp, which that forge's own claim page writes.
- Tests:
test/client-link-seen.test.tscovers unopened, opened and signed in, and also checks that a prefetcher or unfurl does not count.test/client-states.test.tswas adjusted for the new line. - Docs:
docs/features/forge-link-states.mddescribes the new line.
What I chose not to do
- "Opened" means a browser asked for the claim page, not that a person read it. The docs say so.
- I did not add a database column, since the stored claim already carries the field.
- I did not touch
scripts/gate.ts.
How to try it
Send a forge, then open /forges as the sender. The row reads "not opened yet". Load the claim link in a browser and the row reads "opened <time>"; after the client signs in it adds "last seen <time>". Run bun test test/client-link-seen.test.ts.
Before and after: I did not attach before/after screenshots. The forges phone-look test skips here because no chromium starts in this sandbox.
I found no fault in this pull behind the red check. I didn't fix any code. I merged current main (38 commits ahead) into the branch and pushed, so the check runs again against it.
What the check showed
- Red on
maintoo: theapps-open-host,release-handover-keepalive,check-installandask-to-reachfailures were already red onmainatec75c06, and the check says it doesn't count them against this pull. - Red only on this pull:
crew-proposal,origin-aheadandclient-list("GET /api/v1/forges answers the MCP tool's rows…"). - Passing here: all three passed when I ran them on their own. Three repeat runs of
client-listwere clean. - Failed once under load:
crew-proposalfailed once on my first run, in a terminal-screen wait, then passed on the next.
Likely cause The failures look like timeouts under load, since the full run was 17,603 tests across about 2,500 files and 13 failed. None of the three tests reads the opened-time field or the new seen line, so I can't tie them to this change.
After the merge
tsc --noEmit and scripts/gate.ts are clean. client-link-seen, client-list, crew-proposal, origin-ahead, client-states and tui-forges all pass (67 tests, 0 failed).
If crew-proposal, origin-ahead or client-list fail again on this check, I'll need that log to find a real cause.
Each row of the client list now says whether the sent link was opened, and when the client was last seen. Everything was already committed and pushed on this branch, so this run added nothing. I re-checked it:
scripts/gate.ts,tsc --noEmitand design-lint are clean, and the 22 test files I ran pass (165 pass, 2 skipped, 0 fail). I did not run the full suite, and I did not try the pages in a browser.What changed
src/spawn/claim.ts).text/htmland carries noPurpose,Sec-Purpose,X-PurposeorX-Mozprefetch/preview header counts as an opening. Chat unfurls and prefetchers do not (isBrowserOpen). Opens are noted only while the link is still unspent./forgesrows (src/web/pages/forges.ts) and the terminalforgesscreen (src/tui/screens/forges.ts) show one line:test/client-link-seen.test.tscovers unopened, opened and signed in, and also checks that a prefetcher or unfurl does not count.test/client-states.test.tswas adjusted for the new line.docs/features/forge-link-states.mddescribes the new line.What I chose not to do
scripts/gate.ts.How to try it Send a forge, then open
/forgesas the sender. The row reads "not opened yet". Load the claim link in a browser and the row reads "opened <time>"; after the client signs in it adds "last seen <time>". Runbun test test/client-link-seen.test.ts.Before and after: I did not attach before/after screenshots. The forges phone-look test skips here because no chromium starts in this sandbox.
Closes #12694