Skip to content

Conversation

@rlorenzo
Copy link
Contributor

@rlorenzo 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
Copilot AI review requested due to automatic review settings December 4, 2025 05:11
Copy link

Copilot AI left a 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 Permission attribute from LayoutController to 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
@rlorenzo rlorenzo requested a review from bsedwards December 5, 2025 02:33
@rlorenzo rlorenzo merged commit c3b5470 into main Dec 8, 2025
5 checks passed
@rlorenzo rlorenzo deleted the VPR-37-fix-cms-logout branch December 8, 2025 20:44
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