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 #10885
An admin can now archive an app from its page in one tap plus a confirm, and Restore it from the Archived list. Most of what the issue asks for was already on main. I did not run the whole suite.
stopped closed without shipping deploy a592008
An admin can now archive an app from its page in one tap plus a confirm, and Restore it from the Archived list. Most of what the issue asks for was already on main. I did not run the whole suite.
I couldn't use the parked branch mason/10779-archive-an-app-from-its-page-or-the-apps: it isn't on the remote, so I worked from main.
What was already there
- Archiving stops production and previews through the runtime's stop, and keeps data and git.
- The archived app leaves home and
/apps. /apps?archived=1lists archived apps, each with a per-row button that wakes the app.- An archived app's URL still answers:
/<owner>/<name>returns 200, and the app's own hostname returns a 503 "archived" page. - Waking restarts production.
- The
archiveMCP tool already callssetArchivedinsrc/actions/repos.ts. I did not touch the MCP, so there are no new tools or ceilings, andtest/mcp-size.test.tspasses.
What I added
- Archive on the app's page:
src/web/studio/app.tsshows an Archive button to the app's admin. It goes through/-/confirm, with wording registered insrc/web/pages/search.ts. - New route:
POST /:owner/:name/archiveinsrc/http/server.tsalways archives. It reusesarchiveSubmitthrough a sharedarchiveWithinsrc/web/pages/settings.ts, so the same-origin check, the admin gate andupdateRepoSettingsare unchanged. - Restore label: the buttons on the Archived list now say "Restore" instead of "Wake". I changed one assertion in
test/apps-archived.test.tsto match the new label; the old assertion was only wrong about wording. - New test: the one-tap flow gets a test in
test/apps-archived.test.ts. It checks that the confirm page is offered, that a cross-origin POST is refused, that archiving hides the app from/appsand shows it at?archived=1, that the app's page still answers, and that restoring brings it back.
What I left alone
- The Wake button on the repository page and in Settings keeps its "Wake" label, because
test/archive-web.test.tsasserts it.
Checks run: bun x tsc --noEmit is clean, as are scripts/gate.ts and scripts/design-lint.ts. I ran the tests for archive, confirm and MCP size, and they pass. scripts/fast.ts found the diff too broad to name tests, so I picked the ones above.
To try it: open an app you administer, press Archive and confirm. The app leaves /apps. Open /apps?archived=1 and press Restore.
Declined: there is nothing to fix. The preview deploy of #10885 did not fail. Its summary is "running at https://lab--10885--forge-trevato-apps.open-platform.sh · no tests declared, none run". That is the success line the forge writes when forge.json has no app.test (NO_TESTS_TAIL in src/apps/runtime.ts:210). I checked /healthz on the preview and it returns 200. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m731f7k14mv69fqjmx5ck5x7
An admin can now archive an app from its page in one tap plus a confirm, and Restore it from the Archived list. Most of what the issue asks for was already on main. I did not run the whole suite.
I couldn't use the parked branch
mason/10779-archive-an-app-from-its-page-or-the-apps: it isn't on the remote, so I worked from main.What was already there
/apps./apps?archived=1lists archived apps, each with a per-row button that wakes the app./<owner>/<name>returns 200, and the app's own hostname returns a 503 "archived" page.archiveMCP tool already callssetArchivedinsrc/actions/repos.ts. I did not touch the MCP, so there are no new tools or ceilings, andtest/mcp-size.test.tspasses.What I added
src/web/studio/app.tsshows an Archive button to the app's admin. It goes through/-/confirm, with wording registered insrc/web/pages/search.ts.POST /:owner/:name/archiveinsrc/http/server.tsalways archives. It reusesarchiveSubmitthrough a sharedarchiveWithinsrc/web/pages/settings.ts, so the same-origin check, the admin gate andupdateRepoSettingsare unchanged.test/apps-archived.test.tsto match the new label; the old assertion was only wrong about wording.test/apps-archived.test.ts. It checks that the confirm page is offered, that a cross-origin POST is refused, that archiving hides the app from/appsand shows it at?archived=1, that the app's page still answers, and that restoring brings it back.What I left alone
test/archive-web.test.tsasserts it.Checks run:
bun x tsc --noEmitis clean, as arescripts/gate.tsandscripts/design-lint.ts. I ran the tests for archive, confirm and MCP size, and they pass.scripts/fast.tsfound the diff too broad to name tests, so I picked the ones above.To try it: open an app you administer, press Archive and confirm. The app leaves
/apps. Open/apps?archived=1and press Restore.Closes #10872