feat(web): refine sidebar and permission administration - #19
Conversation
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR wires session identity through the application and administration shells, adds variant-aware account menus, and modernizes administration pages with reusable search and pagination controls, collection filtering, collapsible group rows, directory actions, and structured SCIM status information. ChangesIdentity-aware application shell
Administration collections
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Admin as Admin page
participant AdminSearch
participant pageItems
participant AdminPagination
Admin->>AdminSearch: enter query or filter
AdminSearch->>Admin: invoke onChange
Admin->>pageItems: filter collection and request page
pageItems-->>Admin: return visible items
Admin->>AdminPagination: provide page and result count
AdminPagination->>Admin: report selected page
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/src/components/app-shell/app-sidebar.tsx`:
- Around line 72-92: Prevent duplicate Administration entries by updating the
AccountMenu usage in the sidebar footer to disable its Administration item,
matching the existing admin-sidebar.tsx pattern. Keep the dedicated
administrator-only SidebarMenuItem and the AccountMenu identity and sidebar
variant unchanged.
In `@web/src/features/admin/components/admin-users-page.tsx`:
- Around line 29-38: Extract the duplicated initials(name?: string, email?:
string) implementation from admin-users-page.tsx into a shared utility module,
then import and reuse that helper in both admin-users-page.tsx and
account-menu.tsx. Preserve the existing fallback and uppercase initials
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f1181cbb-ada1-4f9c-861e-5e3dbb80d898
⛔ Files ignored due to path filters (2)
docs/increments/completed/2026-07-23-sidebar-account-shell/design.mdis excluded by!docs/**docs/increments/completed/2026-07-23-sidebar-account-shell/plan.mdis excluded by!docs/**
📒 Files selected for processing (12)
web/src/components/app-shell/account-menu.tsxweb/src/components/app-shell/admin-sidebar.tsxweb/src/components/app-shell/app-shell.tsxweb/src/components/app-shell/app-sidebar.tsxweb/src/features/admin/admin-collection.tsweb/src/features/admin/components/admin-collection-controls.tsxweb/src/features/admin/components/admin-groups-page.tsxweb/src/features/admin/components/admin-mappings-page.tsxweb/src/features/admin/components/admin-page.tsxweb/src/features/admin/components/admin-scim-page.tsxweb/src/features/admin/components/admin-users-page.tsxweb/src/routes/admin.tsx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
**/*: Before changing unfamiliar Spring Boot 4, Spring Modulith 2, Spring AI 2, Gradle, React, Vite, Tailwind, or TypeScript APIs, consult Context7/current official documentation and the projectorgmemory-*verification skills.
Readdocs/guidelines/agent-safety.mdbefore retrieval, AI, MCP, permission, upload, graph, or export work.
Never commit.envfiles, provider keys, tokens, or customer data.
Run the relevant gates fromdocs/guidelines/testing-harness.md; use a terminating clean test as the context gate, and do not treatbootRunas verification.
Current behavior belongs in architecture/specs only after it exists in code; intent belongs in vision, roadmap, or an active increment, and repository state must not be duplicated across documents.
Files:
web/src/routes/admin.tsxweb/src/features/admin/components/admin-scim-page.tsxweb/src/components/app-shell/app-sidebar.tsxweb/src/components/app-shell/app-shell.tsxweb/src/features/admin/components/admin-collection-controls.tsxweb/src/features/admin/admin-collection.tsweb/src/features/admin/components/admin-groups-page.tsxweb/src/components/app-shell/admin-sidebar.tsxweb/src/components/app-shell/account-menu.tsxweb/src/features/admin/components/admin-mappings-page.tsxweb/src/features/admin/components/admin-page.tsxweb/src/features/admin/components/admin-users-page.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
For frontend files, use Oxlint, TypeScript typecheck, the production build, and browser tests when the UI flow matters.
Files:
web/src/routes/admin.tsxweb/src/features/admin/components/admin-scim-page.tsxweb/src/components/app-shell/app-sidebar.tsxweb/src/components/app-shell/app-shell.tsxweb/src/features/admin/components/admin-collection-controls.tsxweb/src/features/admin/admin-collection.tsweb/src/features/admin/components/admin-groups-page.tsxweb/src/components/app-shell/admin-sidebar.tsxweb/src/components/app-shell/account-menu.tsxweb/src/features/admin/components/admin-mappings-page.tsxweb/src/features/admin/components/admin-page.tsxweb/src/features/admin/components/admin-users-page.tsx
**/*.{ts,tsx,js,jsx,json,html,css,scss}
📄 CodeRabbit inference engine (CLAUDE.md)
Do not run JetBrains IDE inspection on TypeScript, TSX, or web configuration files.
Files:
web/src/routes/admin.tsxweb/src/features/admin/components/admin-scim-page.tsxweb/src/components/app-shell/app-sidebar.tsxweb/src/components/app-shell/app-shell.tsxweb/src/features/admin/components/admin-collection-controls.tsxweb/src/features/admin/admin-collection.tsweb/src/features/admin/components/admin-groups-page.tsxweb/src/components/app-shell/admin-sidebar.tsxweb/src/components/app-shell/account-menu.tsxweb/src/features/admin/components/admin-mappings-page.tsxweb/src/features/admin/components/admin-page.tsxweb/src/features/admin/components/admin-users-page.tsx
web/src/**/*.{ts,tsx}
⚙️ CodeRabbit configuration file
web/src/**/*.{ts,tsx}: OAuth access and refresh tokens must never enter browser JavaScript or
browser storage. Use the HttpOnly BFF session, CSRF-protected mutations,
generated Hey API data clients, accessible states, and both light and
dark themes. Handwritten transport is reserved for documented protocol
flows such as navigation redirects and streaming.
Files:
web/src/routes/admin.tsxweb/src/features/admin/components/admin-scim-page.tsxweb/src/components/app-shell/app-sidebar.tsxweb/src/components/app-shell/app-shell.tsxweb/src/features/admin/components/admin-collection-controls.tsxweb/src/features/admin/admin-collection.tsweb/src/features/admin/components/admin-groups-page.tsxweb/src/components/app-shell/admin-sidebar.tsxweb/src/components/app-shell/account-menu.tsxweb/src/features/admin/components/admin-mappings-page.tsxweb/src/features/admin/components/admin-page.tsxweb/src/features/admin/components/admin-users-page.tsx
🧠 Learnings (1)
📚 Learning: 2026-07-23T03:36:09.053Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 16
File: web/src/features/admin/components/admin-mappings-page.tsx:190-211
Timestamp: 2026-07-23T03:36:09.053Z
Learning: In the OrgMemory admin UI, preserve the principal display ordering returned by the backend instead of re-sorting on the client. The server-owned order (e.g., unmapped views first, then deterministic ordering by source-system, connection, kind, and external-key as defined in SourcePrincipalAdminService#listPrincipals) must be used as-is to avoid mismatches with the server’s intended admin mappings/principals list.
Applied to files:
web/src/features/admin/components/admin-scim-page.tsxweb/src/features/admin/components/admin-collection-controls.tsxweb/src/features/admin/components/admin-groups-page.tsxweb/src/features/admin/components/admin-mappings-page.tsxweb/src/features/admin/components/admin-page.tsxweb/src/features/admin/components/admin-users-page.tsx
🔇 Additional comments (15)
web/src/features/admin/admin-collection.ts (1)
1-8: LGTM!web/src/features/admin/components/admin-collection-controls.tsx (1)
11-113: LGTM!web/src/features/admin/components/admin-page.tsx (1)
39-128: LGTM!web/src/features/admin/components/admin-scim-page.tsx (1)
16-46: LGTM!web/src/features/admin/components/admin-groups-page.tsx (1)
20-172: LGTM!web/src/features/admin/components/admin-mappings-page.tsx (2)
106-137: Filtering preserves the backend-provided principal ordering (client-sidefilteronly, no re-sort), consistent with the server-owned order contract. LGTM!
233-336: LGTM!web/src/features/admin/components/admin-users-page.tsx (1)
40-345: LGTM!web/src/components/app-shell/account-menu.tsx (1)
1-4: LGTM!Also applies to: 17-17, 33-45, 61-115
web/src/components/app-shell/admin-sidebar.tsx (2)
75-88: Diff description doesn't match final code.The line-range summary says the "Back to workspace" link was removed, but it's still present unchanged (lines 77-84) alongside the new
AccountMenuentry. No functional concern, just flagging the discrepancy.
31-49: LGTM!web/src/components/app-shell/app-shell.tsx (2)
35-41: LGTM!
4-4: 📐 Maintainability & Code QualityModeToggle is still used elsewhere.
> Likely an incorrect or invalid review comment.web/src/components/app-shell/app-sidebar.tsx (1)
1-27: LGTM!Also applies to: 29-70
web/src/routes/admin.tsx (1)
22-29: LGTM!
What changed
Why
The previous shared header repeated navigation context and consumed space without page-specific value. Permission administration also loaded organization snapshots without the collection controls needed to scan or manage them efficiently.
This adopts the useful information hierarchy from mature enterprise AI products while keeping OrgMemory's current contracts and security boundaries. It deliberately does not add invite flows, fake SCIM functionality, or fields that the backend does not expose.
Validation
corepack pnpm lintcorepack pnpm typecheckcorepack pnpm buildgit diff --check11–20 of 35The existing production build warning for large AI/diagram chunks remains a separate code-splitting backlog item.
Summary by CodeRabbit
New Features
Improvements