Skip to content

🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths#14695

Merged
Innei merged 3 commits into
canaryfrom
pr-14694
May 12, 2026
Merged

🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths#14695
Innei merged 3 commits into
canaryfrom
pr-14694

Conversation

@Innei

@Innei Innei commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the state-management gap identified in #14694 (discussion).

pendingLoginMethod was never reset in failure/cancel paths, which could leave users stuck on the login-method UI without a "Get Started" path — even when a prior authorization was still valid.

Changes

Added setPendingLoginMethod(null) in three failure/cancel handlers:

  1. authorizationFailed broadcast — clears pending state so the authorized fallback can re-appear
  2. authorizationProgress cancelled phase — resets on user-initiated cancel
  3. remoteServerSyncError effect — resets when connectRemoteServer throws before config changes

Testing

  • Verified all three paths now restore authorizedLoginMethod as the fallback for successLoginMethod
  • Success path (broadcast authorizationSuccessful) already cleared pendingLoginMethod — unchanged
  • Manual cancel (handleCancelAuth / handleBackToLoginMethods) already cleared it — unchanged

Innei and others added 2 commits May 12, 2026 00:57
Clear pendingLoginMethod in authorizationFailed, authorizationProgress
cancelled, and remoteServerSyncError handlers to prevent users getting
stuck without a Get Started path when a re-auth attempt fails but a
prior authorization is still valid.
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment May 11, 2026 5:53pm

Request Review

@sourcery-ai sourcery-ai Bot 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.

Sorry @Innei, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 11, 2026
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.17%. Comparing base (98156db) to head (eb1ec1c).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@           Coverage Diff            @@
##           canary   #14695    +/-   ##
========================================
  Coverage   66.17%   66.17%            
========================================
  Files        2899     2899            
  Lines      253982   253982            
  Branches    25691    24834   -857     
========================================
  Hits       168084   168084            
  Misses      85745    85745            
  Partials      153      153            
Flag Coverage Δ
app 60.55% <ø> (ø)
database 91.83% <ø> (ø)
packages/agent-runtime 80.48% <ø> (ø)
packages/builtin-tool-lobe-agent 83.41% <ø> (ø)
packages/context-engine 83.99% <ø> (ø)
packages/conversation-flow 92.43% <ø> (ø)
packages/file-loaders 87.60% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.94% <ø> (ø)
packages/model-runtime 83.72% <ø> (ø)
packages/prompts 70.39% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 5.44% <ø> (ø)
packages/utils 88.02% <ø> (ø)
packages/web-crawler 88.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 66.83% <ø> (ø)
Services 54.17% <ø> (ø)
Server 71.62% <ø> (ø)
Libs 56.16% <ø> (ø)
Utils 82.51% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b49464687b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/routes/(desktop)/desktop-onboarding/features/LoginStep.tsx
@Innei Innei merged commit b29816e into canary May 12, 2026
42 of 43 checks passed
@Innei Innei deleted the pr-14694 branch May 12, 2026 06:30
@arvinxx arvinxx mentioned this pull request May 12, 2026
Coooolfan pushed a commit to Coooolfan/lobehub that referenced this pull request May 12, 2026
…lobehub#14695)

* 🐛 fix(desktop): focus onboarding auth success state

* 🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths

Clear pendingLoginMethod in authorizationFailed, authorizationProgress
cancelled, and remoteServerSyncError handlers to prevent users getting
stuck without a Get Started path when a re-auth attempt fails but a
prior authorization is still valid.

* Delete src/routes/(desktop)/desktop-onboarding/features/LoginStep.test.tsx

---------

Co-authored-by: Innei <inbox@innei.in>
Innei added a commit to Innei/lobehub that referenced this pull request May 12, 2026
…lobehub#14695)

* 🐛 fix(desktop): focus onboarding auth success state

* 🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths

