-
Notifications
You must be signed in to change notification settings - Fork 0
feat(auth): VPR-37 - Improve logged-out UX #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rlorenzo
commented
Dec 4, 2025
- Show welcome card with login button when user is not authenticated
- Change session timeout "Log in" button to navigate to /login instead of reloading the page
- Add login button to ProfilePic dropdown when logged out
- Remove Permission attribute from LayoutController so navigation loads for unauthenticated users
- Fixing linting issues
- Show welcome card with login button when user is not authenticated - Change session timeout "Log in" button to navigate to /login instead of reloading the page - Add login button to ProfilePic dropdown when logged out - Remove Permission attribute from LayoutController so navigation loads for unauthenticated users - Fixing linting issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the user experience for logged-out users by adding a welcoming interface and streamlining the login flow. The changes enable unauthenticated users to view the application shell with a login prompt, rather than being immediately redirected or seeing errors.
Key Changes:
- Removed the
Permissionattribute fromLayoutControllerto allow unauthenticated navigation API calls - Added welcome cards with login buttons in both Razor and Vue layouts for logged-out users
- Changed session timeout "Log in" button to use direct navigation (
href) instead of page reload - Enhanced error handling in Vue navigation components to gracefully handle unauthenticated API responses
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
web/Controllers/LayoutController.cs |
Removed Permission attribute and unused import to allow unauthenticated access to navigation endpoints |
web/Views/Shared/_VIPERLayout.cshtml |
Added conditional rendering of welcome card for logged-out users; commented out non-functional search UI |
web/Views/Shared/Components/SessionTimeout/Default.cshtml |
Updated session expired message and button to navigate to /login instead of reloading; fixed linting issues (strict equality, empty catch blocks) |
VueApp/src/layouts/ViperLayout.vue |
Removed authentication checks from navigation components; added welcome card for logged-out users; added default value for nav prop |
VueApp/src/layouts/ProfilePic.vue |
Added login button for unauthenticated users; improved formatting and added alt text to avatar image |
VueApp/src/layouts/MainNav.vue |
Enhanced error handling to gracefully handle failed navigation API calls for unauthenticated users |
VueApp/src/layouts/LeftNav.vue |
Enhanced error handling and null-safety checks for navigation API responses when unauthenticated |
VueApp/src/components/SessionTimeout.vue |
Updated to use href for login navigation; improved code formatting and linting consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Enable eqeqeq as warning for gradual adoption of strict equality - Fix == to === in SessionTimeout.vue, LeftNav.vue - Add error parameter to catch blocks for consistency (catch (_e))
- Add getLoginUrl() composable with reactive ReturnUrl parameter - Include ReturnUrl in all login links (Vue layouts, session timeout) - Show error pages to unauthenticated users without forcing login - Fix Sonar/oxlint warnings in HomeController and RequireLogin.ts