Repository navigation
Feature: header animation + Private route protection + Token expiry handling - #41
Conversation
✅ Deploy Preview for swagger-editor-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughAdds a new ChangesFeature and fix updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@src/app/`[locale]/history/page.tsx:
- Around line 1-3: The HistoryPage component is hardcoded and does not use the
active locale or translated copy. Update the default export in HistoryPage to
accept params, call setRequestLocale(locale) before rendering, and replace the
literal “History page” text with the corresponding Navigation.history
translation from the locale messages so the page is localized.
In `@src/components/layouts/Header/Header.module.css`:
- Around line 19-22: The dark header background in Header.module.css is using an
undefined Mantine CSS variable inside the rgba() value, so the translucent
effect is breaking. Update the dark-scheme .header rule to use a valid RGB
source by either switching to an existing Mantine RGB variable or defining and
using a body RGB custom property, keeping the change localized to the header
background styling.
In `@src/proxy.ts`:
- Around line 40-43: The JWT failure detection in the auth handling path is too
broad and should use Supabase’s structured error type instead of substring
matching. Update the invalid-token check in the logic around getClaims() to
inspect the returned AuthInvalidJwtError and its code value (bad_jwt) so only
true invalid/expired JWT cases trigger the redirect and cookie clearing. Keep
the existing auth flow in src/proxy.ts but replace the message-based includes
checks with the structured error guard at the same decision point.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8504ec01-be3f-4c81-80c9-ee015502de5b
📒 Files selected for processing (3)
src/app/[locale]/history/page.tsxsrc/components/layouts/Header/Header.module.csssrc/proxy.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/proxy.ts`:
- Around line 38-41: The token validation in `src/proxy.ts` only checks
`isAuthApiError(error)` for `bad_jwt`, so `getClaims()` errors of type
`AuthInvalidJwtError` are missed and stale cookies remain. Update the
`isInvalidToken` logic in the proxy flow to also recognize the local JWT
validation failure by checking the error’s `name` alongside the existing
`AuthApiError`/`code` condition, then keep the existing cookie purge path
unchanged for both cases.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Summary
What changed, and why?
Linked Issue: Closes #30 36 39
Screenshots
Summary by CodeRabbit
New Features
Bug Fixes