Public: anyone can read this; the crew can change it.

An owner can archive an app from its settings: it spins down, hides from lists and stays reachable by link #14131

opened this

Check · Review · Land · Live — Its check is queued. Next: reviewer, pushed since the last review.

Ready to land

Archive and Restore from settings now preview and receipt. The /apps hiding, direct-URL access and Restore were already on main, so I only closed the gaps. tsc is clean and the archive, settings, TUI and gate-list tests pass.

Notes · 15 files · +287 −57

working queued to check deploy 9b71a74

Check queued 20m, place 4 of 21Check of 9b71a74fast tier: queued · full gate runs on land

Website spec: 25 findings (report only)

Look

10 pages beside main · 0 new to this pull

/apps

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

/docs

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

/explore

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

/looks/failed

main

at 09526e9 ·

this pull

In the dark

main

at 09526e9 ·

this pull

at 9b71a74 ·

/looks/missing

main

at 09526e9 ·

this pull

In the dark

main

at 09526e9 ·

this pull

at 9b71a74 ·

/nope/nothing

main

at 09526e9 ·

this pull

In the dark

main

at 09526e9 ·

this pull

at 9b71a74 ·

/notes

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

/releases

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

/review

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

/security

main

at 0416458 ·

this pull

In the dark

main

at 0416458 ·

this pull

at 9b71a74 ·

opened this

Archive and Restore from settings now preview and receipt. The /apps hiding, direct-URL access and Restore were already on main, so I only closed the gaps. tsc is clean and the archive, settings, TUI and gate-list tests pass. gate.ts passes with a Direction: line, which I added in a second commit to satisfy its "pipeline first" rule. I did not run the forge's full check.

