🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

fix(users): default user detail to Security tab via index redirect - #1755

Merged
Shreyag02 merged 3 commits into
mainfrom
fix/user-detail-default-security-tab
Jul 14, 2026
Merged

fix(users): default user detail to Security tab via index redirect#1755
Shreyag02 merged 3 commits into
mainfrom
fix/user-detail-default-security-tab

Conversation

@Shreyag02

@Shreyag02 Shreyag02 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

The user detail page always renders the Security tab, but landing on the bare /users/:userId (e.g. via the detail breadcrumb or a direct link) left the URL without the /security suffix, so the Security chip didn't appear selected. This PR makes /users/:userId/security the canonical default route via a route-level redirect, so the tab is always selected and the URL is consistent.

Changes

  • Add an index redirect from /users/:userId to /users/:userId/security, mirroring the existing org-detail default-tab pattern (members).

Technical Details

The :userId route is now an element-less path group with two children: an index route that renders <Navigate to="security" replace /> and a security route that renders UsersPage. Because the parent has no element, there's no <Outlet /> requirement — the matched child's element (UsersPage) renders directly. The redirect handles every entry into the bare user URL (breadcrumb, direct link), and the Security chip's existing active check (currentPath.startsWith(link.path)) then matches — no navbar change or component-level useEffect needed.

Test Plan

  • Manual testing completed
    • Verified /users/:userId redirects to /users/:userId/security with the Security tab selected.
    • Verified the breadcrumb avatar/name lands on the /security URL via the redirect.
    • Verified user row clicks (already targeting /security) still work as before.
    • Verified unknown subpaths (e.g. /users/:userId/foo) no longer render the detail view (fall through to the app catch-all redirect).
  • Build and type checking passes

SQL Safety (if your PR touches *_repository.go or goqu.*)

N/A

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jul 14, 2026 8:55am

@coderabbitai

coderabbitai Bot commented Jul 13, 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 21360dd7-9bf0-49e1-8444-09e1dd00fba7

📥 Commits

Reviewing files that changed from the base of the PR and between aa092f0 and 2930cb6.

📒 Files selected for processing (2)
  • web/apps/admin/src/routes.tsx
  • web/sdk/admin/views/users/details/layout/navbar.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/sdk/admin/views/users/details/layout/navbar.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Updated user navigation so the Security breadcrumb and links open the user’s Security page.
    • User detail pages now default to the Security tab when accessed directly.
    • Improved nested routing for user security views in the admin interface.

Walkthrough

The admin user route now redirects bare user detail URLs to the security view. The user details navbar also links its Security breadcrumb and chip directly to the user security path.

Changes

User security routing

Layer / File(s) Summary
Default security route and breadcrumb
web/apps/admin/src/routes.tsx, web/sdk/admin/views/users/details/layout/navbar.tsx
The :userId index route redirects to security, and navbar Security links target /users/:id/security using a shared base path.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: paansinghcoder

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 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.

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.

@coveralls

coveralls commented Jul 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29319728310

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 44.876%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 37644
Covered Lines: 16893
Line Coverage: 44.88%
Coverage Strength: 12.54 hits per line

💛 - Coveralls

@Shreyag02
Shreyag02 requested a review from rohanchkrabrty July 14, 2026 06:14
Comment thread web/sdk/admin/views/users/details/layout/navbar.tsx Outdated
Comment thread web/apps/admin/src/pages/users/UsersPage.tsx Outdated
@Shreyag02
Shreyag02 merged commit dab6e85 into main Jul 14, 2026
8 checks passed
@Shreyag02
Shreyag02 deleted the fix/user-detail-default-security-tab branch July 14, 2026 09:24
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.

3 participants