Skip to content

fix: show loader instead of login form when demo mode is active#1588

Merged
gugu merged 1 commit into
mainfrom
fix/login-demo-mode-loader
Feb 10, 2026
Merged

fix: show loader instead of login form when demo mode is active#1588
gugu merged 1 commit into
mainfrom
fix/login-demo-mode-loader

Conversation

@gugu

@gugu gugu commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Prevents the login form from flashing on screen when /login?mode=demo is loaded, while app.component handles the demo login API call.

Prevents the login form from flashing on screen when /login?mode=demo
is loaded, while app.component handles the demo login API call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 10, 2026 13:30
@gugu gugu enabled auto-merge (squash) February 10, 2026 13:30
@gugu gugu merged commit 6163cdc into main Feb 10, 2026
19 checks passed
@gugu gugu deleted the fix/login-demo-mode-loader branch February 10, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the login page to avoid briefly rendering the login form when mode=demo is present in the query string, showing a loader instead while the app initiates demo login.

Changes:

  • Add isDemoMode derived from ActivatedRoute query params to drive demo-mode UI.
  • Render a demo loader (mat-spinner + message) instead of the login form when demo mode is active.
  • Skip Google One Tap initialization when demo mode is active.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/app/components/login/login.component.ts Adds demo-mode flag, imports spinner module, and gates Google One Tap init.
frontend/src/app/components/login/login.component.html Introduces @if (isDemoMode) branch to show a loader instead of the login form.
frontend/src/app/components/login/login.component.css Adds styling for the demo loader layout/text.

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

Comment on lines +3 to +7
@if (isDemoMode) {
<div class="wrapper background-decoration">
<div class="login-page demo-loader">
<mat-spinner diameter="48"></mat-spinner>
<p class="mat-body-1 demo-loader__text">Loading demo account...</p>

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New demo-mode branch introduces UI/behavior (show spinner + hide login form when mode=demo) but there is no corresponding unit test. Please extend login.component.spec.ts to cover mode=demo (e.g., set query params to demo, assert spinner/loader text is rendered and the login form is not, and optionally assert Google One Tap init is skipped).

Copilot uses AI. Check for mistakes.
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.

2 participants