Skip to content

feat(admin): let admins edit one profile's home section order - #2043

Merged
Quick104 merged 6 commits into
Silo-Server:mainfrom
Rhainland:fix/1219-s3-admin-profile-sections
Oct 7, 2026
Merged

Quick104 merged 6 commits into
Silo-Server:mainfrom
Rhainland:fix/1219-s3-admin-profile-sections

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1219
Validation tasks: changes #1221 C1

An admin can't see or fix one profile's home screen layout. /api/v2/profile/sections only acts on the caller's own profile, and the admin section routes change the server-wide layout or reset every profile at once. The only way to fix one person's rows was to sign in as them with View as user and then enter the profile's PIN. #1219 AC4 requires an admin to correct a profile's home section order.

Admins can now read, reorder, hide and reset one profile's home sections from Admin > Users > Preferences.

Approach

  • API: new admin v2 operations under /api/v2/admin/users/{id}/profiles/{profile_id}/sections: list, the resolved settings view, replace and reset. They use the same shapes as /api/v2/profile/sections, and both now share the same service code.
    • A profile from another account answers 404.
    • Writes are audited like an admin's settings write.
    • Admin account capabilities advertise profile_sections.
  • Section types: the check on which section types a layout may use runs with the profile's own account role, not the admin's. Otherwise an admin could save a section the profile itself can't save, and every later change the profile made to its own layout would fail.
  • Web admin: the Preferences tab shows a Home sections card for the selected profile, with drag to reorder, the eye to show or hide a row, and Reset to default. It reuses the drag list from Settings > Home Screen, which now sits in a shared component.
  • Other clients: the admin surfaces in the apps don't edit profile layouts, so nothing changes there.

Most of the diff is generated OpenAPI and fixture output.

Validation

  • Go handler and API tests cover:

    • non-admin 403;
    • unknown account or profile 404;
    • read, replace and reset;
    • other profiles unaffected;
    • audit entries;
    • the section-type check using the owning account's role.

    Web tests cover the card and capability gating. Contract, lint, typecheck and build checks pass.

  • Tested by hand on a local server: an admin reordered and hid rows on another profile, and that profile's home page and Settings > Home Screen showed the change. Other profiles were unchanged.

Added the drag-reorder, hide, and reset-confirmation recording to the evidence page. Manual follow-up: Silo-Server/siloserver.org#119.

Evidence: https://evidence.siloserver.org/r/silo-server/pr-2043/

Evidence

Risks

  • The admin view lists every section in the layout, including ones the account can't currently see, so a full save keeps their positions.
  • The card edits the Home page only; the API also accepts library pages.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (in T3 Code); Codex harness in T3 Code (review cleanup)
  • Tool(s): Claude Code with subagents, GitHub CLI, Playwright, Xcode iOS and tvOS simulators, Android Emulator
  • Model(s): claude-opus-5-5[1m]; gpt-6.1-sol
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: A separate review agent read the diff against its merge base with main. It found that an admin save checked section types against the admin's role, which could leave a profile unable to save its own layout; fixed by checking against the owning account's role. Also tested on a local server.

Note

Add admin API and UI to edit a profile's home section order

  • Adds admin v2 routes for listing, replacing, resetting, and resolving a profile's home section overrides, plus a profile_sections capability flag in admin_accounts.go
  • Handlers in sections_account_profile.go validate profile ownership and library state without requiring the admin's own library access, use the owning account's recipe-gate role, and emit settings audit records for saves and resets
  • New UI card ProfileHomeSections in ProfileHomeSections.tsx shows a sortable section list with visibility toggles, reset, and save via new admin hooks in profileSections.ts
  • Shared section-override helpers moved out of HomeScreenSettings into sectionOverrides.ts, and drag-and-drop rendering moved into the new SectionOrderList component
  • Risk: resolveProfileSectionSettings for admin requests returns sections hidden by the addressed account's library access, and admin saves use the target account's role rather than the admin's own — check requireAccountPage and saveProfileOverrides in sections_account_profile.go

Macroscope summarized 9a5564c.

Admins can read, replace and reset a single profile's page-layout
overrides under /api/v2/admin/users/{id}/profiles/{profile_id}/sections,
with the same shapes as /api/v2/profile/sections. A profile that is not
the account's answers 404, writes are audited like admin setting writes,
and admin account capabilities advertise profile_sections.
The Preferences tab shows the selected profile's Home sections with
reorder, show/hide and reset to default, gated on the profile_sections
capability. The drag list and override builder are shared with the
Home screen settings page.
An administrator's save ran the recipe gate with the administrator's role,
so it could add an admin-only recipe section to a regular account's
profile. That profile re-saves its whole layout on every change, so each of
its later saves would then fail with 403 until an administrator removed the
section. Run the gate with the owning account's role instead.
@silo-kody

silo-kody Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe8ec352-5282-4c2f-923e-fc87e7e36d2b
📥 Commits

Reviewing files that changed from the base of the PR and between 9850fdc and 9a5564c.

📒 Files selected for processing (9)
  • docs/admin-users-api.md
  • internal/api/handlers/library_views_service.go
  • internal/api/handlers/sections.go
  • internal/api/handlers/sections_account_profile.go
  • internal/api/handlers/sections_account_profile_test.go
  • web/src/hooks/queries/admin/profileSections.test.ts
  • web/src/hooks/queries/admin/profileSections.ts
  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.test.tsx
  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/admin-users-api.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

This change adds administrator API operations and interface controls to read, replace, and reset a specific account profile’s section layout. It adds the profile_sections capability, profile ownership checks, role-based recipe validation, and audit records for successful changes to another profile. It also extracts shared section-editing utilities.

Changes

Administrator profile section layouts

