Repository navigation
Phase P2: users group - #2321
Merged
neuromechanist merged 18 commits intoNov 22, 2026
Merged
neuromechanist merged 18 commits into
neuromechanist merged 18 commits into
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2321Version: 🤖 Updated on each push. |
neuromechanist
merged commit Nov 22, 2026
8670892
into
feature/issue-2307-epic-admin-tree
31 checks passed
This was referenced Nov 22, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase P2 of the admin command tree restructure (ADR 0135): the account commands move under
nemar admin users,admin doctor kindsbecomesadmin users kind-check, which emptiesadmin doctor(now a dissolved group with its own stub row), andadmin backfill-namesis retired. Every old path is a row of the moved-command table: it runs nothing, prints one line naming the new path, and exits 1.Moves are their own commits with no behavior change; the retirement and the changed name hint are separate commits.
Closes #2310
Part of epic #2307
Old path to new path
admin approve,revoke,role,verify,kind->admin users approve|revoke|role|verify|kindadmin keys {create, list, revoke}->admin users keys ...admin email-preferences {show, update}->admin users email-preferences ...admin duplicates->admin users duplicatesadmin backfill-usernames->admin users backfill-usernames(unchanged; its mail side effect is backfill-usernames --apply re-sends verification mail #2315)admin doctor kinds->admin users kind-checkadmin doctor(dissolved) ->admin dataset doctor; the P1 rowsdoctor scananddoctor fixnow sit under this gone groupadmin backfill-names-> retired; the stub says names now come from ORCID at sign-up and the backfill has nothing left to fill (the backend route stays)The collision the plan named
nemar admin usersis a listing with value-taking options (--search,--role,--kind) and now also the parent ofapprove,revoke,kindand the rest. Commander dispatches a first operand that names a subcommand and leaves an option's value as a value, soadmin users approve bobreaches the approval andadmin users --search approveandadmin users --kind teststay the listing.test/admin-users-group.unit.test.tsasserts each case on what reached a recording stand-in.Behavior and text changes
admin backfill-namesand itsbackfillUserNamesclient function are removed.owner_name_missinghint (src/lib/admin-command.ts), the enrichment and DOI-refresh skip messages, thebackfill-usernamesno-name line and thebackfill-namesretirement line no longer tell admins to runbackfill-names. They read one shared sentence,cli.admin.owner_name_missing.fixinshared/contract/account-copy.ts: an ORCID-linked owner makes the name public on their ORCID record and signs in again; only an owner with no verified ORCID link types it into Settings on nemar.org, becausePATCH /auth/profilerefuses the edit (name_is_orcid_canonical) for an ORCID-linked owner.userspaths: the approval and upload-access request mails (nemar admin users approve <username>or--id <id>),user-edit.ts,routes/users.ts,ticket-notify.ts,shared/contract/admin-user.ts,shared/contract/device-auth.ts, and the CLI hints.help-groups.ts: the admin lead block is now users, dataset, pr-reviews, mail, notify. Theusersdescription is one sentence, and theadmin --helpUser Management block lists all twelveuserssubcommands.users kind-checkfailure spinner says "Account kind check failed" (it said "Doctor kinds check failed" asdoctor kinds).Outside this repository (not in this PR)
docs.nemar.org pages that name the moved paths, the website's
mail-prefs-api.test.tsfixture and anaccount-tier.tscomment, and the nemar-observability alert from P1 change in the same release.Test plan
bun run lint,bun run typecheck,biome checkon every changed test filetest/admin-users-group.unit.test.ts(23 pass): listing,--search approve,-s revoke,--role admin,--kind test,users show approve, and each subcommand reached with nothing written when declinedbackend/test/approval-mail-command.test.ts(3 pass): the rendered text of both approval mails readsnemar admin users approve <username>or--id <id>moved-commands.unit,help-tiers.unit,admin-restructure, the P1 dataset and probe tests: 31 files, 1107 pass, 13 skip (live tier, no keys), 0 failtest/admin-backfill-usernames-cli.test.ts: 9 pass; its 5 tests that pass--apply(to a local stand-in) were filtered out and not run, by the rule thatbackfill-usernames --applyis never run in this epic--kinda boolean fails the--kind testcase; registeringapproveback onadminfails 3 tests; restoringnemar admin approvein the upload-access mail fails the mail testbun testnot run (runs at epic to dev)