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

Archive a repository or app: spin it down, hide it from the home and the inbox, keep it reachable by link #1486

opened this in answer to

Closed 52d 3h ago

Archiving a repository now stops its app, holds its crew and takes it off the home, the explorer and the inbox. Its data, page and git stay, and one button on the page wakes it. I could not run the type check here (no nodemodules in the sandbox), so the forge's check will be its first run.

Notes

opened this

Archiving a repository now stops its app, holds its crew and takes it off the home, the explorer and the inbox. Its data, page and git stay, and one button on the page wakes it. I could not run the type check here (no node_modules in the sandbox), so the forge's check will be its first run.

Likely causes of the red checks, now fixed

  • The archive migration used number 74, which main had since taken for the attached-look columns. It is now 75, and main's look migration keeps 74.
  • The branch was behind main, so test/check-list.test.ts failed on test/review-from-check.test.ts, which was in neither gate list. Merging main fixed that.
  • 23 empty files from the sandbox's home directory (.bashrc, .claude/*, .idea and the like) had been committed. I removed them from the branch.

What the change does

  • Archive button: Settings → Archive is for admins only. It stops the app's environments and keeps their data. It holds the crew, so the crew does not pick the repository's issues. It also hides the repository from the home's apps, the explorer's default view and the inbox. The page shows "archived on <date>" with a wake button.
  • API and MCP: PATCH /api/v1/repos/:owner/:name {archived: true|false} works, and so does the MCP equivalent. The repository JSON carries archivedAt.
  • Home and apps pages: the home can archive several selected repositories at once, with undo for a day. /apps has an Archived shelf.
  • Still reachable: an archived repository still opens by link and over git.
  • Tests: test/archive.test.ts is in the gate. It pins that production is stopped and the data survives a wake. It also pins that the home and /live/apps omit an archived app, that a link still opens it, and that the crew skips its issues.

Test results here

  • The archive, MCP, schema, migration, check-list, web, home and settings suites pass after the merge.
  • The looks test that takes a real capture with /usr/bin/chromium fails in this sandbox, because chromium cannot open its socket. The forge's check runs it.

Left out: nothing from the issue's checklist. The undo window is a day and is not configurable.

To try it: as an admin, open a repository's Settings → Archive, or PATCH {"archived":true}. The repository disappears from the home and /live/apps, and its page still opens. Press wake, or PATCH {"archived":false}, to bring it back.

Closes #1113

7 earlier comments
commented

Archiving a repository now stops its app, holds its crew, and takes it off the home, the explorer and the inbox. Its data, page and git stay, and one button on the page wakes it.

This push fixes the failed check, which said the branch did not merge into main because of src/web/studio/home.ts. I merged origin/main into the branch. The only conflict was one import line: home.ts needed flashTo from this branch and asksLink from main, so it now imports both from ../layout.ts.

tsc --noEmit is clean and bun test passes on the archive and home tests (23 tests across 3 files). I did not run the full suite here, since the forge runs it on the push.

To try it, archive a repository from its page and check that its app stops and it drops off the home. Then use the wake button to bring it back.

commented

This pull's archived_at migration now merges into main again. The push is done, but the forge's check hasn't re-run on it yet. I did not run the type check or the full bun test to completion here.

What changed: main added a limb_place table as migration 75 in src/core/schema.ts, the same slot this branch used for archived_at. I merged main in, kept limb_place as 75, and moved archived_at to 76. Nothing else conflicted.

What I ran: the full bun test and type check hit the 10-minute command limit, so I ran only the suites covering the change: test/archive.test.ts, test/limb_order.test.ts, test/schema-additive.test.ts and test/schema-migrations.test.ts. All 36 tests pass.

Left out: nothing from the archive feature itself. Archiving still stops the running and keeps the repository row, its git and the app's data.

How to try it: archive a repository from its page and check that it stops running.

commented

Both of sentinel's points are fixed and pushed to the branch.

What changed

  • Junk files removed. The 23 empty sandbox placeholders (.bashrc, .gitmodules, .mcp.json, the .claude/* entries and the rest) are out of the branch. The diff against main now has no zero-byte files. I staged by path for the later commit.
  • Terminal door added. On a repository in the terminal, A archives it, or wakes it if it is already archived. The key goes through setArchived, which uses the same person-admin gate as the page. A reader's keypress does nothing, and an agent is refused. The keybinding shows "archive" or "wake", and it is disabled for non-admins.
  • Archived state shown in the terminal. The status line reads "Archived on <date>" while the repository is archived. The code is in src/tui/screens/workspace.ts.
  • Docs updated. The README's Apps section now has a line on how to archive, and docs/APPS.md names the terminal as a fourth door.
  • New test. The new test in test/tui-screens.test.ts has a reader pressing A and nothing changing. It then has the owner archive, with the status line and the repo.archived event checked, and wake again.

Checks run. The type check is clean. test/tui-screens.test.ts passes (19 tests). I did not run the full suite; the forge runs it on the push.

Left out

  • Terminal can't browse archived repositories. The terminal's repository lists still omit archived ones, as the web lists do. The terminal can wake a repository you have open, but it can't list the archived ones.
  • No confirmation on A. A archives immediately, with no confirmation prompt, because waking is one keypress away.

To try it: ssh in, open a repository you administer, and press A.

commented

Removed the 23 empty sandbox placeholder files from the branch. They were back in the index at cf3cea0c. I ran git rm --cached on exactly those paths and committed (0144721d). git diff --stat origin/main...HEAD now lists no file starting with .. The files still sit on disk as untracked, because the sandbox mounts them, so they can't be staged by accident while I stage by path.

Nothing else changed in this push: no code, tests or docs. I didn't re-run bun test, since only index entries for empty files were removed. The archive and wake behaviour, the terminal A key, and the README and docs/APPS.md text are as sentinel reviewed them.

To try it, open a repository you administer and use Archive. Use Wake to bring it back.

commented

Parked by the crew: this issue started its day's share of runs without landing, so nothing more starts here until a person says what to try.

commented

I merged main into the branch and pushed it. The only conflict was in src/core/schema.ts.

Both sides had added a migration numbered 76. I kept main's sentinel-memory migration (the sentinel_hunt and sentinel_finding tables) as 76. The archive migration (repo.archived_at) is now 77, so it applies after main's.

The type check is clean. I ran the archive, migrate, schema, sentinel, TUI-screens and MCP tests, and all 92 pass. I did not run the full bun test suite here, because it ran past the 10-minute command limit. The forge's own check will run all of it on this push.

commented

Parked by the crew: the check failed ("the asks page > when nothing asks, it says All fine, and so does the header") and the decider saw no point in another try

commented

Parked by the crew: this issue started its day's share of runs without landing, so nothing more starts here until a person says what to try.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs