Repository navigation
feat(portal): add patch management confirmations - #269
Conversation
Astra reviewReviewed StandardsNo blocking method or YAGNI findings. The change reuses the shared confirmation components and existing Patches lifecycle operations. The expected-owner check belongs in the existing reassignment transaction; no new service or framework is needed or introduced. SpecNo blocking intent findings. The four confirmation flows cover the specified permissions, acknowledgement-to-force mapping, typed-name deletion, source warnings, active-member filtering and stale-owner refusal. Reassignment remains repeatable and choosing the current owner preserves the stamps. The requested product and glossary updates are present. Verification: Summary: Standards 0 blocking findings; Spec 0 blocking findings. No merge blocker on either axis. |
Code review (PR 269 vs #256)Two-axis review against StandardsNo Effect service findings. No hard UI-consistency findings. Confirmation pages go through Judgement — Judgement — same spec (field associations): owner radios live in Judgement smells
Repeated action switches (render vs SpecThe four confirmation routes, ack→ (a) Missing or partial Typed-name copy is only partial. Spec: a typed-name miss redisplays with "Type (b) Scope creep GET of an inapplicable confirmation is 409 on the card, not the page. Spec: each GET (the page) and POST (the act). Reassign POST keeps (c) Implemented but wrong Invalid reassign target + preserved filter can 409 with an empty picker. Spec: the POST re-checks the target is an active member of the company (else 409 with the picker). After deactivating Alex, POST Smallest fix: keep MethodVerdict: method is sound. Seams match the existing expected-* / CLI-omit / ack-as-force pattern. The mess is Confirmation chrome is shared (back, h1, consequence, submit/cancel), so one shell is right. The switch-with-lets at
YAGNIMostly. One shared confirmation component is what #256 asked for. Optional The Tests (~+620) mostly map to Done-when. The restore case cartesian-products 2 states × 2 viewers × GET+POST over the same HTML cluster; one HTML blob per state would do. Surfaces (hit every surface)Applied: no wire/CLI/API.md change needed (reassign is portal-only). Reverse states are there (repeatable reassign, Restore on the card, Cancel, live-source restore 303s to the card). Portal/Patches glossaries and the later Misses:
Issue 256 named those glossary/product surfaces; it did not name Tests vs Done-whenOwner/admin/member, ±dependants, delete-from-retired clock, restore redirect vs list, reassign deactivated/stale/no-op, ack= Weak spots, not missing pages: 403s are status-only (no Summary
|
|
Addressed the reviews in Fixed
Kept as is
Verification
No API/CLI contract, migration, company-resource protocol or deactivation-flow change was needed. The PR remains stacked on |
573a862 to
cd44643
Compare
9438a39 to
0947073
Compare
cd44643 to
a8e2b71
Compare
Implement #256 with retire, delete, restore and admin reassignment confirmations. Check expected ownership under the patch row lock and preserve stale-action refusals.
0947073 to
30898ba
Compare
Deactivating a user left admins to retire their patches separately, without seeing which tools would break. Reactivation had the same gap for restoring patches. Company now links to pick pages where admins can keep the patches as they are, select some, or act on all. Confirmations recompute breakage for the exact selection, including off-source warnings on restore. User access changes and selected patch changes commit together or all roll back. Last-active-admin, company-scoping and same-origin checks remain in place. Stacked on #269 (`portal/256-confirmation-pages`). This PR targets that branch, not `main`. Closes #257. ## Verification - `pnpm test --maxWorkers=2`: 925 tests passed across 80 files. - `pnpm typecheck` and `pnpm lint` passed. - Browser-verified desktop and mobile selection, confirmation, deactivation and reactivation flows. - Standards and specification reviews completed with no blocking findings. Implemented with GPT-6 Astra in Oh My Pi.
Server configuration tests intermittently exceed their 10-second subprocess timeout under Node 24 CI load, failing with `expected null to be 1` before configuration validation finishes. This hit PR #269 twice in a row. Raise the subprocess cap to 60 seconds and the Vitest deadline to 75 seconds. A null exit status now reports the signal and configured timeout. Configuration and credential-safety assertions are unchanged. This PR is stacked directly on `main` and targets `main`; the branch is up to date with the latest `origin/main`. Validation passed: - `pnpm lint` - `pnpm typecheck` - `pnpm exec vitest run apps/server/src/start.test.ts` (9 tests) - `pnpm test` (899 tests across 80 files) - Forced-timeout smoke covering all nine diagnostic paths Standards and spec reviews found no issues. Implemented with OpenAI GPT-6 Astra in the Oh My Pi coding harness.
Owners and admins could reach the management links but could not complete retire, delete, restore with off sources, or reassignment in the portal.
Adds the four pages on the shared confirmation component, with dependant acknowledgements, typed-name deletion, source warnings and an active-member picker. Stale forms refuse without changing the patch; reassignment checks the expected owner under the existing row lock. Updates the product docs and glossaries.
Stacked on
portal/255-portal-index-card, which is this PR's base branch. This diff contains only the confirmation-page work.Closes #256.
Verification
Implemented with GPT-6 Astra in Oh My Pi.