fix(tray): restore pause and resume sync action - #10529
Conversation
- Restores the global Pause sync for all / Resume sync for all action lost during the tray-menu migration. - Adds the action to both Qt and macOS root tray menus, between Add account and Settings. - Centralizes availability and behavior in Systray. - Hides the action when no classic sync folders exist, including macOS File Provider mode. - Preserves the previous behavior across all configured accounts. - Adds regression coverage for visibility, labels, and pause/resume behavior across two accounts. 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: e8e7a36ef2
ℹ️ 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".
| #else | ||
| systray->toggleSyncPaused(); |
There was a problem hiding this comment.
Test the macOS tray control through its UI action
In the macOS branch, the regression test calls toggleSyncPaused() directly and never constructs NCTrayPopup or activates the new NCActionRow, so the test still passes if the action is omitted, mislabeled, or disconnected in nctraypopup.mm. Add a test seam that verifies the macOS popup's visibility, title, and action callback instead of bypassing the platform UI wiring.
AGENTS.md reference: AGENTS.md:L205-L209
Useful? React with 👍 / 👎.
claucambra
left a comment
There was a problem hiding this comment.
Production code looks good, just some small nitpicks and a more substantial comment on the test
| #ifndef Q_OS_MACOS | ||
| static QAction *syncControlAction(QMenu &menu, Systray *systray) | ||
| { | ||
| setupQtTrayContextMenu(&menu, systray); | ||
| return menu.findChild<QAction *>(QStringLiteral("traySyncControlAction")); | ||
| } | ||
| #endif |
There was a problem hiding this comment.
This test uses a lot of preprocessor conditions which makes this test difficult to read.
I think a better approach would be to split the macOS and Qt tests into two separate tests that are compiled/run conditionally depending on the host system
If there is common code in e.g. setup/teardown routines this can be extracted into a separate helper file
There was a problem hiding this comment.
@claucambra can you recheck? the tests were separated. added more codebase but might be more helpful for the future
Assisted-by: Codex:GPT-5 Signed-off-by: Rello <github@scherello.de>
|
Artifact containing the AppImage: nextcloud-appimage-pr-10529.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. |
|




Assisted-by: Codex:GPT-5
@kra-mo
this was a feature in the old user menu and was forgotten during migration.
I think we need to add it. Any objections?