Clear pendingLoginMethod in authorizationFailed, authorizationProgress
cancelled, and remoteServerSyncError handlers to prevent users getting
stuck without a Get Started path when a re-auth attempt fails but a
prior authorization is still valid.

* Delete src/routes/(desktop)/desktop-onboarding/features/LoginStep.test.tsx

---------

Co-authored-by: Innei <inbox@innei.in>
emaxlele pushed a commit to emaxlele/lobehub that referenced this pull request May 12, 2026
…lobehub#14695)

* 🐛 fix(desktop): focus onboarding auth success state

* 🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths

Clear pendingLoginMethod in authorizationFailed, authorizationProgress
cancelled, and remoteServerSyncError handlers to prevent users getting
stuck without a Get Started path when a re-auth attempt fails but a
prior authorization is still valid.

* Delete src/routes/(desktop)/desktop-onboarding/features/LoginStep.test.tsx

---------

Co-authored-by: Innei <inbox@innei.in>
arvinxx pushed a commit that referenced this pull request May 12, 2026
…#14695)

* 🐛 fix(desktop): focus onboarding auth success state

* 🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths

Clear pendingLoginMethod in authorizationFailed, authorizationProgress
cancelled, and remoteServerSyncError handlers to prevent users getting
stuck without a Get Started path when a re-auth attempt fails but a
prior authorization is still valid.

* Delete src/routes/(desktop)/desktop-onboarding/features/LoginStep.test.tsx

---------

Co-authored-by: Innei <inbox@innei.in>
This was referenced May 12, 2026
arvinxx added a commit that referenced this pull request May 13, 2026
# 🚀 LobeHub Release (20260513)

**Hotfix Scope:** Ship the canary backlog (111 PRs) onto main as a
fast-tracked patch — operator-focused, no weekly-style write-up.

> Brings the accumulated canary work into main: agent/task improvements,
hetero-agent fixes, desktop & onboarding polish, and several reliability
caps.

## ✨ What's Included

- **Agent & tasks** — Self-review proposal-to-action automation,
sub-agent dispatch consolidated to `lobe-agent`, AskUserQuestion wiring
for Claude Code, scheduler/hotkey/TodoList polish. (#14583, #14657,
#14715, #14639, #14732, #14707, #14713)
- **Home & onboarding** — Daily brief with linkable welcome + paired
input hint, inline skill auth in recommended task templates, cleanup of
captcha-on-signin and marketplace early-exit. (#14589, #14676, #14573,
#14598)
- **Bots & integrations** — Slack MPIM support, Discord DM fix,
slash-command + connect-error fixes, gateway client-tool plugin state.
(#14733, #14591, #14596)
- **Desktop & CLI** — Windows `.cmd` shim detection for `claude` /
`codex` CLIs, auth focus & pending-login reset fixes. (#14720, #14694,
#14695)
- **Reliability** — Cap web-crawler body size and image binary at safe
limits, attach error listeners to Neon/Node pools, reject inactive OIDC
access. (#14660, #14711, #14606, #14674)
- **Database** — `agent_operations` table + persist agent operations
from the runtime; switch user memory search to `paradedb.match(...)`.
(#14416, #14736, #14590)

## ⚙️ Upgrade

- **Self-hosted:** pull the latest image and restart. Drizzle migrations
(including the new `agent_operations` table) run automatically on boot.
lezi-fun pushed a commit to lezi-fun/lobehub that referenced this pull request May 13, 2026
…lobehub#14695)

* 🐛 fix(desktop): focus onboarding auth success state

* 🐛 fix(desktop): reset pendingLoginMethod on auth failure/cancel paths

Clear pendingLoginMethod in authorizationFailed, authorizationProgress
cancelled, and remoteServerSyncError handlers to prevent users getting
stuck without a Get Started path when a re-auth attempt fails but a
prior authorization is still valid.

* Delete src/routes/(desktop)/desktop-onboarding/features/LoginStep.test.tsx

---------

Co-authored-by: Innei <inbox@innei.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant