Skip to content

feat(web): refine sidebar and permission administration - #19

Merged
kl3inIT merged 2 commits into
mainfrom
feat/sidebar-account-shell
Jul 23, 2026
Merged

feat(web): refine sidebar and permission administration#19
kl3inIT merged 2 commits into
mainfrom
feat/sidebar-account-shell

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 23, 2026

Copy link
Copy Markdown
Owner

What changed

  • move desktop application chrome, account controls, theme selection, and sign-out into the sidebar
  • keep a minimal mobile header for opening off-canvas navigation
  • refine the Users directory with honest summary states, full-width search, independent role/sign-in/status filters, avatar rows, overflow actions, and numbered pagination
  • add consistent search, filtering, pagination, and progressive disclosure to source mappings and source groups
  • keep SCIM as an honest not-configured state instead of presenting unavailable actions

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 lint
  • corepack pnpm typecheck
  • corepack pnpm build
  • git diff --check
  • authenticated browser checks at 1440px and 390px
  • light and dark themes
  • Users filter proof: 35 linked accounts
  • pagination proof: page 2 shows 11–20 of 35
  • row action menu, source mappings, source-group disclosure, and SCIM state verified

The existing production build warning for large AI/diagram chunks remains a separate code-splitting backlog item.

Summary by CodeRabbit

  • New Features

    • Added search, filtering, pagination, and improved empty states across administration pages.
    • Redesigned user directory with account status, role, sign-in filters, avatars, and row actions.
    • Improved source group and principal management with collapsible rows and mapping filters.
    • Added clearer SCIM provisioning status details.
    • Added account menu variants, light/dark theme switching, and streamlined sidebar navigation.
  • Improvements

    • Administration access and menu options now adapt to account permissions.
    • Added interactive administration summary cards and section toolbars/footers.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3803f1cb-a1f1-4807-b2a8-36d691f99b63

📥 Commits

Reviewing files that changed from the base of the PR and between f9a5c46 and a77dfc6.

📒 Files selected for processing (4)
  • web/src/components/app-shell/account-menu.tsx
  • web/src/components/app-shell/app-sidebar.tsx
  • web/src/features/admin/components/admin-users-page.tsx
  • web/src/lib/avatar.ts
📝 Walkthrough

Walkthrough

The 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.

Changes

Identity-aware application shell

Layer / File(s) Summary
Identity-aware shell navigation
web/src/components/app-shell/account-menu.tsx, web/src/components/app-shell/admin-sidebar.tsx, web/src/components/app-shell/app-shell.tsx, web/src/components/app-shell/app-sidebar.tsx, web/src/routes/admin.tsx
Session identity is passed through the shell and sidebars. Account menus support icon/sidebar variants, administration visibility, initials, and theme switching. Sidebar footers now render account controls and conditional administration navigation.
Admin collection foundations
web/src/features/admin/admin-collection.ts, web/src/features/admin/components/admin-collection-controls.tsx, web/src/features/admin/components/admin-page.tsx, web/src/features/admin/components/admin-scim-page.tsx
Reusable pagination and search controls are added. AdminSection supports toolbars and footers, AdminStats supports interactive filters, and SCIM status is presented as a structured provisioning card.

Administration collections

Layer / File(s) Summary
Groups and observed principals
web/src/features/admin/components/admin-groups-page.tsx, web/src/features/admin/components/admin-mappings-page.tsx
Source groups use collapsible rows with member details and pagination. Observed principals support search, mapping-status filtering, pagination, and differentiated empty states.
Users directory
web/src/features/admin/components/admin-users-page.tsx
The users page adds search, role/sign-in/account filters, pagination, directory counts, provisioning status, avatar initials, inline statuses, and dropdown activation actions.

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
Loading

Possibly related PRs

  • kl3inIT/OrgMemory#4: Related application-shell changes involving header controls and identity wiring.
  • kl3inIT/OrgMemory#16: Related administration navigation changes based on administrator identity.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main changes to the sidebar and admin/permission management UI.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sidebar-account-shell

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between f492e5f and f9a5c46.

⛔ Files ignored due to path filters (2)
  • docs/increments/completed/2026-07-23-sidebar-account-shell/design.md is excluded by !docs/**
  • docs/increments/completed/2026-07-23-sidebar-account-shell/plan.md is excluded by !docs/**
📒 Files selected for processing (12)
  • web/src/components/app-shell/account-menu.tsx
  • web/src/components/app-shell/admin-sidebar.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/components/app-shell/app-sidebar.tsx
  • web/src/features/admin/admin-collection.ts
  • web/src/features/admin/components/admin-collection-controls.tsx
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/src/features/admin/components/admin-scim-page.tsx
  • web/src/features/admin/components/admin-users-page.tsx
  • web/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 project orgmemory-* verification skills.
Read docs/guidelines/agent-safety.md before retrieval, AI, MCP, permission, upload, graph, or export work.
Never commit .env files, provider keys, tokens, or customer data.
Run the relevant gates from docs/guidelines/testing-harness.md; use a terminating clean test as the context gate, and do not treat bootRun as 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.tsx
  • web/src/features/admin/components/admin-scim-page.tsx
  • web/src/components/app-shell/app-sidebar.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/features/admin/components/admin-collection-controls.tsx
  • web/src/features/admin/admin-collection.ts
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/components/app-shell/admin-sidebar.tsx
  • web/src/components/app-shell/account-menu.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/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.tsx
  • web/src/features/admin/components/admin-scim-page.tsx
  • web/src/components/app-shell/app-sidebar.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/features/admin/components/admin-collection-controls.tsx
  • web/src/features/admin/admin-collection.ts
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/components/app-shell/admin-sidebar.tsx
  • web/src/components/app-shell/account-menu.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/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.tsx
  • web/src/features/admin/components/admin-scim-page.tsx
  • web/src/components/app-shell/app-sidebar.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/features/admin/components/admin-collection-controls.tsx
  • web/src/features/admin/admin-collection.ts
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/components/app-shell/admin-sidebar.tsx
  • web/src/components/app-shell/account-menu.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/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.tsx
  • web/src/features/admin/components/admin-scim-page.tsx
  • web/src/components/app-shell/app-sidebar.tsx
  • web/src/components/app-shell/app-shell.tsx
  • web/src/features/admin/components/admin-collection-controls.tsx
  • web/src/features/admin/admin-collection.ts
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/components/app-shell/admin-sidebar.tsx
  • web/src/components/app-shell/account-menu.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/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.tsx
  • web/src/features/admin/components/admin-collection-controls.tsx
  • web/src/features/admin/components/admin-groups-page.tsx
  • web/src/features/admin/components/admin-mappings-page.tsx
  • web/src/features/admin/components/admin-page.tsx
  • web/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-side filter only, 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 AccountMenu entry. 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 Quality

ModeToggle 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!

Comment thread web/src/components/app-shell/app-sidebar.tsx
Comment thread web/src/features/admin/components/admin-users-page.tsx Outdated
@kl3inIT
kl3inIT marked this pull request as ready for review July 23, 2026 05:01
@kl3inIT
kl3inIT merged commit 200e1ea into main Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant