Repository navigation
feat: add an admin instruments page, and let administrators archive series - #1598
Merged
Merged
Conversation
…eries A series that has been administered can never be deleted, so there was no way to retire one. The Admin Panel gains an Instruments submenu with two views of /admin/instruments: - Form & Interactive lists every instrument at its current edition, with its kind, source, the groups using it and when it was added; double-clicking a row previews it. - Series lists every series with the group that owns it (or all groups), and lets an administrator preview, archive or unarchive it. Previews use the same dialog as the group manage page. An archived series is hidden from the start-session, remote assignment and group manage pickers, and the API refuses new assignments of it; collected records and outstanding assignments are untouched. Archive and unarchive are recorded in the audit log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `view` search param defaulted to `forms`, so the router rewrote a bare `/admin/instruments` to `?view=forms`. It is now optional, and a missing or unknown view still shows the forms view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sidebar test clicked Instruments while the Admin Panel section was still collapsed, and picking the `Archive` row action also matched `Unarchive`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joshunrau
approved these changes
Oct 4, 2026
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.
A series that has been administered can never be deleted, so there was no way to retire one. This adds an Instruments submenu to the Admin Panel with two views of
/admin/instruments:What archiving does: an archived series is hidden from the start-session, remote-assignment (single and bulk) and group-manage pickers, and the API refuses new assignments of it. Collected records and outstanding assignments are untouched, and it stays on each group's selection so unarchiving restores it. Archive and unarchive are new audit-log actions, tagged with the owning group.
API
GET /v1/instruments/seriesandPATCH /v1/instruments/series/:id({ isArchived }), bothADMIN_ONLY; added to the route inventory inauth-and-permissions.md.Instrument.archivedAt, exposed on series info;ARCHIVE/UNARCHIVEaudit actions.accessibleQuerystill applies.AssignmentsServiceis deliberately unscoped: it only narrows ids the caller already named.Web: the group-manage preview dialog moved to
src/components/InstrumentPreviewDialogand is shared; the pickers share oneselectAdministrableInstrumentsrule.Verification
instruments.service.spec.ts,instruments.controller.spec.ts,assignments.service.spec.ts(API);administrable-instruments.test.ts,series-overview.test.ts,instrument-editions.test.ts,useSeriesInstrumentsOverviewQuery.test.ts(web).pnpm lintandpnpm testpass.testing/src/specs/admin-instruments.spec.ts.Not run locally:
route-tree.tswas regenerated by the running dev server, not by hand.Follow-up, out of scope here: #1587 (deleting a group turns its series into shared ones).
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com