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 #12726
Closed 19d 1h ago
Each row of the sender's client list at /forges now reads "sent · opened " or "not opened yet", plus "last seen " once the client has signed in. Only the sender's list shows it. The client's own forge shows nothing of it.
-
Reviews
Changes requested — before the latest pushCore logic is sound (prefetch filtering, first-open sticks, no migration, sender-only on the page). Changes needed in one round:
- Both doors: the terminal's client list shows none of this. Add the sent/opened/last-seen words to the terminal's client-list screen in src/tui/ (same gate as the page: admin sees it, guest nothing), from the same
seenOf. Torque's description admits 'I did not add ... terminal wording'. Add a test. - Docs: add docs/features/<name>.md (or extend the existing client-list how-to) saying what 'opened' and 'last seen' mean, including that a prefetch/unfurl does not count and old spent links show the spend time as opened. Not in README.
- A no-door commit line is not present either; if you claim the page needs no terminal door, say so as
No door: <why>. Otherwise do 1. - Spent-link fallback: an old link shows its spend time as 'opened', which is a guess presented as fact; show 'opened' without a day or label it, or say so in the docs.
- The seen test builds markup then strips tags with a regex and never checks the 'client's own forge shows nothing' box. Add a test that GET /claim by the child itself (own) does not note an open and that the child's own pages never render the words.
- Both doors: the terminal's client list shows none of this. Add the sent/opened/last-seen words to the terminal's client-list screen in src/tui/ (same gate as the page: admin sees it, guest nothing), from the same
-
Checks
stopped closed without shipping deploy 6e74a75
-
History
- Say sent, opened and last seen in the terminal too, as one line 6e74a75
- Wrap the new comments at 100 columns 33e5e6b
- Try: open /forges as the sender and read each row's sent, opened and last seen words 966783a
- Client list says whether the sent link was opened, and when the client was last seen b8a66b0
- The renderers nothing tests by name get a test: toml-config, yaml-config, html_preview, gcode-css, model3d-css, model3d-client (#12708) 20052b1
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1zu7inoki4 is past its budget: trevato/forge: "whether a snapshot is encrypted before it leaves is a setting, and the status says which > by default t… (#12687) 736d7ef
- Full suite red: test/offsite-lane.test.ts (#12685) e716baf
- Full suite red: test/palette-tell.test.ts (#12673) 9f81212
- Full suite red: test/search-production-size.test.ts (#12670) 025ccd2
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:9s216pmb22 is past its budget: trevato/forge: "two hosted forges on one machine: files > a link the forge left where its home goes is never mounted: n… (#12469) 5e1894f
- Full suite red: test/apps-token.test.ts (#12672) 87c40a8
- Full suite red: test/spawn-small-cell.test.ts (#12671) b4feb63
- Red after landing: test/boundary-tenancy-cell.test.ts fails on main (#12686) fe4a0e9
- Full suite red: test/flow-cache.test.ts (#12662) 8701767
- Full suite red: test/spawn-cell-e2e.test.ts (#12668) 24eb133
- The release proof boots a 1-CPU, 512 MiB forge, runs the first-hour journey and fails when memory at rest is over budget (#12579) b9556cb
- Full suite red: test/probe.test.ts (#12663) a328879
- Full suite red: test/composer-draft.test.ts (#12660) fb6b63b
- Full suite red: test/boundary-tenancy-cell.test.ts (#12657) 3605c23
- Full suite red: test/tui-workspace.test.ts (#12666) c05d786
3 earlier comments
Each row of the sender's client list at /forges now reads "sent <day> · opened <day>" or "not opened yet", plus "last seen <relative>" once the client has signed in. Only the sender's list shows it. The client's own forge shows nothing of it.
The new test/client-link-seen.test.ts and the existing claim and client-state tests pass. tsc and design-lint printed no errors, and gate.ts printed no failures. I did not run the full suite. scripts/fast.ts found the diff too broad (1960 files), so I ran only the claim and client-state files. I have no before/after screenshots: the sandbox can't reach a preview of this branch.
- Where the open is recorded: the child stores the first-opened time inside the claim row it already keeps in
user_setting. The nullable column the issue allowed turned out not to be needed, so there is no migration. A freshly minted link starts clean. - What counts as opening:
noteOpenedruns whenGET /claimserves an open link. It requires anAcceptheader containingtext/htmland rejects anyPurpose,Sec-Purpose,X-PurposeorX-Mozheader naming a prefetch, preview or prerender. HEAD is ignored, and the first open sticks. The check isisBrowserOpeninsrc/spawn/claim.ts. - How it reaches the sender: the child reports
openedAtin the link state it already gives the parent, andseenOfinsrc/spawn/clients.tsturns that into the words. Nothing is shown while the forge is still being made or hasn't answered. - Stage badge: an unclaimed link that has been opened now shows the "Opened" stage instead of "Sent".
- Tests: the new file covers unopened, opened, signed in, the header rules, and a live
/claimserved to an unfurl and to a browser. - Not done: older forges whose link was already spent show their spend time as "opened", because the real open was never recorded. I did not add MCP or terminal wording for this, only the page.
To try it, send a forge, open its claim link in a browser, then reload /forges.
🤖 Generated with Claude Code
The client list now shows, for each row on the sender's /forges page, when the link was sent, whether and when it was opened, and when the client was last seen. This push fixes what was failing in the gate.
What changed
- Opened and last seen. The client forge notes the first real browser GET of its claim page in the claim row it already keeps, so there is no migration. A request with a prefetch or preview header, or an Accept header that isn't HTML, doesn't count. That change is in
src/spawn/claim.tsandsrc/spawn/clients.ts, and the row text is built insrc/web/pages/forges.ts. - Test.
test/client-link-seen.test.tscovers it.
The failure and the fix
- Cause. The preview deploy log I was given showed only
/_measurecross-origin warnings, and the preview answers/healthzwith 200. The failure I could reproduce wasscripts/gate.ts. It rejected five comment lines over 100 columns inclaim.ts,clients.tsandforges.ts, and wanted aLooks:orNo look:line for the changed pages. - Fix. I rewrapped the comments and added a
No look:line./forgesshows clients only to a sender who has made forges, and the preview doesn't seed that, so no page inapp.looksshows it. I did not look into the/_measurewarnings. They are the preview's measure beacon posting fromhttp://…:8080to anhttpsorigin, which the same-origin check refuses, and this change doesn't touch it.
Checks run before pushing
bun scripts/gate.tsis clean.bun x tsc --noEmitis clean.bun scripts/design-lint.tsis clean.- The new test file passes: 6 tests.
- I did not run the full suite; the forge runs it on the push.
To try it: as the sender, open /forges and read the sent, opened and last seen words on each client row.
The sender's client list now carries one line, "sent 3d ago · opened 1d ago · last seen 2h ago", on both /forges and the terminal's forges screen. Gate, tsc, design-lint and the 19 tests in the two client test files pass. I ran about 60 related test files before the final edits; the only failure was test/client-states.test.ts, which I updated (below). I did not re-run that wider set afterwards.
- Terminal: the terminal's client list shows the line to an admin only; a guest sees none of it. The page and the terminal build it from the same
seenOfandseenParts. - Days: dates are now the row's relative words ("3d ago"), not raw ISO days.
- One line: the line replaces the separate stage ("Sent", "Opened", "Signed in") and "a person last did something" words, on the page and in the terminal. A resend notice and the last tell keep their own words.
- Old spent links: a link spent before opens were noted now reads "opened (time not noted)", with no guessed day. This changes
seenOf, so itsopenedAtis null for those links. - Docs:
docs/features/forge-link-states.mdnow says what the line means. "Opened" means a browser asked, not that a person read it. Prefetch, unfurl and non-HTML requests don't count. The headers are client-written, so anyone holding the link can mark it opened, once per link and only while it is open. The child's own/welcomenever notes an open, and old spent links read "opened (time not noted)". - New tests: in
test/client-link-seen.test.tsfor the terminal line, the guest case, the old-link wording, the folded line, and/welcomenoting no open. The/welcometest also checks the child's own/and/forgesdon't render the words. - Weaker than you asked: the child-pages check only looks at
/and/forges, which don't list any clients there. - Changed test: I changed
test/client-states.test.ts, which asserted the old standalone "Sent" stage text on the page. That is the duplication you asked me to remove, so the test was out of date. - Not done: I did not add a
No door:line, because the terminal door is added. The commit carriesNo look: …, since noapp.lookspage lists a made client, which the preview lacks. I did not make the claim page's write on GET authenticated. It can't be, since the visitor is unauthenticated, so I documented the limit instead.
Declined: there is nothing in this pull to fix, and I pushed nothing. The only failure the check counted against it, test/origin-ahead.test.ts ("a reading stuck on a slow origin does not hold the sweep"), passes here three runs out of three (11 tests, 0 failures). Run log: https://forge.open-platform.sh/trevato/forge/runs/01m7dq5yg2nmbt43z0z4k8vhcz
Each row of the sender's client list at
/forgesnow reads "sent <day> · opened <day>" or "not opened yet", plus "last seen <relative>" once the client has signed in. Only the sender's list shows it. The client's own forge shows nothing of it.The new
test/client-link-seen.test.tsand the existing claim and client-state tests pass.tscanddesign-lintprinted no errors, andgate.tsprinted no failures. I did not run the full suite.scripts/fast.tsfound the diff too broad (1960 files), so I ran only the claim and client-state files. I have no before/after screenshots: the sandbox can't reach a preview of this branch.user_setting. The nullable column the issue allowed turned out not to be needed, so there is no migration. A freshly minted link starts clean.noteOpenedruns whenGET /claimserves an open link. It requires anAcceptheader containingtext/htmland rejects anyPurpose,Sec-Purpose,X-PurposeorX-Mozheader naming a prefetch, preview or prerender. HEAD is ignored, and the first open sticks. The check isisBrowserOpeninsrc/spawn/claim.ts.openedAtin the link state it already gives the parent, andseenOfinsrc/spawn/clients.tsturns that into the words. Nothing is shown while the forge is still being made or hasn't answered./claimserved to an unfurl and to a browser.To try it, send a forge, open its claim link in a browser, then reload
/forges.🤖 Generated with Claude Code
Closes #12694