Skip to content

Fix endless loop in wizard od failed auth - #1090

Open
TheOneRing wants to merge 2 commits into
mainfrom
work/loop
Open

Fix endless loop in wizard od failed auth#1090
TheOneRing wants to merge 2 commits into
mainfrom
work/loop

Conversation

@TheOneRing

Copy link
Copy Markdown
Contributor

No description provided.

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.

🟡 Changes recommended

There are confirmed control-flow issues that can emit success after failure (and still run WebFinger lookup on insecure-url errors), plus null-safety gaps for the new “OAuth pointer may be null” behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adjusts the OAuth credentials step in the new setup wizard to avoid re-triggering authentication indefinitely after a failed OAuth attempt, by introducing an explicit “failed/error” state and a retry path to restart authentication from the UI.

Changes:

  • Add a retry signal (evaluationRetry) and wire it through the controller to re-evaluate the current wizard state without treating it as a failure.
  • Update the OAuth credentials wizard state to support a “failed” mode (no OAuth object) and allow restarting auth from the page/UI.
  • Make QmlOAuthCredentials tolerate OAuth* == nullptr for error-state rendering.
File summaries
File Description
src/gui/newwizard/states/oauthcredentialssetupwizardstate.h Extend credentials state constructor to accept a “failed” flag.
src/gui/newwizard/states/oauthcredentialssetupwizardstate.cpp Add failed-mode behavior, restart wiring, and updated OAuth result handling.
src/gui/newwizard/states/abstractsetupwizardstate.h Introduce evaluationRetry signal for retrying a state evaluation.
src/gui/newwizard/setupwizardcontroller.cpp Pass failure reason into credentials state and add retry handling in controller.
src/gui/newwizard/setupwizardcontroller_p.h Extend ChangeReason with EvaluationRetry.
src/gui/newwizard/pages/oauthcredentialssetupwizardpage.h Add requestAuthRestart signal from the credentials page.
src/gui/newwizard/pages/oauthcredentialssetupwizardpage.cpp Forward QML restart requests to the page signal.
src/gui/creds/qmlcredentials.h Document that OAuth pointer may be null in error state; add restart signal.
src/gui/creds/qmlcredentials.cpp Guard OAuth signal hookups when OAuth is null (error state).
Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/gui/newwizard/states/oauthcredentialssetupwizardstate.cpp
Comment thread src/gui/creds/qmlcredentials.cpp
Comment thread src/gui/newwizard/states/oauthcredentialssetupwizardstate.cpp Outdated
Comment thread src/gui/newwizard/setupwizardcontroller.cpp
@TheOneRing
TheOneRing marked this pull request as draft September 8, 2026 09:43
@TheOneRing
TheOneRing marked this pull request as ready for review September 8, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants