fix(wizard): align reauthentication with account setup - #10459
Conversation
Replace the legacy QWidget reauthentication dialog with a QML window that shares the account wizard browser-auth content, footer, dimensions, and style tokens. Keep credential replacement isolated from account creation and remove the unreachable provider-signup widget stack and its orphaned helpers. Assisted-by: Codex:GPT-5 Signed-off-by: Rello <github@scherello.de>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1957df8f9
ℹ️ 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".
| | Qt.CustomizeWindowHint | ||
| | Qt.WindowTitleHint | ||
| | Qt.WindowSystemMenuHint | ||
| | Qt.WindowMinimizeButtonHint |
There was a problem hiding this comment.
Keep the minimize hint scoped to authentication windows
When opening any existing WizardStyledWindow consumer, this base-level flag now adds minimize decoration to ActivitiesWindow.qml, AssistantWindow.qml, SearchWindow.qml, and UserStatusWindow.qml; previously only AccountWizardWindow.qml explicitly opted into minimization. Keep this hint on the account and reauthentication windows, or explicitly preserve the existing chrome for the other consumers, so the reauthentication refactor does not change unrelated windows.
AGENTS.md reference: AGENTS.md:L25-L27
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f03bdf0288
ℹ️ 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".
f03bdf0 to
c1957df
Compare
Replaced the direct successful slotAuthResult() test with integration coverage through WebFlowCredentials::askFromUser(). Exercises real QML window creation, browser-flow polling, credential replacement, persistence invocation, automatic close, and account-registration safety. Added cancellation coverage by closing the actual QML window and verifying credentials remain unchanged. Added a safe Application null guard for standard Qt test runners. Assisted-by: Codex:GPT-5 Signed-off-by: Rello <github@scherello.de>
|
@claucambra can you check the quite complex test? it applied the new guidelines - but look complicated. opinion? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90296ac1d0
ℹ️ 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".
Assisted-by: Codex:GPT-5 Signed-off-by: Rello <github@scherello.de>
Assisted-by: Codex:GPT-5 Signed-off-by: Rello <github@scherello.de>
Assisted-by: Codex:GPT-5 Signed-off-by: Rello <github@scherello.de>
|
Artifact containing the AppImage: nextcloud-appimage-pr-10459.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
| enabled: !root.controller.busy | ||
| text: qsTranslate("AccountWizardWindow", "Cancel") | ||
| Layout.fillWidth: true | ||
| Layout.preferredWidth: 1 |
There was a problem hiding this comment.
I don't think the preferred width should ever be 1 for these buttons
| /* | ||
| * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: GPL-2.0-or-later | ||
| */ | ||
|
|
||
| import QtQuick | ||
|
|
||
| BrowserAuthPage { | ||
| id: root | ||
|
|
||
| descriptionText: root.controller.infoText | ||
| } |
There was a problem hiding this comment.
This component seems unnecessary to me...
| connect(this, &BrowserReAuthWindow::credentialsReady, this, &BrowserReAuthWindow::close, Qt::QueuedConnection); | ||
| connect(this, &BrowserReAuthWindow::cancelled, this, &BrowserReAuthWindow::close, Qt::QueuedConnection); | ||
|
|
||
| auto *const systray = Systray::instance(); |
There was a problem hiding this comment.
I think we should avoid auto *const in places where const auto achieves the same thing and is clearer
| return; | ||
| } | ||
|
|
||
| auto *engine = systray->trayEngine(); |
There was a problem hiding this comment.
Same here, this could also be const
| QVariantMap initialProperties; | ||
| initialProperties.insert(QStringLiteral("controller"), QVariant::fromValue<QObject *>(_controller)); |
There was a problem hiding this comment.
We can construct a QVariantMap with the values inserted here directly, making this more concise and allowing us to constify this value
| void BrowserReAuthWindow::show() | ||
| { | ||
| if (_loadFailed || !_window) { | ||
| QTimer::singleShot(0, this, [this] { |
There was a problem hiding this comment.
QMetaObject::invokeMethod is better than this
| readonly property int wizardStandaloneWindowMinimumWidth: 520 | ||
| readonly property int wizardStandaloneWindowMinimumHeight: 420 | ||
| readonly property int accountWizardWindowWidth: 600 | ||
| readonly property int accountWizardCompactHeight: 420 |
There was a problem hiding this comment.
Any reason to not reuse wizardStandaloneWindowMinimumHeight ?




Replace the legacy QWidget reauthentication dialog with a QML window that shares the account wizard browser-auth content, footer, dimensions, and style tokens.
Keep credential replacement isolated from account creation and remove the unreachable provider-signup widget stack and its orphaned helpers.
Assisted-by: Codex:GPT-5