feat(web): org policy page, identity picker, role-mappings UI - #18
Conversation
What it actually doesTwo new admin surfaces plus a rewritten identity picker, wired to backend already built and tested earlier in the stack (#11-#13, #15-#17): 1. A "Policy" nav item and page ( 2. Role mappings on the Groups page — 3. A materially rewritten Why it existsThe web surface for the org RBAC / groups / role-mapping backend and gateway enforcement from #11-#17. Until now those were API-only — no way for an admin to author org policy, assign roles via groups, or target identities in a rule from the console. Reading orderNew UI (real attention):
Dead-code sweep (skim only — verified inert): deletes What to scrutinise
Is anything client-side-only enforcement? Checked specifically: no. The Policy nav item ( Identity picker under partial failure — Role-mapping monotonicity — the UI states "raise only, never lower" as a hard invariant, but that's a backend guarantee. This PR doesn't re-test it; confirm the earlier Design decisions worth questioning
Test coverage realityStrong on the backend. Nothing here tests the UI. No Reviewer orientation guide — produced by analysing this PR's diff and surrounding code, not the commit messages. Claims about line numbers and behaviour are worth spot-checking as you read; where it says something is untested or risky, that was verified against the tree rather than inferred. |
…ode sweep Reconciliation Stage E (final feature stage). Mounts the OSS org policy route via the eeRoutes seam (the write path and org-capable editor already existed upstream — only the mount was missing, and removed-routes pointed at a dangling path); adds the org policy page at /policy. The identity picker is real again — people and user-groups only, no agent-groups — and safe now that the gateway (Stages F/G/H) enforces those principals, so it never writes rules the gateway ignores. Adds the role-mappings management section to /groups (create/edit/reorder/delete, raise-only copy, live blast-radius preview) that the backend had shipped without a UI. Sweeps the unused SSO/SCIM/domain clients, hooks, types, and query keys. No orphan-neutralization pass (inert under grants), no agent-group, no migration.
5581e1e to
5136983
Compare
The org policy page, identity picker, and role-mappings UI, plus a dead-code sweep. 23 files, +2,421/−384 — 1,342 test lines, but they are almost entirely one backend file (
routes/org/policy.test.ts). There are no component tests for the identity picker, the role-mapping dialog, or reorder behaviour.The web surface for the backend landed in #11–#13. Last PR before the tail (#8, spend budgets).
Stack
Split out of the original 381-file #8. Upstream catch-up (v1.42.0 → v1.44.0) already landed as #10, so
mainis now v1.44.0 and everything below is our own code.Review and merge in order, top to bottom. Roughly half of each diff is tests.