Repository navigation
feat(admin): redesign the admin user page and edit settings in place - #1710
Conversation
Split the account page into Overview, Access & limits, Activity, Downloads, and Preferences tabs. Each Access & limits card edits in place, which replaces the Edit dialog, and the Reset password dialog gains a temporary-password option. Add read-only v2 admin endpoints for an account's devices, watch summary, request usage, downloads, download summary, and series monitors, plus additive fields on profiles, IP history, playback history, and the users capability. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedToo many files! This PR contains 108 files, which is 8 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (108)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
The Suggested fix (no code diff): Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1a1ff4ab4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
activity_log.user_id references users, so the test failed on a fresh database before it could check last_active_at. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Reuse the existing download and subscription row scanners in the admin reads, share one authority check and page loader in the activity client, and replace nested conditional expressions in the cards, header, and dialogs with early returns or lookups. Behavior is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…redesign # Conflicts: # contracts/api/v2/fixtures/get_system_info_ok.json # internal/api/router.go
The merge combined both sides' OpenAPI changes, so the digest in the system info fixture changed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The Downloads tab threw away every row once an account had more than 5,000 downloads or 2,000 series monitors. It now keeps what it loaded and says the list is partial. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
After a delete, the unsaved-changes guard blocked the redirect and offered to save a draft for the deleted account. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A successful save resets the draft, so input typed during the request was dropped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb6577be8b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The Preferences badges called useAdminUserDeviceSettings, which reads the server-wide device list to name devices. The counts now come from the account's own setting values; the device list loads only when Per device is open. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An account with more than ten pages of live sessions made the Overview and Activity lose every live row. The loader now returns what it read. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The dialog counted UTF-16 units. The server requires at least 8 characters and at most 72 UTF-8 bytes, so some passwords the dialog accepted were refused, and the reverse. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
The new Overview's Watching now card also reads and displays account live sessions, reaching #1207 C1 (not run). The Suggested fix (no code diff): Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f9254c4cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Android never reports progress, so its downloading rows are requests, as the stat tile already counted them. The row and series badges now agree. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The request approval and limit live in the account's request-limit record, so the Overview summary and the Access & limits badge missed them. Both now count them, and the Overview tags them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3b8ef6164
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The Preferences tab listed every profile's settings in one view and each device's in another, with raw keys and long descriptions, which was hard to read for an account with several devices. It now lists each profile with its devices, libraries, and series on the left, and shows only the settings the selected one stores, with the value each replaces. Settings are added from a categorized picker and removed with a confirmation. Device names come from the account's own device list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 457f6486f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nge didn't The Requests card writes the request limit before the account PUT. When the PUT then failed, the card reported the whole save as failed although the limit had persisted. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Those devices have no detail page, so the link led to a 404. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…nces "Replaces" now follows each setting's resolution order and says when an app-family, device, or library value can apply in between, in the row and the picker. A setting this version doesn't know is view-only, since a save couldn't keep its JSON type. Retrying an add after a partial failure skips settings that already landed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94e4a2ccbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…is unknown Profile last use comes only from device registrations, and a failed registry read also returns no time. The Profiles card now says "No device activity" instead of "Never used". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Main now holds #1697 as a squash commit, so this carries only this branch's own changes onto it. It also regenerates the v2 OpenAPI artifact, web types and contract fixtures, which went stale on main when #1697 merged after #1710 and #1731. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* ci: fail on paths that collide on case-insensitive file systems Linux CI checks out two tracked paths that differ only in case without complaint, so the collision only surfaces when someone builds on macOS or Windows. #1710 added UserDetailTabs.tsx next to userDetailTabs.ts; the extensions differ, but an extensionless TypeScript import resolves to either, and the macOS build failed. scripts/ci/casecollisions lists tracked files and fails on paths (files or directories) that are equal ignoring case, and on JS/TS modules that are equal ignoring case once .d.ts, .ts, .tsx, .js, .jsx, .mjs or .cjs is removed. Files imported with their extension, such as App.tsx next to app.css, are not reported. make verify-case-collisions runs it, and the Repository checks job, which runs on every PR and push, calls that target. Closes #1817 * ci: treat a directory index module as its directory's import path An extensionless import of ./UserDetailTabs resolves to UserDetailTabs/index.ts on a case-sensitive file system and to a sibling userDetailTabs.ts on a case-insensitive one, but the checker compared UserDetailTabs/index with userDetailTabs and let the pair through. An index module (index with any module extension) now also answers to its directory's path, and that alias is compared with sibling modules the same way. A same-case sibling (foo/index.ts beside foo.ts) still passes, because the resolver picks the same file on every file system, and an index module beside a stylesheet is not a module pair. * ci: run the case-collision checker from main The Repository checks step skipped the check when the checked-out tree had no scripts/ci/casecollisions, so a pull request that deleted the checker also turned it off. The step now builds the checker from this workflow's commit on main, the way the job-selection tools are already loaded, and runs it over the files tracked in the PR checkout. Deleting or editing the branch's copy no longer changes the gate, and a branch cut before the checker existed is checked too, so there is no missing-script case left to allow.
Problem
Related issue: N/A
Validation tasks: changes #1197 C1 and #1197 C2; changes #1200 C1 and #1200 C2; reaches #1203 C1, #1207 C1, #1218 C1, and #1221 C1 (all not run yet)
The #1197 cases change on purpose: account overrides, group membership, and the effective policy are now read and edited on the Access & limits cards instead of the Edit dialog and the Permissions & Limits list. The #1195 criteria still hold. An admin can set an account-level override on any policy field (AC3), and an admin account still can't join an access group (AC4): the Library access card removes the group when the account becomes an admin. Both cases need re-validation after merge. #1200 C1 and C2 start from View as user, which now sits in the redesigned header; the impersonation flow itself is unchanged.
The admin page for a single account is hard to read and hard to edit. The Account card repeats the header, and permissions and limits are a flat list of 15 rows that marks overrides with an "(override)" suffix and never shows the value the account would otherwise get. Editing is split between a three-tab Edit dialog and a Requests panel that saves on its own. The page has six tabs, two of which list raw stored settings. It also can't show what an account has downloaded or which series its devices monitor, even though the server records both.
This change rebuilds the page around five tabs and moves editing onto the page. It also adds read-only admin endpoints for the account data the page now shows.
Approach
Tabs. The page has Overview, Access & limits, Activity, Downloads, and Preferences tabs. The selected tab is kept in the URL (
?tab=), so each tab can be linked to.If-Match. One card edits at a time, and leaving the page or tab with unsaved edits asks first.Editing details.
New read-only admin endpoints (
/api/v2): an account's devices, watch summary, requests used in the current window, downloads, download summary, and download subscriptions (series monitors). They're additive and documented indocs/admin-users-api.mdanddocs/admin-api.md.Additive fields on existing endpoints:
last_seen_aton profiles,locationon IP history, anended_afterfilter and series and episode fields on admin playback history, and capability flags for each new read.Shown honestly or left out:
Validation
make lint-changed, andmake test-gopass.make test-goskips database-backed tests; the new ones were run separately against a disposable migrated Postgres and pass.make test-webpass.WEBTEST_KNOWN_FAILURESis unchanged.verify-*target in CONTRIBUTING.md andTestCommittedArtifactMatchesRouterpass. The contract diff reports only additive changes.Evidence: https://evidence.siloserver.org/r/silo-server/admin-user-page/
Risks
apiv2-fixtures-syncinto silo-apple and silo-android when those repos next sync.Checklist
AI Disclosure
Note
Redesign admin user page with in-place settings editing and new activity/download views
ended_afterfiltering and series/episode metadataAccountRequestsPanel.tsxand the old inline edit modal in AdminUserDetail.tsx;apiv2.Dependenciesgains optional service slots that return errors when unset, and new capability flags gate the new endpoints and UI panelsMacroscope summarized d64c6b8.