Skip to content

Conversation

@sea-snake
Copy link
Contributor

@sea-snake sea-snake commented Nov 28, 2025

Redirect to landing page when this page is visited directly. Reloading the unsupported page either manually or automatically due to inactivity, does not result in a redirect.

Changes

  • Updated unsupported page with beforeNavigate and afterNavigate hooks.

Tests

Manually verified the page behaves as expected, visiting /#authorize still redirects to /unsupported and is out of scope for this PR.

@sea-snake sea-snake requested a review from Copilot November 28, 2025 17:23
Copilot finished reviewing on behalf of sea-snake November 28, 2025 17:28
Copy link
Contributor

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 implements redirect logic for the unsupported browser page to prevent users from accessing it directly via URL while still allowing access after internal navigation and page reloads. The implementation uses SvelteKit's navigation lifecycle hooks combined with sessionStorage to track the navigation context.

Key changes:

  • Adds beforeNavigate hook to detect when users leave the page (including reloads) and sets a sessionStorage flag
  • Adds afterNavigate hook to check if the page was entered directly or after a reload, redirecting direct visits to the landing page
  • Uses sessionStorage with a cleanup mechanism to track reload state across page loads

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sea-snake sea-snake requested a review from aterga November 28, 2025 17:36
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.

1 participant