Skip to content

fix(web): update protected route layout for security agent and usage …#4287

Open
FaisalMisbah23 wants to merge 1 commit into
Kilo-Org:mainfrom
FaisalMisbah23:fix/web-protected-route-layout
Open

fix(web): update protected route layout for security agent and usage …#4287
FaisalMisbah23 wants to merge 1 commit into
Kilo-Org:mainfrom
FaisalMisbah23:fix/web-protected-route-layout

Conversation

@FaisalMisbah23

@FaisalMisbah23 FaisalMisbah23 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix unauthenticated access handling for security agent and usage pages.

Previously, protected route content in security agent and usage could render before authentication was fully enforced, which allowed logged-out users to reach page content and then see an auth error.

This change enforces the protected route guard at the layout level and adds coverage, so unauthenticated users are redirected before protected content renders.

Fixes #4286

Verification

  • Confirmed unauthenticated users are redirected
  • Added test coverage for the protected route authentication requirement

Visual Changes

N/A

Reviewer Notes

This change applies the authentication guard at the layout level so all protected routes under the app hierarchy require authentication before rendering.

@kilo-code-bot

kilo-code-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • apps/web/src/app/(app)/protected-routes.test.ts
  • apps/web/src/app/(app)/security-agent/layout.tsx
  • apps/web/src/app/(app)/usage/page.tsx

Reviewed by gpt-5.4-20260305 · Input: 54.8K · Output: 6.8K · Cached: 236K

Review guidance: REVIEW.md from base branch main

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.

Unauthenticated users can access usage and Security Agent pages

1 participant