Public: anyone can read this; the crew can change it.
A tab-forge read-only link can be revoked by the person who made it #18402
Merged 1h 23m ago, live in production
The person who made a read-only tab-forge link can now take it back with a revoke key, shown once. The new tests, tsc, gate.ts and design-lint pass, but I have not run the app or tried it on a preview. One test in the set I ran failed: the looks-lane Chromium test (#12496).
-
Reviews
Changes requested — before the latest pushThe revoke itself is sound: a 192-bit key, only its SHA-256 stored, a constant-time compare, same-origin and the
sharerate limit on the POST, an old row with no hash staying openable, tests that would fail without it, and the docs indocs/features/tabforge.md. I opened the preview: /tab answers 200 and POST /tabforge-link answers its page; the tab-side list lives in the browser store, so I judged it from the diff. Two things to fix in one round.- Medium: a revoked link stays in the tab's "Links you made" list for good. Pressing Stop sharing on it again lands on the forge's bare 404. A person who just stopped sharing sees the link still listed, as if it were live. Fix: when the revoke answers 'gone', or the id is unknown, the tab forgets the kept row. The simplest way is for the success page to offer a same-origin form to
/tab/f/apps/<n>/linksthat drops the row, or for the tab's list to be pruned by a revoke link-back. Add a test that the list no longer shows a revoked link. - Low, principle 1:
TAB_REVOKE, a long paragraph, is said on the tab's app page, again on the answer page next to the key, and a third time in the terminal'stabLine(). On the answer page it also says the key is "kept in this tab", which is not yet true there. Say one short sentence on the answer page: shown once, not in the link, the only way to take the link back.
Also worth a look: revoke attempts share the 10-per-minute
sharedoor with making links, so a person stopping several links is throttled by their own makes. A door of its own would be cleaner.Changes requested — before the latest pushEarlier asks: the dead link stays listed (met, the forget form works and is tested), the wording on the answer page (partly met, see below), and the own door (made, but not tested). Two things remain.
- Tests: the new
revokedoor is behaviour this pull adds, and no test would fail without it. Add one. For example, make more than 10 revoke posts from one address and check the 11th is 429. Then check that a make (thesharedoor) is still allowed afterwards, which is the reason the door exists. - Principle 1, nothing explains itself twice: with no app number, the answer page says "Shown once, not in the link: the only way to take this link back." and then, two lines later, "Keep it somewhere safe: it is the only way to take this link back." Keep one of them.
Everything else holds. Same-origin is checked, the key is stored as a hash and compared in constant time, an old row stays openable, the body is capped at 1 KB by the bytes read, and the terminal carries the same words through
tabLine(). The docs how-to is updated, and README is untouched.ApprovedEarlier asks are met: a dead link is offered for removal from the tab's list, the answer page explains the key once, and revoke has its own door, now tested (10 revokes, then 429, while making a link still answers 201). I found no security problem in the new lines. The key is 192 random bits and only its SHA-256 is stored. It is compared in constant time, and the answer page is no-store. The revoke POST is same-origin checked and its body is capped by the bytes read. The kept-link inputs are validated, and every output is escaped. The terminal's twin is
tabLine()carryingTAB_REVOKE, and the how-to is in docs/features/tabforge.md. Non-blocking: the longTAB_REVOKEparagraph on the app page repeats what the buttons already say, so it could be shortened later. - Medium: a revoked link stays in the tab's "Links you made" list for good. Pressing Stop sharing on it again lands on the forge's bare 404. A person who just stopped sharing sees the link still listed, as if it were live. Fix: when the revoke answers 'gone', or the id is unknown, the tab forgets the kept row. The simplest way is for the success page to offer a same-origin form to
-
Checks
shipped production is serving it deploy fea5438
-
History
- Test the revoke door; the answer page says once what the key is for adb64d6
- A revoked tab-forge link leaves the tab's list; revoke has its own door; the answer page says one short line 20fce5f
- Stop sharing is a button on a tab-forge page the tab draws, not a forge page 33fc76c
- Rewrap comments; pin the tab-shared revoke migration adf1884
- A tab-forge read-only link can be revoked by the person who made it (#18398) 7c6d960
- A tab-forge app leaves as one spec file and comes back in, with or without its records (#18399) 081ac9e
- A person shares one imported session by a link that hides what the forge redacts (#18391) 080d52c
- Full suite red: test/data-browser.test.ts (#18394) b4310c7
- Red after landing: #18373 broke test/data-browser.test.ts (#18393) ab53312
- An imported session opens by reading its stored gzip line by line, not as one decoded string (#18387) a3b5b3e
- A big session is stored without holding the whole file twice: the import writes it to gzip in chunks and checks UTF-8 as it goes (#18385) 8ceefc1
- A person imports a Claude Code or Codex session from /traces in the browser (#18382) d8b1b2b
- A person saves a /traces search by name and reopens it from the list and the palette (#18381) db6a2d2
- small: an imported session's row in /traces opens its page (#18379) 067798c
- Full suite red: test/talk-build-no-crew.test.ts (#18380) fc3efe0
- /traces narrows by the tool a run used and the file it touched, on the page, the API and the terminal (#18373) ee241ef
- An imported session's steps carry their tokens and the page shows them, where the file holds them (#18372) 5739158
- An imported session opens at /traces/<id> as the same tree and time strip a crew run has (#18366) 90fb1bc
- /traces lists Talk and imported traces with a kind facet, and the terminal's kind key is tested (#18365) c5e780a
- Issues: a route to assign an issue to a person or an agent (#18285) 69ce311
2 earlier comments
The person who made a read-only tab-forge link can now take it back with a revoke key, shown once. The new tests, tsc, gate.ts and design-lint pass, but I have not run the app or tried it on a preview. One test in the set I ran failed: the looks-lane Chromium test (#12496). It's unrelated to this change and I did not investigate it.
What changed
- Key at link time: making a link also makes a revoke key. The page that answers shows it once, never in the link. Only its SHA-256 is stored, in a new nullable
tab_shared.key_hashcolumn. - Keeping the key: the answer page has Keep the key in my tab. It posts the link and key to the tab's own page for that app (
/tab/f/apps/<n>/links), which stores them in akept_linktable in the tab. - Listing and stopping: the app's page in
/tablists "Links you made", each with Stop sharing. That posts toPOST /tabforge-link/<id>/revokewith the key. - Right key: it deletes the row, and the link then answers the forge's one 404.
- Wrong or missing key: the link stays, the page says "Nothing changed" with a 403, and the key is compared in constant time as a hash. An id that doesn't exist gets the 404.
- Same-origin and rate limit: the revoke POST is same-origin checked and uses the existing
sharerate limit. - Old rows: a row made before this has no hash. It stays openable and cannot be revoked.
- Tests:
test/tab-share-revoke.test.tscovers the right key, a wrong or no key, a cross-origin POST, an unknown id, an old row with no hash, and the tab keeping and listing the key. - Docs and terminal:
docs/features/tabforge.mdis updated. The terminal's twin is the newTAB_REVOKEsentence intabLine(). The commit saysNo doorfor the rest, because a terminal holds none of a tab's keys.
What I chose not to do
- The key is not saved automatically. The person presses Keep the key in my tab, or copies it from the page. That keeps it working with script off, and the page says so.
- A revoked link stays in the tab's list; nothing removes it. Pressing Stop sharing on it again gives "Not stopped" (404).
- If a person clears the site's data in the browser, the stored keys are lost and those links can't be stopped. The page says this.
Reuse: I did not run similar.ts. I extended linkForm with an optional from app id rather than adding a second form builder.
Try it: on a preview, open /tab, make an app, press Get a link and then Keep the key in my tab. On the app's page, press Stop sharing, then reopen the link. It should answer 404.
Gate: the migration pin is committed. The look-page warning is answered with a No look: line, since the route isn't in app.looks.
I fixed all three points from the review and pushed. I did not run the full suite. The type check and gate are clean, and the revoke, share, door, design-lint and dead-code tests pass.
- Dead link stays listed: each "Stop sharing" form in the tab's "Links you made" list now sends the app's number. When the revoke succeeds, or the link is already gone (a 404 page with the same form), the answer offers "Remove it from my tab's list". That form posts to
/tab/f/apps/<n>/linkswithforget=<id>, which deletes the kept row after checking the id. Without the app number, an unknown id is still the bare 404. - Wording: the answer page now says one line: "Shown once, not in the link: the only way to take this link back." The "kept in this tab" claim is gone from it. The long
TAB_REVOKEparagraph stays on the app page and intabLine(). - Own door: revoke attempts now use a new
revokedoor (10 a minute per address, 60 for the forge) instead ofshare, so stopping several links is not throttled by making them. This adds a newDoormember insrc/http/strangers.ts. - Tests and docs: a new test revokes with the app number and checks the forget form on the success page. It repeats the revoke and checks the same form on the 404. It then confirms the tab's list drops the row, and that a bad
forgetid is refused with a 422.docs/features/tabforge.mdis updated. - Terminal side: the commit says
No door:becausetabLine()already covers this.
I left out forgetting the row when the revoke answers 403 for a wrong key, since the link is still live then.
A person who made a tab-forge read-only link can now take it back with a key. The key is shown once when the link is made, and only its hash is stored. The right key deletes the link and the wrong key changes nothing. A dead link drops off the tab's list, and revoking is rate-limited per address separately from making links.
This push answers the review:
- The
revokelimit is now tested (test/tab-share-revoke.test.ts). The test resets the per-address counters, makes 10 revoke posts from one address, checks the 11th is429 Too many tries, and then checks that making a link from the same address still answers201. If revoke shared the make limit, it would refuse the 10th revoke and the final make. - The answer page explains the key once (
src/web/pages/tabforge-link.ts:75). With no app number, the page says "the only way to take this link back" once, followed by "Keep it somewhere safe." A test checks the phrase appears exactly once.
Checks run: bun scripts/gate.ts (39 rules, 0 fail), bun x tsc --noEmit, bun scripts/design-lint.ts, and the tab-forge, share and strangers test files (161 pass, 1 skipped, 0 fail). I did not run the full suite: scripts/fast.ts listed nearly every test file for this diff, so the forge's check on this push runs it.
To try it on the preview, go to /tab and make a link from an app. With no app number, the answer page names the key's purpose once. Post to /tabforge-link/<id>/revoke more than 10 times in a minute with a wrong key: the 11th answers 429, and making a new link still works.
[{"go":"/tab","look":"make a read-only link from an app, then open the answer page","expect":"the key is shown once and 'the only way to take this link back' appears a single time"},{"go":"/tab/f/apps/1","look":"press Stop sharing with a wrong key more than ten times in a minute","expect":"the eleventh answers 'Too many tries from here', and making a new link still works"}]
🤖 Generated with Claude Code
The person who made a read-only tab-forge link can now take it back with a revoke key, shown once. The new tests,
tsc,gate.tsanddesign-lintpass, but I have not run the app or tried it on a preview. One test in the set I ran failed: the looks-lane Chromium test (#12496). It's unrelated to this change and I did not investigate it.What changed
tab_shared.key_hashcolumn./tab/f/apps/<n>/links), which stores them in akept_linktable in the tab./tablists "Links you made", each with Stop sharing. That posts toPOST /tabforge-link/<id>/revokewith the key.sharerate limit.test/tab-share-revoke.test.tscovers the right key, a wrong or no key, a cross-origin POST, an unknown id, an old row with no hash, and the tab keeping and listing the key.docs/features/tabforge.mdis updated. The terminal's twin is the newTAB_REVOKEsentence intabLine(). The commit saysNo doorfor the rest, because a terminal holds none of a tab's keys.What I chose not to do
Reuse: I did not run
similar.ts. I extendedlinkFormwith an optionalfromapp id rather than adding a second form builder.Try it: on a preview, open
/tab, make an app, press Get a link and then Keep the key in my tab. On the app's page, press Stop sharing, then reopen the link. It should answer 404.Gate: the migration pin is committed. The look-page warning is answered with a
No look:line, since the route isn't inapp.looks.Closes #18398