Skip to content

Improve Sandbox Migration Experience - #9720

Merged
i2h3 merged 3 commits into
masterfrom
i2h3/fix/9686-sandbox-migration
Mar 30, 2026
Merged

Improve Sandbox Migration Experience#9720
i2h3 merged 3 commits into
masterfrom
i2h3/fix/9686-sandbox-migration

Conversation

@i2h3

@i2h3 i2h3 commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes #9686.

Summary

Upgrading from a pre-sandbox version of the app left sync folders inaccessible because they lacked security-scoped bookmarks. The previous experience was confusing in two ways:

  • The tray showed "Some files couldn't be synced" with no indication of what was actually wrong or what to do about it — no files had failed; the app simply could not reach the folders.
  • The settings window showed an error banner that read "This folder requires access re-approval. Click here to grant access" — the clickability was invisible, and there was no call-to-action button.

This PR replaces that experience with clear messaging and direct actions at every level of the UI.

Tray popover (SyncStatus.qml / SyncStatusSummary)

  • Detects any folder with a missing sandbox bookmark and shows "Reauthorization required" with the detail "Please grant access to your sync folders" instead of the generic sync-error state.
  • Adds an "Open settings" button that is only shown during this condition and replaces the "Sync now" button, which makes no sense in this context.
  • The button opens the settings window and automatically selects the account containing the first folder that needs re-approval, skipping the General tab entirely. This accounts for the timing of SettingsDialog's deferred showFirstPage() call so the correct account tab is shown reliably.

Settings window (FolderStatusDelegate / FolderStatusModel)

  • Changes the error banner text from "This folder requires access re-approval. Click here to grant access." to "Select the synchronization folder to grant access again."
  • Adds a visible native "Select Folder" push button below the error banner so the available action is obvious without requiring the user to know the entire banner is clickable.

Screenshots

User Notification

Bildschirmfoto 2026-03-27 um 16 20 13

Menu Bar Extra Popover

Bildschirmfoto 2026-03-27 um 16 20 23

Settings Window

Bildschirmfoto 2026-03-27 um 16 20 36

Test plan

  • Simulate sandbox migration by setting _needsSandboxBookmark = true on a folder
  • Verify the tray shows "Reauthorization required" and the "Open settings" button, and that "Sync now" is hidden
  • Verify clicking "Open settings" opens the settings window on the correct account tab, both when the dialog is freshly opened and when it is already open on a different tab
  • Verify the settings error banner shows the updated text and the "Select Folder" button
  • Verify that clicking "Select Folder" (or anywhere on the banner) opens the file picker and that confirming the correct folder clears all error states across both the tray and the settings window
  • Verify no visual or behavioural regressions on non-macOS builds

This pull request also comes with two additional unrelated commits:

  • Minor Xcode project settings changed with no effect on the built product
  • A few fixes in regard to incremental developer builds from Xcode (macdeployqt)

@i2h3 i2h3 self-assigned this Mar 27, 2026
@i2h3 i2h3 added os: 🍎 macOS Apple macOS, formerly also known as OS X feature: ☁️ GUI System tray icon and menu. design Design, UI, UX, etc. labels Mar 27, 2026
@i2h3 i2h3 added this to the 33.0.1 milestone Mar 27, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Mar 27, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Mar 27, 2026
@i2h3

i2h3 commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-33.0

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.

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@i2h3
i2h3 requested review from jancborchardt and kra-mo March 29, 2026 19:07
Comment thread src/gui/folderman.cpp Outdated
i2h3 added 3 commits March 30, 2026 09:56
Fixes a build issue where macdeployqt could not find libnextcloudsync
and libnextcloud_csync at build time because it only searched the Craft
prefix lib/ directory, but CMake outputs the dylibs to bin/. This caused
the installed app to reference dylibs via absolute build-tree paths instead
of @rpath, leading to code signature Team ID mismatches and launch crashes.
Adding -libpath=${BIN_OUTPUT_DIRECTORY} lets macdeployqt find, copy, and
fix up the dylibs correctly. BUILD_WITH_INSTALL_RPATH on the library
targets prevents cmake --install from undoing macdeployqt's work.

Signed-off-by: Iva Horn <[email protected]>
@i2h3
i2h3 force-pushed the i2h3/fix/9686-sandbox-migration branch from 1952236 to 314b3d1 Compare March 30, 2026 07:56
@github-actions

Copy link
Copy Markdown
Contributor

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

Digest: sha256:a642563f7508b6e94ce6d971aadf45ba3f3579a195cf82fda4007404e2ee81a0

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.

@jancborchardt jancborchardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yup, better than before. :)

@i2h3
i2h3 merged commit 6dff0fd into master Mar 30, 2026
19 of 21 checks passed
@i2h3
i2h3 deleted the i2h3/fix/9686-sandbox-migration branch March 30, 2026 09:03
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Mar 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)
1 New Bugs (required ≤ 0)
D Maintainability Rating on New Code (required ≥ A)
133 New Code Smells (required ≤ 0)
E Reliability Rating on New Code (required ≥ A)

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

design Design, UI, UX, etc. feature: ☁️ GUI System tray icon and menu. os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

[Bug]: re-authorizing of sync folders required ("Some files could not be synced")

5 participants