You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep navbar auth links available when the auth chunk fails - #1557
Isolate desktop and mobile navbar auth controls with the existing CatchBoundary pattern so a failed auth chunk leaves the page usable.
Show a login link for signed-out visitors and an account link for signed-in visitors. The fallback links request a fresh document.
Retain stale-app reload and Sentry reporting when recovery does not start.
Verification
Injected a chunk-load error into the desktop and mobile boundaries and checked all four auth-state combinations, fallback destinations, and reload/report handling.
Both targeted Sentry tests and formatting passed.
Direct local unit run passed 729 tests and skipped six. Three tests were blocked by local listener or headless Chrome startup.
Summary by CodeRabbit
Bug Fixes
Improved recovery when authentication controls encounter an error: available account or sign-in links remain accessible, and navigating through them refreshes the page when needed.
Authentication errors that cannot be resolved through a refresh are handled without disrupting the rest of the navigation bar.
Loading states and existing-user states continue to display their fallback indicators.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
No actionable comments were generated in the recent review.
Walkthrough
Navbar desktop and mobile auth controls now use error boundaries. When auth controls fail, the fallback link reflects the user state and reloads the document on navigation. The error handler attempts stale-app recovery before sending unrecovered errors to Sentry.
Changes: Navbar authentication controls
Layer / File(s)
Summary
Shared auth error handling and fallback selection src/components/Navbar.tsx
The shared error handler attempts stale-app recovery before capturing unrecovered errors in Sentry. The fallback link helper selects the label and icon from the user state and supports document reload.
Desktop and mobile auth boundaries src/components/Navbar.tsx
Desktop and mobile auth controls use error boundaries that render the state-dependent fallback link on failure. Existing loading fallbacks remain. The mobile fallback preserves its tab order and navigation handler.
The navbar auth controls now fall back to a login or account link if the auth chunk fails to load, so the page stays usable. No actionable merge risk remains in the supplied evidence.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title states the main change: navbar auth links stay available when the auth chunk fails. The raw summary confirms desktop and mobile auth controls are wrapped in CatchBoundary with a fallback lin…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title states the main change: navbar auth links stay available when the auth chunk fails. The raw summary confirms desktop and mobile auth controls are wrapped in CatchBoundary with a fallback link that shows Account or Log In/Sign In and reloads the document. The objectives describe the same goal. The title is specific and matches the changeset.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 39ef6bdf-a7d0-4ef3-9f6b-4174914ece3f
Commits
Reviewing files that changed from the base of the PR and between bff92ae and 1de0ae5.
Files selected for processing: 1
src/components/Navbar.tsx
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CatchBoundarypattern so a failed auth chunk leaves the page usable.Verification
Summary by CodeRabbit