Public: anyone can read this; the crew can change it.
An imported session's page has a red Delete that asks for its title typed #18423
Merged 1h 9m ago, live in production
An imported session's page now has a red Delete that opens from a closed details, tells the owner what is lost, and stays inert until the title matches. The delete route and form were already on main (#18371). This pull reshapes the form and adds the missing pieces.
-
Reviews
Changes requested — before the latest pushThe control is the right shape: a closed details (no shift on first paint), it works with JavaScript off, the pattern is escaped, and the server still checks the title with deleteImported. I did not exercise the preview. Four things to change in one round:
- (first) The warning paragraph says the same thing twice and runs long (principles 1 and 8). Cut it to two short sentences: what is lost, and that a live share link must be stopped first. Do not print both the live and the not-live variants of the share sentence.
- Hand-rolled spacing and opacity in DELETE_CSS use raw .5rem and .5 where tokens exist (principle 3). Use the space tokens with no fallback literal, and reuse the existing disabled look if the design system has one.
- The new test covers only the happy path of the page. Add the page-level check the box asks for: a wrong name posted to /traces/<id>/delete keeps the session and says why, and a cross-origin post is 403. Do not rely on the earlier tests unless they post to this form.
- The inert state is only a CSS :has rule plus pattern. Say in docs/features/traces.md that without CSS the pattern still blocks the submit in the browser and the server checks again, so the claim is exact.
ApprovedEarlier asks: (1) warning text is two short sentences, one share sentence: met. (2) DELETE_CSS is gone and the form uses the shared .stack: met, and a better answer than swapping tokens. (3) a test posts the page's own form, wrong name and cross-origin: met. (4) docs now say the pattern is what stops the submit: met. The control is a closed details, so nothing shifts on first paint, and it is a plain post form that works with JavaScript off. Title is escaped in the markup and the pattern is escaped separately. The server re-checks the title. Two things I would do next, both non-blocking: Non-blocking: try a title with a leading or trailing space or a character like & or - in a real browser, since the pattern is matched in v-mode and I only read it, not ran it there. Non-blocking: the Delete button has no dimmed look until the title matches, so the 'inert' wording in the issue is met only by the browser's own refusal; add a visible hint under the input if people miss why it will not submit.
-
Checks
shipped production is serving it deploy 55693b7
-
History
- The Delete's warning is two sentences, its form uses the shared stack, and the page's own form is tested wrong-name and cross-origin (#18389) b221fea
- An imported session's Delete opens from a details, says what is lost, and stays inert until the title matches (#18389) 38d74b5
- Access 3, terminal and games: SSH screens and game grants ask may() in shadow (#18412) fea5438
- A person deletes one of their imported sessions from its page, by typing its name (#18371) 3d2fa7b
- An imported session is deleted through the API by its owner who sends its exact title (#18390) 2c0a8b8
- Access 3, MCP: the scope floor is read from the disagreement count, then deleted (#18418) e374d6c
- A pull that adds a migration runs test/data-browser.test.ts in its fast tier (#18419) 105485a
- Access 3b, web pages: the remaining admin gates (a local user?.isAdmin, isAdmin !== true || agent) ask adminPage beside them (#18413) b9d6e88
- A new inline isAdmin check in a moved door fails the gate (#18410) e472288
- Access 3, infrastructure and clouds: the admin-only routes ask may() in shadow (#18409) 7855bb1
- Full suite red: test/data-browser.test.ts (#18411) 7f3333e
- Sentinel: backup was degraded 14 minutes today: The last restore drill 2026-12-06 failed at restore. The backup check last ran 2026-12-06T09:25:52.363Z (1 min ago); 39… (#18407) 24f4503
- A tab-forge read-only link can be revoked by the person who made it (#18402) bfd96cb
- Access 3, web pages: every page that gates on isAdmin or sign-in also asks may(), counted beside the old check (#18400) 8f27ed4
- 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
An imported session's page now has a red Delete that opens from a closed details, tells the owner what is lost, and stays inert until the title matches. The delete route and form were already on main (#18371). This pull reshapes the form and adds the missing pieces.
I ran the delete tests, tsc, the design lint, the gate and the dup-imports and page-budget tests, all green. The full fast-tier test run timed out in my sandbox, so I didn't see it finish. I never started the app, so none of this has been tried in a browser.
What changed (src/web/pages/trace_imported.ts, test/trace-delete.test.ts, docs/features/traces.md, docs/design/areas/traces.md):
- Control: it is a
detailsclosed on first paint, so nothing shifts and no script is needed. It shows only for the importer of an imported trace. - Warning: the text says the file and its rows go for good and can only be re-imported from the original. It also says a live share link must be stopped first, and says so explicitly when one is live.
- Inert button: the input carries a
patternmade from the escaped title. A small:has(:not(:valid))CSS rule also dims the button until it matches. - Server side: it still checks the title again with the API's remover,
deleteImported. A wrong title redirects back with the reason, and a right one lands on/traceswith the "Removed … (N bytes freed)" receipt. - Test: a new test covers a title full of regex characters, the warning text, no control on a crew run's page, and the right name removing it. The earlier tests already cover a wrong title, a cross-site post (403) and the list dropping the session.
Left out:
- No undo.
- No terminal change, because the Traces list's
Xalready deletes (#18371). The commit saysNo door:for that. - No
Looks:page, because the page needs a login and an import. The commit saysNo look:for that.
Reused: deleteImported, deletedWords, SHARED_WORDS, readForm and flashTo. I added no new function except the small titlePattern.
To try it: on the preview, import a session, open /traces/<id>, and open "Delete this session". Type a wrong title and the button is dimmed and does nothing. Type the exact title and it removes the session and lands on /traces with the receipt.
[
{"go":"/traces/<id> of an imported session you imported","look":"A small red 'Delete this session' summary under the facts; the page does not jump when it opens","expect":"Opening it shows what is lost, the shared-link note, the title in bold and a dimmed Delete"},
{"go":"type a wrong title, then press Delete","look":"The button","expect":"It does nothing; nothing is removed"},
{"go":"type the exact title and press Delete","look":"/traces","expect":"A receipt line naming the session and its bytes; the list no longer shows it"},
{"go":"/traces/<id> of a crew run","look":"Under the facts","expect":"No Delete control"}
]I took all four review points, with two departures from what juniper asked (points 2 and 4). I pushed to the same branch. tsc, the design lint, the gate, and the page-budget, dup-imports and delete tests all pass. I didn't re-run the whole fast tier, and I haven't tried the page on a preview.
- Warning text: it is now two short sentences. The first says the file and steps are removed for good and only re-importing the original brings them back. The second says a live share link must be stopped first. There is one share sentence, not one per case.
- CSS, differently from asked: I deleted
DELETE_CSSentirely instead of switching it to tokens. The design system has no space tokens, so there was nothing to swap in. The form now uses the shared.stackclass. I also dropped the dimmed look. The only existing disabled look,.btn[aria-disabled], needs a script to set it. A CSS-only copy would repeat the literal opacity you flagged and putpointer-events: noneon the button, which you asked to keep reachable by keyboard. The input'spatternis what stops the submit, and the browser says why through itstitle. This also drops the "stays dimmed" part of the issue's wording. - Test: a new test posts to this page's own form (
/traces/<id>/delete). A wrong name returns a 303 back to the page, the session stays, and the page shows "That is not the session's title: nothing was removed." A cross-origin post is a 403 and the session stays. - Docs, differently from asked:
docs/features/traces.mdnow says the browser won't submit until thepatternmatches the title, that this holds without CSS or script, and that the server checks again. I removed the "inert button" claim from bothdocs/features/traces.mdanddocs/design/areas/traces.mdinstead of qualifying it. The design doc now says the form adds no new class.
I made no terminal change. The Traces list's X already deletes (#18371), and the commit carries No door: for it.
[
{"go":"/traces/<id> of an imported session you imported","look":"A closed 'Delete this session' summary; the page does not jump","expect":"Opening it shows two short sentences, the title in bold and a Delete button"},
{"go":"type a wrong title, press Delete","look":"The input","expect":"The browser refuses to submit and says the title must match exactly"},
{"go":"type the exact title, press Delete","look":"/traces","expect":"A receipt naming the session and its bytes; the list no longer shows it"}
]
An imported session's page now has a red Delete that opens from a closed
details, tells the owner what is lost, and stays inert until the title matches. The delete route and form were already on main (#18371). This pull reshapes the form and adds the missing pieces.I ran the delete tests,
tsc, the design lint, the gate and the dup-imports and page-budget tests, all green. The full fast-tier test run timed out in my sandbox, so I didn't see it finish. I never started the app, so none of this has been tried in a browser.What changed (
src/web/pages/trace_imported.ts,test/trace-delete.test.ts,docs/features/traces.md,docs/design/areas/traces.md):detailsclosed on first paint, so nothing shifts and no script is needed. It shows only for the importer of an imported trace.patternmade from the escaped title. A small:has(:not(:valid))CSS rule also dims the button until it matches.deleteImported. A wrong title redirects back with the reason, and a right one lands on/traceswith the "Removed … (N bytes freed)" receipt.Left out:
Xalready deletes (#18371). The commit saysNo door:for that.Looks:page, because the page needs a login and an import. The commit saysNo look:for that.Reused:
deleteImported,deletedWords,SHARED_WORDS,readFormandflashTo. I added no new function except the smalltitlePattern.To try it: on the preview, import a session, open
/traces/<id>, and open "Delete this session". Type a wrong title and the button is dimmed and does nothing. Type the exact title and it removes the session and lands on/traceswith the receipt.Closes #18389