Skip to content

[PB-6744]: fix/keep the login form mounted until the redirect to Drive - #2286

Open
terrerox wants to merge 2 commits into
masterfrom
fix/login-form-flicker
Open

terrerox wants to merge 2 commits into
masterfrom
fix/login-form-flicker

Conversation

@terrerox

@terrerox terrerox commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

After logging in, the login form briefly disappeared and an empty form reappeared on /login for about 50-70 ms before the redirect to Drive.

  • Cause: the gate in App.tsx treats every route without auth: false as protected, so while isAuthenticated && !isInitialized it swapped the login page for PreparingWorkspaceAnimation and then re-mounted an empty form
  • Fix: mark the login and signup routes in paths.json with "auth": false
  • The only consumers of the flag are App.tsx:139 and App.tsx:183
  • Added a unit test checking that /login and /new are public

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Summary by CodeRabbit

  • Bug Fixes
    • Login and signup routes are now explicitly available without an authenticated session. Their existing exact-match behavior remains unchanged, so the way these routes are matched has not changed. This makes the access rules for these entry points clear while preserving their existing routing behavior. No other route behavior is described as changed in this update.

/login and /new were not marked public, so the App gate swapped them for
PreparingWorkspaceAnimation after login and re-mounted an empty form
before redirecting.
@terrerox terrerox changed the title [_]: fix/keep the login form mounted until the redirect to Drive [PB-6744]: fix/keep the login form mounted until the redirect to Drive Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cad6768a-b7fe-414a-82a2-4f099ec9cf40
Commits

Reviewing files that changed from the base of the PR and between ba05c70 and b92ee31.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The signup and login routes now explicitly set auth to false. Tests check that /login and /new return view configurations with auth set to false.

Changes: Public route authentication

Layer / File(s) Summary
Route authentication settings and tests
src/app/routes/paths.json, src/services/config.service.test.ts
The signup and login routes set auth to false and retain exact matching. Tests check that /login and /new return view configurations with auth set to false.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested labels: bug

Merge Risk: Minimal · previous review ba05c

The change correctly keeps the login and signup forms reachable while authentication initializes, with no actionable merge-blocking risk identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly describes the main change: keeping the login form mounted until redirecting to Drive.
Description check Passed The description clearly explains the issue, cause, fix, affected routes, and unit test coverage. It follows the main template structure and includes the checklist. The Related Issues, Related Pull Req…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the issue, cause, fix, affected routes, and unit test coverage. It follows the main template structure and includes the checklist. The Related Issues, Related Pull Requests, Testing Process, and Additional Notes sections are not included, but the description remains mostly complete and relevant.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f8dcb8a7-e696-4c74-893c-5edb745850dd
Commits

Reviewing files that changed from the base of the PR and between 1269284 and ba05c70.

Files selected for processing: 2

  • src/app/routes/paths.json
  • src/services/config.service.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: b92ee31
Status: ✅  Deploy successful!
Preview URL: https://c3c42e0f.drive-web.pages.dev
Branch Preview URL: https://fix-login-form-flicker.drive-web.pages.dev

View logs

@terrerox terrerox self-assigned this Nov 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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