Skip to content

fix(tray): simplify disconnected account menu - #10461

Merged
Rello merged 3 commits into
masterfrom
bugfix/InactiveAccount
Jul 30, 2026
Merged

fix(tray): simplify disconnected account menu#10461
Rello merged 3 commits into
masterfrom
bugfix/InactiveAccount

Conversation

@Rello

@Rello Rello commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

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:
Bildschirmfoto 2026-07-27 um 19 27 43

Offline:
Bildschirmfoto 2026-07-27 um 19 28 00

Re-Auth:
Bildschirmfoto 2026-07-27 um 19 28 17

Assisted-by: Codex:GPT-5

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]>
@Rello Rello added this to the 34.0.1 milestone Jul 27, 2026

@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: 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".

Comment on lines +740 to +742
const auto reconnectAction = addMenuAction(menu,
QIcon{},
QCoreApplication::translate("OCC::AccountSettings", "Log in"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread src/gui/tray/trayaccountmenupolicy.h Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10461.zip

Digest: sha256:6688b5ce1dc9fe6b2b9eba547b4f684ec84e4ca9a99e87306e67d75e50fd90d9

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 claucambra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, just a small comment

Comment thread src/gui/macOS/trayaccountpopup/ncaccountactionspopup.mm
… their own variables

Assisted-by: Codex:GPT-5
Signed-off-by: Rello <[email protected]>

@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: 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".

Comment on lines +61 to +63
QCOMPARE_EQ(
TrayAccountMenuPolicy::reconnectMode(false, false, true),
TrayAccountMenuPolicy::ReconnectMode::RetryConnection);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@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: 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. */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document both reconnect paths

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 👍 / 👎.

@Rello
Rello merged commit 507c462 into master Jul 30, 2026
21 of 22 checks passed
@Rello
Rello deleted the bugfix/InactiveAccount branch July 30, 2026 15:23
@Rello

Rello commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-34.0

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
22.1% Coverage on New Code (required ≥ 80%)
C Maintainability Rating on New Code (required ≥ A)
115 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants