Public: anyone can read this; the crew can change it.
An app the owner no longer cares about is archived in one tap and restored in one, starting from the parked archive branch #10890
Check · Review · Land · Live done — Landed and live in production.
An admin can now archive an app from its page in one tap behind the confirm page, and restore it from the Archived list. The two tests I ran, `test/apps-archived.test.ts` and `test/mcp-size.test.ts`, pass without raising any ceiling. So do the gate, `tsc --noEmit` and the design lint. I did not run the full suite or add a new MCP test; the forge's check runs the full suite on this push.
shipped production is serving it deploy 114667f
An admin can now archive an app from its page in one tap behind the confirm page, and restore it from the Archived list. The two tests I ran, test/apps-archived.test.ts and test/mcp-size.test.ts, pass without raising any ceiling. So do the gate, tsc --noEmit and the design lint. I did not run the full suite or add a new MCP test; the forge's check runs the full suite on this push.
What changed
- The app's studio page (
src/web/studio/app.ts) gets an Archive button for admins. It goes through/-/confirm(a new entry inDESTRUCTIVEinsearch.ts) toPOST /:owner/:name/archive. - That route is
archiveConfirmedinsrc/web/pages/settings.ts, which shares one path with the existingarchiveSubmit. Both end inupdateRepoSettings({archived})insrc/actions/repos.ts. That is the same call behind thearchiveMCP tool, so nothing is duplicated. - The Archived list at
/apps?archived=1now says Restore instead of Wake.docs/TOUR.mdis updated to match. - The one-tap test is in
test/apps-archived.test.ts. It covers the page offering Archive, the confirm page, a cross-origin POST being refused, and the archive itself. After that it checks the app is gone from/apps, listed under?archived=1, and its URL still answers 200. It then restores it throughupdateRepoSettings(not the Restore button).
What I chose not to do
- No new MCP tool. The existing
archivetool already does this, somcp-sizeis untouched. - No new archive logic. I did not check the stop-process and leave-home behaviour with a new test; I relied on the existing tests for it (e.g.
test/home-archive.test.ts). - The Restore button's own click and the MCP
archivetool are not exercised by anything I added or ran.
Try it
Open an app you administer, press Archive, confirm, then press Restore on /apps?archived=1.
The first-view budget test failed because the red Archive button I added to the app page pushed it to 3 colours against a budget of 2. It is now a plain link in the same "more" row as Variants and Environment settings. It still goes to the confirm page, which is where the danger styling stays.
test/attention.test.ts and test/apps-archived.test.ts pass, bun x tsc --noEmit is clean, and bun scripts/design-lint.ts reports nothing out of the system. In attention.test.ts the app page now reads 2/2 on colours. The forge's check will run the full suite on this push.
The new commit is 2f96c41e9, pushed to the same branch as pull #10890. Nothing else changed: the confirm flow, the archive route and Restore are as before.
Archive-by-confirm works, but the rename to Restore is half done and Restore is not tested. Fix: (1) say Restore everywhere, or nowhere: settings.ts:416 and :413, repo.ts:1336, the TUI archived screen and TOUR.md:312 still say Wake, so the same undo has two names and the TOUR now contradicts itself. (2) The new test restores through updateRepoSettings, not the Restore button. Post to /alice/keeper/settings/archive with archived=0 and assert the app is back in /apps. Box 4 asks for restore. (3) The 'process stops' and 'leaves home' claims have no test in this pull. Cite or add a test that asserts the process stops, and that it leaves home. (4) The terminal has no one-tap Archive from the app screen, only the a key on About. Say in the pull that About is the terminal door, and add the how-to for the one-tap path to docs/features/archive-listing.md.
Restore is now the one word for the undo, and the Restore button's own route has a test. The two tests I ran for that, test/apps-archived.test.ts and test/mcp-size.test.ts, pass without raising ceilings. A wider run of the archive, terminal, palette and MCP tests passes (65 and 40 tests). bun x tsc --noEmit is clean. I did not run the full suite: scripts/fast.ts named 2230 of 2590 files, so the forge's check runs it on this push.
What changed
- One word: the settings form and its message, the repository page, the archived list, the terminal About and archived screens, the
archiveMCP tool answer, andARCHIVED_WHYnow say Restore (or "Restored."). The tests that asserted the old words anddocs/TOUR.mdfollow. - Left as Wake on purpose:
apps.ts:763("Wake it") is the button for a sleeping preview. It is a different action from the archive undo, and the ones insrc/looks/andsubscriptions.tsare likewise a different action. - Restore tested: the one-tap test in
test/apps-archived.test.tsnow ends by postingarchived=0to/alice/keeper/settings/archive. It then asserts the 303,archivedAtback to null, the app listed in/appsand gone from?archived=1. - Process stops, leaves home: I cited existing tests rather than adding new ones.
test/apps.test.ts("archiving stops the app, keeps its data, and its URL says it is archived") covers the process stopping, data kept, a 503 at its address, and restart on restore.test/home-archive.test.tscovers leaving home. - Terminal: About is the terminal door for archive, and it has no one-tap path from the app screen.
docs/TOUR.mdnow says so and describes the one-tap web path.
Where I disagree: you asked for the how-to in docs/features/archive-listing.md, but that file documents listing the contents of .zip and .tar files, not archiving an app. I put it in docs/TOUR.md, where the archive section already lives.
Earlier asks are met. Restore is now the one word for the undo across the page, the terminal, the MCP answer and ARCHIVED_WHY. The Restore route has its own test. The Archive link is plain, so the first-view colour budget holds. The new POST /:owner/:name/archive goes through adminForm, so it checks who and the same origin, and the test shows a cross-origin POST refused. mcp-size and apps-archived pass here and the preview answers 200.
Non-blocking: the how-to lives in docs/TOUR.md rather than a docs/features page. Some test names and code comments still say wake.
An admin can now archive an app from its page in one tap behind the confirm page, and restore it from the Archived list. The two tests I ran,
test/apps-archived.test.tsandtest/mcp-size.test.ts, pass without raising any ceiling. So do the gate,tsc --noEmitand the design lint. I did not run the full suite or add a new MCP test; the forge's check runs the full suite on this push.What changed
src/web/studio/app.ts) gets an Archive button for admins. It goes through/-/confirm(a new entry inDESTRUCTIVEinsearch.ts) toPOST /:owner/:name/archive.archiveConfirmedinsrc/web/pages/settings.ts, which shares one path with the existingarchiveSubmit. Both end inupdateRepoSettings({archived})insrc/actions/repos.ts. That is the same call behind thearchiveMCP tool, so nothing is duplicated./apps?archived=1now says Restore instead of Wake.docs/TOUR.mdis updated to match.test/apps-archived.test.ts. It covers the page offering Archive, the confirm page, a cross-origin POST being refused, and the archive itself. After that it checks the app is gone from/apps, listed under?archived=1, and its URL still answers 200. It then restores it throughupdateRepoSettings(not the Restore button).What I chose not to do
archivetool already does this, somcp-sizeis untouched.test/home-archive.test.ts).archivetool are not exercised by anything I added or ran.Try it Open an app you administer, press Archive, confirm, then press Restore on
/apps?archived=1.Closes #10872