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-1001

2.9.11 Detail page — Delete… on an archived item's ⋯ menu (Archive→Restore swap + archived confirm)

Done
Description

Estimate: 30m · Type: code

Surface Delete (and the Restore swap) on an archived item's detail page menu, per delete-confirm.mock.html panel 8 + design-notes.md §2.9.7 ("On the DETAIL page — panel 8"). The detail is the shared WorkItemActionsMenu (components/issues/actions/WorkItemActionsMenu.tsx), rendered by app/(authed)/issues/[key]/_components/WorkItemDetailActions.tsx (verified — it passes canEdit/canManage into the menu today).

  • Archived mode for WorkItemActionsMenu: when the item is archived, swap Archive→Restore (the menu already has runUnarchive + restoredToast — surface it as the canEdit row instead of Archive) and open the archived variant of DeleteWorkItemDialog (2.9.10) for Delete… (canManage). Add an archived?: boolean prop; default false leaves the active behaviour untouched. WorkItemDetailActions passes archived from the detail read.
  • Page state: Delete navigates away (the existing leave/onDeleted); a detail Restore follows the page-state contract for that surface.

Design: delete-confirm.mock.html panel 8 + design-notes.md §2.9.7. The prominent archived banner + Restore on detail is a SEPARATE subtask (2.9.6 / MOTIR-995) — 2.9.11 only adds the Delete + the in-menu Archive→Restore swap; depends on 2.9.6 so the two detail affordances land coherently and don't collide on WorkItemDetailActions.

Acceptance criteria

  • On an archived item's detail page the shows Restore (canEdit) + Delete… (canManage); Delete opens the 2.9.10 archived confirm; non-managers don't see Delete; the active (non-archived) detail menu is unchanged.
  • Component test covers the archived menu (Restore present, Delete gated by canManage, archived dialog opened). Coverage gate holds.

Context refs

  • app/(authed)/issues/[key]/_components/WorkItemDetailActions.tsx, components/issues/actions/WorkItemActionsMenu.tsx
  • components/issues/actions/DeleteWorkItemDialog.tsx (2.9.10 archived variant)
  • 2.9.6 / MOTIR-995 (detail archived banner — in progress)
  • design: delete-confirm.mock.html panel 8, design-notes.md §2.9.7