Layer / File(s) Summary
API contracts and fixtures
contracts/api/v2/openapi.json, contracts/api/v2/fixtures/*, web/src/api/v2/schema.ts, web/src/api/v2/operations.ts, docs/admin-users-api.md
The API contracts document profile-section listing, settings, replacement, and reset operations, plus the profile_sections capability. Fixtures and documentation cover these operations. The OpenAPI document also revises definitions and metadata for other admin-user operations.
Server routes and profile handling
internal/apiv2/admin_account_profile_sections.go, internal/apiv2/profile_sections.go, internal/api/handlers/sections*.go, internal/apiv2/admin_accounts.go, internal/api/router.go, internal/apiv2/router.go, internal/apiv2/document.go, internal/api/testdata/media_routes.txt, internal/contractledger/ledger_test.go, internal/apiv2/*test.go
The server adds profile-scoped routes and handlers for listing overrides, resolving settings, replacing overrides, and resetting them. It validates profile ownership and scope, applies the addressed account’s role to recipe checks, and audits successful writes to another profile. The capability is true when both required services are configured.
Shared section editor
web/src/lib/sectionOverrides.ts, web/src/components/sections/EditableSectionRows.tsx, web/src/components/sections/SectionOrderList.tsx, web/src/pages/settings/HomeScreenSettings.tsx, web/src/pages/settings/HomeScreenSettings.test.tsx
Shared section override utilities and a sortable list are added. The existing Home settings page now uses them, and edit and delete buttons can be omitted when their callbacks are not provided.
Admin profile controls
web/src/hooks/queries/admin/profileSections.ts, web/src/hooks/queries/admin/profileSections.test.ts, web/src/pages/admin-users/detail/preferences/ProfileHomeSections.tsx, web/src/pages/admin-users/detail/preferences/ProfileHomeSections.test.tsx, web/src/pages/admin-users/detail/preferences/PreferencesTab.tsx, web/src/pages/admin-users/detail/preferences/PreferencesTab.test.tsx
The preferences tab shows Home section controls for a selected profile when profile_sections is enabled. Profile-specific queries and mutations load, save, and reset that profile’s layout.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Admin as Admin preferences
  participant ProfileHomeSections
  participant ProfileSectionHooks as Admin profile-section hooks
  participant AdminProfileRoutes as Admin profile-section API
  participant SectionHandler
  Admin->>ProfileHomeSections: Open selected profile preferences
  ProfileHomeSections->>ProfileSectionHooks: Load profile settings and overrides
  ProfileSectionHooks->>AdminProfileRoutes: GET settings and overrides
  AdminProfileRoutes->>SectionHandler: Resolve profile layout and overrides
  SectionHandler-->>ProfileHomeSections: Return profile section data
  ProfileHomeSections->>ProfileSectionHooks: Save layout or reset overrides
  ProfileSectionHooks->>AdminProfileRoutes: PUT overrides or DELETE overrides
  AdminProfileRoutes->>SectionHandler: Save or reset addressed profile
Loading

Suggested reviewers: quick104

Merge Risk: ⚪ Minimal · up to 9a556

No actionable issue is established for this revision; it is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 67 functions across 28 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: allowing administrators to edit one profile’s Home section order.
Description check ✅ Passed The description directly explains the problem, API and web changes, validation, risks, and evidence for the profile Home section editing feature.
Full details: Docstring Coverage

Explanation

Docstring coverage is 38.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 67 functions across 28 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Quick104 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Evidence: FAIL

The Evidence section is still the placeholder ("publishing to the evidence site; the link follows"), but this PR has a user-visible web change: a new Home sections card in Admin > Users > Preferences, and Settings > Home Screen now renders through the shared SectionOrderList component.

To pass, please add an Evidence link that shows:

  • Admin > Users > Preferences before and after, with the Home sections card reordering a row, hiding a row with the eye, and Reset to default.
  • The target profile's home page (or its Settings > Home Screen) reflecting the admin's change, and another profile left unchanged.
  • Settings > Home Screen still working the same after the refactor into the shared drag list.
  • Phone-width captures of the new admin card and Settings > Home Screen, not just desktop, since a drag list and eye toggles are visible on mobile web.

Grok commenting on Quick's behalf.

Quick104 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Note

Grok commenting on Quick's behalf.

Evidence: FAIL (placeholder). The Evidence section says "publishing to the evidence site; the link follows", but there's no artifact yet, and this PR has user-visible web UI changes.

Please add one of these to the Evidence section:

  • Evidence: https://evidence.siloserver.org/r/silo-server/<topic>/ with the shelf link, or
  • Before|After images in the Evidence section.

Either way, it needs to cover:

  1. Admin > Users > Preferences: the new Home sections card for a selected profile, showing reorder, hide/show, and Reset to default.
  2. Settings > Home Screen: before/after, since it now uses the shared drag-list component.
  3. Mobile web: phone-viewport shots of the new card (or a clear note that it isn't reachable or affected there).
  4. A surface and build line naming web plus commit 2f61619.

@Quick104 Quick104 added priority: P2 Limited scope, workaround exists, or polish impact: usability Core flow broken or severely blocked labels Oct 7, 2026 — with Cursor
@macroscopeapp

macroscopeapp Bot commented Oct 7, 2026

Copy link
Copy Markdown

Evidence is missing: the Evidence section says the link will follow, but contains no published link or captures.

  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.tsx: the new profile Home sections card adds reorder, show/hide, and reset controls. Please provide before-and-after desktop and phone-width web captures of the same profile in Admin > Users > Preferences, identifying the surface and build or commit.
  • web/src/lib/sectionOverrides.ts and internal/sections-backed profile settings: the saved layout changes the target profile's Home section order and visibility. Please show before and after for the same profile and data at desktop and mobile where applicable; include a short recording of the drag interaction and identify the surface and build or commit.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@macroscopeapp

macroscopeapp Bot commented Oct 7, 2026

Copy link
Copy Markdown

Validation impact

#1221 C1 is currently Not run, so there is no passed result to invalidate and this is not an unblock. The PR adds a per-profile Home sections card and new admin API path for the exact AC4 behavior in that case. This materially changes the controls and path the case must exercise; the PR must explain why the behavior under test changes, and C1 needs a post-merge validation run.

The current Validation tasks: line says unblocks #1221 C1, but the task has no failed or blocked result.

Suggested fix: Validation tasks: changes #1221 C1

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

Saving or resetting a profile's Home layout from Admin > Users now also
invalidates the sections queries, so an administrator who edits their
own profile does not see the old layout on Home.
@silo-kody

silo-kody Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 1 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers

@Rhainland

Copy link
Copy Markdown
Contributor Author

Evidence is published: https://evidence.siloserver.org/r/silo-server/pr-2043/

Before is origin/main 47a2998; after is an integration build of the #1219 branches on the same main, with this PR's code as of 2f61619. The review fix in 9850fdc refreshes the acting profile's Home after an admin edit; these captures edit another profile, so they're unaffected.

  • Admin > Users > Preferences card, reorder/hide/reset: Riley's card at the default order, then after dragging Recently Added in TV to the top (keyboard drag) and hiding Recently Released in Movies, then the Reset to default confirmation and the card back at the default. main has no card; the existing before/after of the card is still on the page.
  • Target profile reflects the change, another profile doesn't: Riley's Home and Settings > Home Screen show the new order and the hidden row. Jordan's Home on the same account keeps the default order. Riley's Home after the reset matches Jordan's again.
  • Settings > Home Screen after the refactor: before/after at 1440 and 390 with the same layout. The before and after images are byte-identical at both widths.
  • Phone width: the edited admin card at 390, plus the existing 390 before/after of the card.

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of 9850fdc. I found three low-severity defects and no blockers. The authorization checks hold up: admin-only class, unknown account 404, profile ownership through the account's own store, and reset scoped to one profile. The contract change is additive. The findings are on the lines below, and I'm pushing fixes for all three to this branch. A summary comment with scores follows.

Quick104 and others added 2 commits October 7, 2026 15:11
…brary access

The admin profile-sections operations ran the profile route's library check,
which reads the acting administrator's library scope. An administrator who had
hidden a library for their own browsing got 404 for another profile's layout
on that library page. The admin operations now require only that the library
exists and is enabled; the profile's own routes keep the viewer check.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…y a save failed

The save and reset hooks captured the admin authority during render, which
throws when no profile context is set; they now capture it inside the
mutation, as the query hooks do. A refused save's toast now shows the
server's reason from the problem's first error instead of "see errors".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@silo-kody

silo-kody Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 7, 2026

Copy link
Copy Markdown

The Evidence link and described desktop and phone captures cover the admin card states, the target profile's changed layout, an unchanged second profile, and the Settings > Home Screen refactor. The described evidence does not include a recording:

  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.tsx: Please add a short recording of the drag reorder and the reset-confirmation flow through the resulting default layout; the interaction and multi-step flow are user-visible.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@Quick104

Quick104 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review summary

Fit: 9/10 · Readiness: 8/10 — conditional (reviewed head 9a5564c3b)

Addressed in this review

I found three low-severity defects in 9850fdc7a, fixed them on this branch, and resolved their threads:

  • Library pages and the admin's own library access (799a1d0). On a library page, the admin operations ran the profile route's library check, which reads the acting admin's library scope. An admin who had hidden a library for their own browsing got 404 for another profile's layout on that page. The admin operations now require only that the library exists and is enabled, and the profile's own routes keep the viewer check.
  • Render-time throw in the save and reset hooks (9a5564c). With no profile context they threw during render. They now capture the authority inside the mutation, as the query hooks do.
  • Save toast without a reason (9a5564c). A 400 showed "The request did not pass validation; see errors." The toast now shows the server's reason.

Each fix has a regression test that failed on the previous head. The focused Go tests (internal/api/handlers, internal/apiv2, internal/contractledger) and web tests (35) pass, and make lint-changed, tsc and Prettier are clean. CI passes on 9a5564c3b. One web shard failed first in WatchPage.test.ts, a Watch Party test this PR doesn't touch; it passed 3/3 locally and on a rerun. I verified the fixes with tests only, not on a running server.

Checked and fine

  • Authorization: the routes are admin-only. An unknown account or a profile from another account answers 404, and reset touches only the addressed profile.
  • Contract: the change is additive. The removed lines in openapi.json are diff alignment, with no operation, schema or field renamed or removed. No /api/v1 route was added. New operations are advertised through the profile_sections capability.
  • The Settings > Home Screen refactor keeps edit, delete and custom-section behavior; the moved helpers are unchanged.
  • The earlier cache finding is fixed in 9850fdc7a.

Remaining, not blocking

  • Concurrent edits. Profile layouts for an account live in one stored value per page, and neither the profile's routes nor the admin routes take If-Match. An admin save and a save from the profile, or from another profile on the account, can overwrite each other. The profile routes already had this; the admin routes add another writer. A revision check on the stored value would fix it for both and is better done separately.
  • Settings read after a store error. ResolveProfileSectionSettings ignores override-read errors and returns the default layout. This predates the PR. The card also loads the overrides separately and stays read-only if that fails, which limits the exposure.

Validation

I couldn't read the validation board, so I couldn't check which passed cases this reaches. #1221 C1 is recorded as Not run on the task, so it isn't an unblock of a passed case. The Validation tasks: line should be checked against the board before merge. Once this merges, C1 can be run against it.

User manual

The manual's "Curate the home screen" page (running-a-server/home-sections) says a profile with its own order keeps it, and gives the admin no way to correct it. A siloserver.org issue should cover the new Home sections card in Admin > Users > Preferences on that page, and perhaps on running-a-server/accounts. I found no open docs issue or PR for it.

Apps and Jellyfin

The change is server and web admin only. Administration lives in web admin, so Apple and Android need no change. Jellyfin has no equivalent admin view, so jellycompat is unaffected.

Scores

  • Fit 9: it closes [v1] Device & override auditing #1219 AC4, a 1.0 release criterion, at the admin v2 boundary. It reuses the profile's own section service and editor, with feature detection through a capability.
  • Readiness 8: no known defect remains and CI passes. It holds below 9 until the validation line is checked against the board and the manual issue is filed. The concurrent-edit gap above is a follow-up, not a blocker.

AI disclosure: reviewed by Claude Code (claude-opus-5-5) with Claude subagents, plus a read-only review round by Codex (gpt-6.1-sol). Fix commits written by claude-opus-5-5.

@Rhainland

Copy link
Copy Markdown
Contributor Author

Added the requested recording of keyboard drag reorder, hiding a row, and the reset confirmation through the default layout. Corrected the validation line to changes #1221 C1, and filed the manual update as Silo-Server/siloserver.org#119. Earlier desktop/phone comparisons remain available in the evidence page’s version history.

Evidence: https://evidence.siloserver.org/r/silo-server/pr-2043/

@Quick104
Quick104 merged commit 4e371f4 into Silo-Server:main Oct 7, 2026
39 of 41 checks passed
Quick104 added a commit that referenced this pull request Oct 8, 2026
Conflict resolution:

- internal/userdb: main took SQLite schema v30 for the profile PIN
  revision (#2020). The login-wide sharing migration moves to v31, so a
  store already at main's v30 still runs it.
- internal/catalog, internal/sections: main's fail-closed library scope
  (#1953, #2005, #2006) and this branch fixed the same empty-scope bug.
  The executor and section fetcher keep main's AccessFilter.LibraryScope;
  library collections keep this branch's ResolveLibraryCollectionMembership,
  which already returns nothing when the saved libraries miss the
  collection's own. main's scope test now exercises that resolver.
  narrowLibraryScope no longer needs the helper main removed.
- internal/policy: main's hidden-library output (#2058) and this branch's
  ContentAccessOnly input both declared `hidden`; the input side is
  renamed.
- Home sections (#2043): the admin per-profile card keeps main's row
  list but saves with this branch's override builder and a baseline, so
  like Settings > Home Screen it stores only what changed and untouched
  rows keep following the server. main's duplicate lib/sectionOverrides.ts
  is dropped; EditableSectionRows stays for that card and labels rows with
  rowKindLabel. Settings > Home Screen keeps this branch's page.
- apiv2: keep both sides' services and fixtures; the admin profile
  section settings fixture gains default_title.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact: usability Core flow broken or severely blocked priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants