fix(tray): simplify disconnected account menu - #10461
Conversation
Hide server-backed sections for disconnected accounts and show only the local-folder and login actions. Reuse the account settings login flow and keep the native Qt and macOS tray implementations aligned. Add regression coverage for menu ordering and reconnect behavior. Assisted-by: Codex:GPT-5 Signed-off-by: Rello <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 044483cd62
ℹ️ 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".
| const auto reconnectAction = addMenuAction(menu, | ||
| QIcon{}, | ||
| QCoreApplication::translate("OCC::AccountSettings", "Log in")); |
There was a problem hiding this comment.
Label retry actions according to the reconnect mode
When an account is disconnected because of a network, maintenance, or configuration error rather than a voluntary sign-out, this entry still says “Log in,” but User::login() selects RetryConnection and calls freshConnectionAttempt() without starting a login flow. This gives users a misleading action in every non-signed-out disconnected state; choose the label from reconnectMode() and make the corresponding change in the macOS popup.
Useful? React with 👍 / 👎.
|
Artifact containing the AppImage: nextcloud-appimage-pr-10461.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. |
claucambra
left a comment
There was a problem hiding this comment.
Looks good to me, just a small comment
… their own variables Assisted-by: Codex:GPT-5 Signed-off-by: Rello <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 823d3d09dd
ℹ️ 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".
| QCOMPARE_EQ( | ||
| TrayAccountMenuPolicy::reconnectMode(false, false, true), | ||
| TrayAccountMenuPolicy::ReconnectMode::RetryConnection); |
There was a problem hiding this comment.
Exercise the reconnect operation in the regression test
This test verifies only the pure reconnectMode() selector, so it still passes if User::login() fails to invoke freshConnectionAttempt(), invokes the wrong operation, or omits the certificate reset for a non-signed-out disconnected account. Add a regression test through User::login() or another testable click-path seam that asserts the actual sign-in/retry side effects; the repository requires bugfix tests to exercise behavior through a supported or testable interface.
AGENTS.md reference: AGENTS.md:L207-L209
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90cfefaa4c
ℹ️ 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".
| - (void)openActivitiesForIndex:(int)index; | ||
| /** @brief Closes the popups and reveals the given account's local folder (or file provider domain) in Finder. */ | ||
| - (void)openLocalFolderForIndex:(int)index; | ||
| /** @brief Closes the popups and starts the sign-in flow for the given account. */ |
There was a problem hiding this comment.
For disconnected but not signed-out accounts, such as network, maintenance, or configuration failures, reconnectForIndex: ultimately calls User::login(), which selects RetryConnection and invokes freshConnectionAttempt() rather than starting a sign-in flow. Update this declaration and the matching NCAccountActionsPopup type comment to describe both possible outcomes; the current API documentation contradicts the implementation.
AGENTS.md reference: AGENTS.md:L83-L87
Useful? React with 👍 / 👎.
|
/backport to stable-34.0 |
|




fix(tray): simplify disconnected account menu
Hide server-backed sections for disconnected accounts and show only the local-folder and login actions.
Reuse the account settings login flow and keep the native Qt and macOS tray implementations aligned.
Add regression coverage for menu ordering and reconnect behavior.
Online:

Offline:

Re-Auth:

Assisted-by: Codex:GPT-5