Repository navigation
Description
Part of #247. Implements spec §9's confirmation pages and §4's reassign; decisions the page mocks (off-card half) and Admin authority.
What to build
Four pages under the card's URL in packages/portal, each GET (the page) and POST (the act), one form on the shared confirmation component, the consequence in plain words, Cancel back to the card, the act's precondition as a hidden field with the 409 rule of ticket 8:
/retire: the live dependants ("office-map(Priya) readsorders") and the acknowledgement checkbox; with none, "Nothing else reads this patch" and no checkbox. Owner or admin./delete: from live, the list, the checkbox and the typed name; from retired, no list ("Its readers already lost access when it was retired"), the typed name and "This starts the 30-day clock"; the page says the reclaim date; a typed-name miss redisplays with "Typenameto confirm. Nothing was done." Owner or admin./restore: only reachable when the current version's sources are off (a GET with live sources redirects to the card); lists each source with its actual state (retired, deleted, gone) and says the patch will serve but error when it reads them until they are restored too; the acknowledgement. Owner or admin. When the sources are live the page redirects to the card, whose button posts directly./reassign: admins only, reachable from live, retired and deleted cards; the active members with a plain GET filter, never a deactivated user; the consequence ("Priya can publish, retire or delete it at once; you can reassign it again"); the expected current owner as the precondition; the POST re-checks the target is an active member of the company (else 409 with the picker) and treats the current owner as a no-op that stamps nothing. A member or a non-admin owner gets 403.
Each POST calls the Patches move with the actor and force set by the acknowledgement; a has_dependants or sources_off answer without the acknowledgement re-renders the page with the recomputed list (the list may have changed since the GET).
Admitted at merge
Every owner and admin act is reachable in the portal; the deactivation flow (ticket 10) still uses Companies' one-click buttons.
Done when
- Each page is tested for owner, admin and member; retire and delete with and without dependants; delete from retired's copy; the typed-name mismatch redisplaying; restore's redirect when sources are live and its list when not; reassign refusing a deactivated target and a stale owner; the acknowledgement mapping to
force.
Surfaces
Served pages (ui-consistency), reverse states (reassign is repeatable; retire and delete have Restore on the card), the Portal glossary (Confirmation page, Acknowledgement from decided to built), docs/product.md § Access to a patch (admins manage) from decided to built, the Patches glossary (Owner).
Activity
feat(portal): add lifecycle confirmation pages
feat(portal): add lifecycle confirmation pages