Skip to content

fix (desktop): reauth docker/auth flashing bug from race condition#1129

Merged
AviPeltz merged 1 commit into
mainfrom
reauth-docker
Feb 3, 2026
Merged

fix (desktop): reauth docker/auth flashing bug from race condition#1129
AviPeltz merged 1 commit into
mainfrom
reauth-docker

Conversation

@AviPeltz
Copy link
Copy Markdown
Collaborator

@AviPeltz AviPeltz commented Feb 2, 2026

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • Bug Fixes
    • Improved authentication session handling to ensure protected pages wait for session initialization to complete before rendering, preventing potential redirect issues during authentication loading.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

The authenticated layout component now introduces a pending state check from the auth client. It adds a guard that prevents rendering while the authentication session is resolving, delaying subsequent redirect logic until the session state is determined.

Changes

Cohort / File(s) Summary
Authentication Session Pending Guard
apps/desktop/src/renderer/routes/_authenticated/layout.tsx
Introduces isPending state check from authClient.useSession() and adds conditional guard to prevent rendering until session resolution completes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • CharlieHelps

Poem

🐰 A guard stands watch at the gate so tall,
Awaiting auth before rendering all,
No jumping the queue, no leaping too quick,
The pending check's a trusty trick! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The pull request description is largely incomplete with only the Type of Change section minimally filled out (Bug fix selected). All other required sections lack substantive content. Complete the Description section with details about the authentication session pending issue being fixed. Add related GitHub issue links, describe testing steps performed, and provide any additional context about the Docker reauth fix.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing a reauthentication flash bug caused by a race condition in the desktop app, which aligns with the code change that adds session pending guard logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch reauth-docker

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

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

@AviPeltz AviPeltz changed the title reauth docker fix (desktop): reauth docker Feb 2, 2026
@AviPeltz AviPeltz marked this pull request as ready for review February 3, 2026 04:40
@AviPeltz AviPeltz changed the title fix (desktop): reauth docker fix (desktop): reauth docker/auth flashing bug from race condition Feb 3, 2026
@AviPeltz AviPeltz merged commit 176e4b0 into main Feb 3, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

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