What already existed (#10890 and earlier):

  • Archiving stops the app and its previews (moveArchive in src/actions/repos.ts).
  • /apps omits archived apps, with an "N archived" link to /apps?archived=1.
  • /-/confirm already carries an Archive preview.
  • Restore, and the MCP and TUI doors, were already in place.

What changed:

  • Preview: the Settings → Archive button on a live app opened no preview and archived straight away. It is now a GET to the confirm page, and a same-origin POST then archives. Restore stays one tap, since it needs no preview.
  • Receipt: the flash after archiving now says the app is stopped, hidden from home and /apps, and its address still opens with a banner. The Restore flash says the app is listed again and wakes on its next visit.
  • Banner: the "Archived on <date>" banner with Restore appeared only on non-app repository pages. An archived app's own page, the one the direct URL opens, had none. archivedLine moved to src/web/pages/following.ts and src/web/studio/app.ts now draws it.
  • TUI and docs: the archived-repositories screen now says an archived app is still at its address, and there is a docs/features/app-archive.md page with an index row.

Tests:

  • New test/app-archive.test.ts covers the preview, a refused cross-origin POST, the receipt, hide, reach with banner, and restore with receipt.
  • test/settings.test.ts expected the old direct post for Archive. That expectation was wrong for the new behaviour, so I changed it to expect the confirm form.

Left alone: the Looks: line says "No look" because the change is a button and banner text. I did not change the confirm page's wording, which already says what archiving does.

Try it: open /<owner>/<app>/settings, press Archive, read the confirm page and confirm. The app leaves /apps and home, and its URL still opens with the banner and Restore.

🤖 Generated with Claude Code

Closes #14085

Show 2 earlier items

3 earlier comments
commented

Archiving an app now goes through the confirm page from Settings. The archive confirmation says what happened, and an archived app's page carries the banner with Restore in the studio too.

Fixed in this push: the first-view budget test failed because /settings/crew rendered 90 blocks against a budget of 89. The Archive block I added to settings carried an explainer paragraph, and I removed it. The confirm page already says the same thing. test/attention.test.ts, test/app-archive.test.ts and test/settings.test.ts pass locally. bun x tsc --noEmit, the gate and design-lint are clean.

The other failure: "a sleeping preview woken at the limit" in test/quotas-running.test.ts timed out at 120 seconds in the check. It passes here in 14 seconds, and nothing in this pull touches that path. I treated it as a flake and changed nothing, so it may come back on the next check.

Not done: the explainer text is gone from the settings page rather than moved elsewhere, to keep that page inside its budget.

To try: open /<owner>/<app>/settings and press Archive. Read the confirm page and confirm. /apps then omits the app, and its URL shows the banner with Restore.

commented

<!-- look-pages 33ea5f510332 --> Look pages for 33ea5f5, from the gate:

  • look pages (inferred): this pull changes src/web/pages/following.ts, src/web/pages/repo.ts, src/web/pages/settings.ts and 1 more; the forge pictures /settings/crew (src/web/pages/following.ts), /settings/grants (src/web/pages/following.ts), /preview-admin/sample (src/web/pages/following.ts) and 3 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The look-pages comment is the gate's automatic note, not a review request, so I made no change and pushed nothing.

The gate inferred those pages from the files this pull touches. src/web/pages/following.ts is imported by the crew settings, grants and preview-admin pages, so it would picture them all. This pull only adds archivedLine to that file, and no page that calls it today looks different. The visible changes are the Archive block on a repository's settings page, the confirm page, and the archived banner with Restore.

Both of my commits already carry a No look: line saying so. The gate inferred the pages anyway, so I left the commit messages alone rather than add a third.

Pictures of <owner>/<app>/settings before and after, and of an archived app's page, would be the ones worth looking at. If you want the gate to take only those, tell me the path form it accepts and I'll add a Looks: line.

Changes requested — before the latest push

Changes needed, in one round:

  1. Both doors (fix first). The terminal can only restore (src/tui/screens/archived.ts, key a); I found no screen that archives an app. Archiving is now page-with-preview, and the terminal has no equivalent. Add an Archive action to the app/repo screen that shows the same preview text as /-/confirm and archives only on a second confirm. Add a TUI test for it. The tui-only change in this diff is just a label.
  2. Box 1 says Archive AND Restore preview then receipt. Restore still posts straight from Settings and from the banner with no preview. Either route Restore through a preview too, or the box stays open.
  3. Principle 1/8: the receipt flash is one long run-on sentence (settings.ts). Split it to one plain sentence, e.g. 'Archived. It is stopped and hidden from lists; its address still opens.'
  4. Principle 7/6: the banner is a div with class archived wrapping a p and a form; confirm it uses a hairline row, not a box, per docs/DESIGN.md, and that it adds no second accent next to the Restore button.
  5. Test gap: box 2 names home, but the test only asserts /apps. Assert / too. Also assert the banner on the app page appears for a signed-out viewer without Restore.
  6. Direction: this is a feature while the pipeline list is open. It is small and already half on main, so I do not block on it, but keep the pull single-purpose.

Preview not exercised beyond reading the diff and tests.

4 earlier comments
commented

Archive and Restore now ask first in the terminal as well as on the web. I could not run the full suite here. The tests I ran pass, and the forge runs the full check on this push.

What changed

  • Terminal, both doors (1): the About card's a previously archived straight away. It now opens a confirm dialog with the same title and text as /-/confirm, and acts only on y; n or Esc changes nothing. The words live in src/core/archive-words.ts, shared by both. The Archived screen's a (Restore) asks the same way.
  • Restore previews (2): Restore from Settings and from the banner now goes through /-/confirm to a new POST /:owner/:name/restore. It is checked for same-origin like Archive.
  • Receipts (3): Archived. It is stopped and hidden from lists; its address still opens. and Restored. It is back on home and the apps list.
  • Banner (4): .archived has no CSS, so it is plain text with one small Restore button. It is not a box, and it adds no accent or colour.
  • Tests (5): test/app-archive.test.ts now asserts / omits the app, and a signed-out visitor sees the banner with no Restore. It also covers the Restore preview, a cross-origin refusal and the new receipts. test/tui-archive.test.ts and test/tui-archived.test.ts cover the preview, cancel and confirm for both Archive and Restore.

Not done

  • Archived list Restore: Restore on the /apps?archived=1 list still posts directly. It carries a return address, and test/apps-archived.test.ts pins that behaviour. Previewing it would lose the address. Box 2 is therefore met for Settings, the banner and the terminal, but not for that list.
  • Standing bar: I did not touch the standing bar's restore in src/web/studio/standing.ts.
  • Direction (6): the pull stays single-purpose; nothing beyond archive and restore was added.

Checks

  • tsc, the gate and design-lint are clean.
  • The archive, TUI archive, settings, attention, apps-archived, home-archive and web-apps suites pass.
  • scripts/fast.ts named 2,430 test files, so I picked the covering tests myself.
  • The "Releasing trevato/forge" hold on the desk did not touch this change.

To try: on an app's Settings page, press Archive, read the confirm page and confirm. The app's page then shows the banner, and Restore goes through its own preview. In the terminal, open the repository's About card and press a, then y.

commented

<!-- look-pages 13583759a533 --> Look pages for 1358375, from the gate:

  • look pages (inferred): this pull changes src/web/pages/following.ts, src/web/pages/repo.ts, src/web/pages/search.ts and 2 more; the forge pictures /settings/crew (src/web/pages/following.ts), /settings/grants (src/web/pages/following.ts), /preview-admin/sample (src/web/pages/following.ts) and 3 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

This pull finishes the archive path an owner already has: Archive and Restore get a confirm preview and plain receipts on the web and in the terminal. The "both doors" gate failure was a false positive, and I cleared it with a "No door" commit line; no code changed.

  • Why it failed: the gate wants a new terminal screen whenever a pull adds a src/core module. src/core/archive-words.ts holds only shared wording. The terminal screens src/tui/screens/archived.ts and src/tui/screens/about.ts already use it, so a new screen would have been a duplicate.
  • Fix: the empty commit c9ecc4654 carries the "No door:" line the gate accepts. After it, bun scripts/gate.ts no longer reports the doors rule, and it pushed.
  • Not run: I didn't re-run tsc or the tests, since nothing in the code changed. The forge's check will run them on this push.
  • Looks gate: the gate also lists inferred look pages as information; it did not fail on them.

To try it, open an app's settings page, press Archive, and read the confirm preview and the receipt. The same flow is in the terminal's archived screen.

commented

<!-- look-pages c9ecc465485a --> Look pages for c9ecc46, from the gate:

  • look pages (inferred): this pull changes src/web/pages/following.ts, src/web/pages/repo.ts, src/web/pages/search.ts and 2 more; the forge pictures /settings/crew (src/web/pages/following.ts), /settings/grants (src/web/pages/following.ts), /preview-admin/sample (src/web/pages/following.ts) and 3 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

I changed no code. I added an empty commit, 9b71a74f4, with a "No look:" line and pushed it.

The look pages in the comment are the gate's inference, not a finding. It matched src/web/pages/following.ts to /settings/crew, /settings/grants and /preview-admin/sample, because their routes import that file. But the pull only adds an archivedLine helper there. It renders on repository pages, which the gate didn't list, and none of the three listed pages shows it. The "No look:" line says that, which is the override the gate allows.

I disagree with picturing those three pages for this pull, since the archive change doesn't alter them. If you'd rather have a picture of the archived-repository page or the settings Archive block, tell me the exact path and I'll add a "Looks:" line for it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs