Skip to content

Confirm sign-in and stop showing Login to signed-in users - #14

Merged
code-kasha merged 1 commit into
mainfrom
claude/clever-tesla-9x9ams
Sep 26, 2026
Merged

code-kasha merged 1 commit into
mainfrom
claude/clever-tesla-9x9ams

Conversation

@code-kasha

Copy link
Copy Markdown
Owner

Summary

Fixes three problems reported on the deployed demo:

  • No feedback on sign-in. Login went straight to the dashboard with no confirmation. The button now reads "Signing in..." while the request runs, and a "Signed in successfully." toast confirms it.
  • /login showed the form to users who were already signed in. It now redirects to the page they were headed for (state.from), or to /dashboard.
  • The public page always offered Login. The header on / said "Login" even during a session, so the app looked logged out. It now shows Go to dashboard while a session is stored.

The deployment itself was healthy: Neon shows all 34 migrations applied, the admin account created, and the sign-in token issued.

Testing

  • New tests cover each case, and all of them fail before this change. Frontend tests: 74 passed. Lint and build are clean.
  • Browser check against the API:
    • / shows Login; after signing in, the confirmation toast appears.
    • / then shows Go to dashboard, which opens the dashboard.
    • Opening /login while signed in goes to /dashboard.
    • After logout, / shows Login again.

🤖 Generated with Claude Code

https://claude.ai/code/session_018oMHDqDASywmwc7ncmxtCY


Generated by Claude Code

Reported on the deployed demo:
- signing in went straight to the dashboard with no feedback; now the
  button reads "Signing in..." while the request runs and a "Signed in
  successfully." toast confirms it
- /login showed the form to a user who was already signed in; it now
  redirects to the page they were headed for (state.from) or /dashboard
- the public page's header always offered "Login", so a signed-in user
  landing on / looked logged out; it now shows "Go to dashboard" while a
  session is stored

Tests cover each case (all fail before this change); verified in a
browser against the API. Frontend test count now 74.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018oMHDqDASywmwc7ncmxtCY
@code-kasha
code-kasha merged commit cd61290 into main Sep 26, 2026
4 checks passed
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