Skip to content

fix: show tabs in catalog access and fix clerk error for alias - #3087

Merged
yashmehrotra merged 1 commit into
mainfrom
fix-auth-user-access
Aug 10, 2026
Merged

fix: show tabs in catalog access and fix clerk error for alias#3087
yashmehrotra merged 1 commit into
mainfrom
fix-auth-user-access

Conversation

@yashmehrotra

@yashmehrotra yashmehrotra commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added tab-based navigation for switching between catalog- and user-grouped access views.
    • Improved access-view mode handling, including clearer fallback behavior and flat-view selection during drill-downs.
    • Updated current-user detection to use the application’s user context.
  • Removed

    • Removed the previous access grouping dropdown in favor of tabs.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aws-preview Ready Ready Preview Aug 10, 2026 9:56am
flanksource-ui Ready Ready Preview Aug 10, 2026 9:56am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d264b32f-3c91-406d-8dd0-afaa83b5eaf6

📥 Commits

Reviewing files that changed from the base of the PR and between 81534cf and 3ab65bb.

📒 Files selected for processing (8)
  • src/components/Authentication/useCurrentUser.tsx
  • src/components/Configs/Access/ConfigAccessGroupByDropdown.tsx
  • src/components/Configs/Access/ConfigAccessGroupByTabs.tsx
  • src/components/Configs/Access/__tests__/ConfigAccessGroupByTabs.unit.test.tsx
  • src/components/Configs/Access/__tests__/ExternalUserActions.unit.test.tsx
  • src/hooks/__tests__/useCatalogAccessUrlState.unit.test.ts
  • src/hooks/useCatalogAccessUrlState.ts
  • src/pages/config/ConfigAccessPage.tsx
💤 Files with no reviewable changes (1)
  • src/components/Configs/Access/ConfigAccessGroupByDropdown.tsx

Walkthrough

The PR replaces the config access grouping dropdown with Catalogs and Users tabs. It simplifies access URL-state resolution, updates grouped table selection, switches current-user lookup to UI context, and adjusts related tests.

Changes

Catalog access grouping

Layer / File(s) Summary
Access mode state and resolution
src/hooks/useCatalogAccessUrlState.ts, src/hooks/__tests__/useCatalogAccessUrlState.unit.test.ts
Grouped modes are resolved from supported parameters. Flat mode is inferred from filters or groupBy=none. Tests cover defaults, supported values, fallbacks, and external-user rows.
Grouped access tabs
src/components/Configs/Access/ConfigAccessGroupByTabs.tsx, src/components/Configs/Access/__tests__/ConfigAccessGroupByTabs.unit.test.tsx, src/components/Configs/Access/ConfigAccessGroupByDropdown.tsx
The dropdown is replaced by tabs for Catalogs and Users. Unsupported modes normalize to group-config. The tab test covers selection changes.
Access page rendering
src/pages/config/ConfigAccessPage.tsx
The page uses the tabs component and selects the user table for group-user. Other grouped modes select the catalog table.
Authentication context alignment
src/components/Authentication/useCurrentUser.tsx, src/components/Configs/Access/__tests__/ExternalUserActions.unit.test.tsx
Current-user lookup reads user.id from UI context. External-user action tests provide an admin authentication context and use the updated creator ID expectations.

Sequence Diagram(s)

sequenceDiagram
  participant ConfigAccessPage
  participant useCatalogAccessUrlState
  participant ConfigAccessGroupByTabs
  participant AccessTable
  ConfigAccessPage->>useCatalogAccessUrlState: read mode and isGrouped
  ConfigAccessPage->>ConfigAccessGroupByTabs: render selected grouping tab
  ConfigAccessGroupByTabs->>ConfigAccessPage: report tab change
  ConfigAccessPage->>AccessTable: render user or catalog grouped table
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 clearly summarizes the two main changes: replacing the catalog access dropdown with tabs and fixing the Clerk-related alias error.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-auth-user-access
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix-auth-user-access

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.

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