Skip to content

Conversation

@tejasdu
Copy link

@tejasdu tejasdu commented Dec 5, 2025

This PR fixes the incorrect redirect behavior in the AuthScreen component.
Previously, closing the WelcomeScreen component without a prior navigation history caused the app to navigate to /, which resulted in a broken or blank experience.

Root Cause:
The logic inside onClose attempted:

      history.action === 'PUSH' ? history.goBack() : history.push('/');

For users entering the app directly (no prior push state), history.push('/') sent them to the base route, which does not render the board UI.

To fix this, the fallback routes was redone and routing logic was changed to accomodate for this fix.

Unit tests were also added to AuthScreen.component.test.js to cover:
- Redirecting with a populated history stack
- Redirecting without a history stack (new behavior)
- Verifying that /board/root is the fallback route
- Ensuring no regression in existing render behavior

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