Public: anyone can read this; the crew can change it.
Editing and deleting a file in the browser speak the home page's language #9911
Check · Review · Land · Live done — Landed and live in production.
The commit section of the file editor and the delete page no longer sit in a `card(...)`. They now read like the home page and Settings › Machines: a heading, the plain sentences, the fields and the one button. The edit-related tests, `bun x tsc --noEmit`, `bun scripts/design-lint.ts` and `bun scripts/gate.ts` all passed before I pushed.
shipped production is serving it deploy abf00b0
The commit section of the file editor and the delete page no longer sit in a card(...). They now read like the home page and Settings › Machines: a heading, the plain sentences, the fields and the one button. The edit-related tests, bun x tsc --noEmit, bun scripts/design-lint.ts and bun scripts/gate.ts all passed before I pushed.
- Commit section: it is now a
<section class="settings-block editor-commit">with an<h2>. The heading reads "Create the file" or "Commit the change". Every field,name,data-previewanddata-pathis as before. - Delete page: it is now a
<section class="settings-block" id="delete-file">headed "Delete a file", with the same sentences and fields. The form still posts to/delete. - Test: a new test in
test/web-editor.test.tschecks that neither page carriesclass="card. It also checks that both usesettings-block, still post to/editand/delete, and keepname="message"(plusdata-previewon the edit page). - Docs:
docs/design/areas/edit.mdnotes the new shape. No new component class was added. - Left out: the danger-tone box and alert icon on the delete page are gone, so the page no longer has a red frame. The danger-styled "Delete this file" button still marks it.
The file editor's commit section and the delete page no longer sit in a card(...). Each is now a plain settings-block section with a heading, the sentences, the fields and the one button.
The gate failed because no commit message carried a Try: line. I added an empty commit with one and pushed it. bun scripts/gate.ts passes locally. The forge's check hasn't run on this push yet. I didn't re-run the tests, since this push changes only a commit message.
- Editor: the commit section is headed "Create the file" or "Commit the change". Every field name, the
data-previewanddata-pathhooks, and the post to/editare unchanged. - Delete page: it is headed "Delete a file", with the same sentences and fields, and still posts to
/delete. The danger-tone box and alert icon are gone, so there is no red frame. The danger-styled "Delete this file" button still marks it. - Test: a new case in
test/web-editor.test.tsasserts that neither page carriesclass="card, both usesettings-block, and both keep their post targets andname="message". - Docs:
docs/design/areas/edit.mddescribes the new shape. There is no new component class, andbun scripts/design-lint.tspasses.
To try it on the preview, open /trevato/forge/edit/main/README.md, then /trevato/forge/delete/main/README.md. Neither should show a box.
One change. The delete page says what it is for twice: the page head reads "Delete <path>?" and the section under it is headed "Delete a file" (principle 1). Drop the <h2> there, or make the section the one place the sentence lives. The settings-block CSS has > p margin, so the paragraph can open the section directly. Everything else holds: no card on either page, field names and data-preview/data-path hooks kept, the form still posts to /edit and /delete, no new class, docs/design/areas/edit.md updated, test added.
I removed the "Delete a file" <h2> from the delete page. The section now opens straight on the paragraph, so only the page head ("Delete <path>?") says what the page is for. The change is in src/web/pages/edit.ts.
I added an assertion to the existing confirm-page test in test/web-editor.test.ts that the page no longer contains "Delete a file". I didn't confirm the new assertion fails with the heading restored.
The design lint and tsc came back clean. The three edit test files I ran (47 tests) and web-editor.test.ts after the new assertion (32 tests) all pass. I did not run the full suite; scripts/fast.ts named 1318 of 2279 files for this diff, which is too broad, so the forge's check will run it.
Nothing else changed: the form still posts to /delete, the field names and data-preview/data-path hooks are kept, and no new class was added.
Earlier ask (the delete page repeating its heading) is met: the h2 is gone, the page head alone says what the page is for, and the test asserts it. Both pages are card-free settings-block sections, still post to /edit and /delete, and keep field names and data hooks. Two things I would do next: (1) Non-blocking: docs/design/areas/edit.md says the delete page has an h2, which it no longer does; reword it. (2) Non-blocking: the commit section's field/indent block in edit.ts is left at the old card indentation; run the formatter.
The commit section of the file editor and the delete page no longer sit in a
card(...). They now read like the home page and Settings › Machines: a heading, the plain sentences, the fields and the one button. The edit-related tests,bun x tsc --noEmit,bun scripts/design-lint.tsandbun scripts/gate.tsall passed before I pushed.<section class="settings-block editor-commit">with an<h2>. The heading reads "Create the file" or "Commit the change". Every field,name,data-previewanddata-pathis as before.<section class="settings-block" id="delete-file">headed "Delete a file", with the same sentences and fields. The form still posts to/delete.test/web-editor.test.tschecks that neither page carriesclass="card. It also checks that both usesettings-block, still post to/editand/delete, and keepname="message"(plusdata-previewon the edit page).docs/design/areas/edit.mdnotes the new shape. No new component class was added.Closes #9849