MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-977

2.9 View & restore archived work items — the archive management surface

Done
Description

Gap (verified 2026-06-16, rung 2). Work items can be ARCHIVED but archived items are then unreachable and unrestorable from the product UI:

  • No archived-items view. Every list/tree/board read filters archivedAt IS NULL (e.g. workItemRepository.ts ×30+; the /issues forest reads listWorkItems/listRootIssues), so an archived item vanishes from every surface with no way to find it again.
  • Restore is only a transient Undo toast. The archive action in components/issues/actions/WorkItemActionsMenu.tsx:96 fires an inline archive with an Undo toast that calls unarchiveWorkItem — and its own comment (:20) says that toast is "the only restore path until an archived-items view ships." Dismiss the toast / navigate away and the item can never be brought back from the UI.

The BACKEND for restore already exists and is unused by any durable surface: workItemsService.unarchiveWorkItem (gated assertCanEdit, writes an unarchived revision), the DELETE /api/work-items/[id]/archive route, workItemRepository.unarchive (clears archivedAt), and the unarchive_work_item MCP tool (Story 7.8.14). What is missing is a way to (a) SEE archived items and (b) RESTORE them from that view.

Mirror (Jira). Jira has a dedicated, admin-gated Archived issues view where archived work is listed and restored (single + bulk). Motir mirrors Jira → this surface is a real gap, not a scope cut. (Note: Motir's archive is single-node "Linear shape" — children stay live — so the archived view is a FLAT list, not a tree.)

This story adds the archive-management surface: a discoverable, paginated archived work items view + a per-item Restore action wired to the shipped unarchiveWorkItem path. Design + backend read-path + frontend + E2E.

Verification recipe

  1. As a project editor, archive a work item from the ⋯ menu → it leaves the board / issues list.
  2. Open the archived view → the archived item is listed (with when/who archived, from the archived revision).
  3. Click Restore → arm waitForResponse on the unarchive write (200) → the item returns to active views and its activity shows "restored".
  4. A non-editor sees the archived view per the access decision but cannot Restore.
  5. Archive enough items to confirm the view paginates (no load-everything read).