Skip to content

feat(login): persist Remember Me preference#219

Merged
githubsaturn merged 1 commit into
caprover:masterfrom
bestony:feat/remember-me-local-storage
Jul 17, 2026
Merged

feat(login): persist Remember Me preference#219
githubsaturn merged 1 commit into
caprover:masterfrom
bestony:feat/remember-me-local-storage

Conversation

@bestony

@bestony bestony commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Persist the Remember Me selection in localStorage under CAPROVER_REMEMBER_ME_OPTION.
  • Restore the saved selection when the login form loads; missing, malformed, non-integer, and unsupported values fall back to NO_SESSION.
  • Save every radio selection immediately, including No session persistence.
  • Pass the selected storage option directly through the login submit callback so the successful login cannot read stale parent state.
  • Preserve the existing authentication behavior: session tokens remain in sessionStorage, local tokens remain in localStorage, and the Remember Me preference is independent of auth token cleanup.

Demo Video

Built-in.Retina.Display.mp4

Tests

  • CI=true yarn test --watchAll=false --runInBand (25 tests passed)
  • yarn tslint (passed)
  • yarn formatter (passed)
  • yarn build (passed)
  • CYPRESS_BASE_URL=http://localhost:4501 yarn test:e2e --spec cypress/e2e/login.cy.ts (9 tests passed)

The Cypress server was run independently on port 4501. An additional direct yarn tsc --noEmit check still reports existing dependency declaration errors in node_modules; the application build and dev-server TypeScript checks passed.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d6680432-b0b8-4eeb-951c-72a4fed5f1a2

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@githubsaturn
githubsaturn merged commit c1738f6 into caprover:master Jul 17, 2026
4 checks passed
@githubsaturn

Copy link
Copy Markdown
Collaborator

Thanks!

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