Skip to content

Comments

Server Actions Integration for File Provider Extension#9469

Merged
i2h3 merged 2 commits intomasterfrom
i2h3/feature/server-features-integration
Feb 21, 2026
Merged

Server Actions Integration for File Provider Extension#9469
i2h3 merged 2 commits intomasterfrom
i2h3/feature/server-features-integration

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Feb 18, 2026

Implements the integration for context menu items defined by the server for the macOS file provider extension.

This builds on top of #9403 and replaces #9458 and #9461.

This depends on a pull request and new release of NextcloudCapabilitiesKit.

@i2h3 i2h3 added this to the 33.0.0 milestone Feb 18, 2026
@i2h3 i2h3 self-assigned this Feb 18, 2026
@i2h3 i2h3 added the os: 🍎 macOS Apple macOS, formerly also known as OS X label Feb 18, 2026
@i2h3 i2h3 added feature: ☁️ GUI System tray icon and menu. feature: 🐚 shell integration 3. to review feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. labels Feb 18, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Feb 18, 2026
@i2h3 i2h3 force-pushed the i2h3/feature/server-features-integration branch from f7584a3 to 83f5703 Compare February 18, 2026 14:58
@i2h3 i2h3 force-pushed the i2h3/feature/server-features-integration branch from 83f5703 to 270c823 Compare February 18, 2026 19:19
@i2h3
Copy link
Collaborator Author

i2h3 commented Feb 18, 2026

The code changes cannot be tested against a Nextcloud server with client integrations capability right now due to the only known host having unrelated service problems which prevent the file provider extension from working. Though, this should be it.

@i2h3
Copy link
Collaborator Author

i2h3 commented Feb 19, 2026

I found out this can very verified easily by setting up a local Docker container and install the contacts and analytics apps in Nextcloud server. Then the capabilities are automatically exposed and we are ready to go.

@i2h3 i2h3 force-pushed the i2h3/feature/server-features-integration branch from 270c823 to 913d377 Compare February 20, 2026 09:47
@i2h3
Copy link
Collaborator Author

i2h3 commented Feb 20, 2026

I have a working implementation now and want to wait for the checks and Copilot review.

Further, I introduced logging in the FinderSync extension on the side and fixed its socket file resolution which is broken in the release candidate.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements server actions integration for the macOS File Provider extension, enabling context menu items defined by the server to be displayed in Finder for files managed by the File Provider. The implementation uses XPC (Cross-Process Communication) to communicate between the File Provider extension and the main desktop application, building on previous work in PR #9403 and replacing earlier attempts (#9458 and #9461).

Changes:

  • Added XPC protocol method to communicate file action requests from File Provider extension to main app
  • Integrated server capability checks to determine which files should display the "File actions" context menu item based on MIME type filters
  • Extended FileActionsModel to support file provider scenarios without sync folders by accepting optional fileId and remoteItemPath parameters
  • Migrated FinderSync extensions from NSLog to os_log for better logging infrastructure
  • Updated dependency on NextcloudCapabilitiesKit to version 2.5.0 to support new context menu filtering capabilities

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/gui/systray.h/cpp Added methods to handle file provider file actions dialog creation with support for non-sync-folder scenarios
src/gui/owncloudgui.cpp Connected File Provider service signal to systray slot for displaying file actions dialog
src/gui/macOS/fileproviderservice.mm/h Implemented XPC callback to receive file actions requests from File Provider extension and emit Qt signal
src/gui/integration/fileactionsmodel.h/cpp Extended model to support optional fileId and remoteItemPath for file provider scenarios without sync folders
src/gui/integration/FileActionsWindow.qml Added fileId and remoteItemPath properties passed to FileActionsModel
shell_integration/MacOSX/.../FileProviderExtension.swift Added manager property for accessing NSFileProviderManager APIs
shell_integration/MacOSX/.../FileProviderExtension+CustomActions.swift Implemented FileActionsAction custom action handler
shell_integration/MacOSX/.../AppProtocol.h Defined presentFileActions XPC protocol method
shell_integration/MacOSX/.../FileProviderExt/Info.plist Added File actions context menu action definition with activation rule
shell_integration/MacOSX/.../FinderSyncExt/Info.plist Updated to use NCApplicationGroupIdentifier configuration
shell_integration/MacOSX/.../FinderSync.m Migrated from NSLog to os_log and updated to use group identifier from Info.plist
shell_integration/MacOSX/.../FinderSyncSocketLineProcessor.m Migrated from NSLog to os_log
shell_integration/MacOSX/.../Item.swift Added displayFileActions property and included it in userInfo dictionary
shell_integration/MacOSX/.../Item+getContextMenuItemTypeFilters.swift New file implementing capability-based MIME type filter retrieval
shell_integration/MacOSX/.../Item+typeHasApplicableContextMenuItems.swift New file implementing MIME type matching against server filters
shell_integration/MacOSX/.../SendableItemMetadata+Array.swift Optimized bulk item conversion to fetch filters once and reuse for all items
shell_integration/MacOSX/.../Item+*.swift Propagated displayFileActions parameter through all Item initialization paths
shell_integration/MacOSX/.../Package.swift Updated NextcloudCapabilitiesKit dependency to 2.5.0
shell_integration/MacOSX/.../Package.resolved Updated package resolution for NextcloudCapabilitiesKit 2.5.0
shell_integration/MacOSX/.../ItemPropertyTests.swift Updated all test cases to include displayFileActions parameter
shell_integration/MacOSX/.../MockEnumerator.swift Updated to pass displayFileActions parameter
shell_integration/MacOSX/.../Item+Init.swift Updated test helper to pass displayFileActions parameter

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

@i2h3 i2h3 force-pushed the i2h3/feature/server-features-integration branch 3 times, most recently from d60d7d5 to 11cacfa Compare February 20, 2026 16:09
@i2h3
Copy link
Collaborator Author

i2h3 commented Feb 20, 2026

The failed actions are unrelated to my changes, as it appears.

@i2h3 i2h3 marked this pull request as ready for review February 20, 2026 16:32
@i2h3 i2h3 requested a review from Copilot February 20, 2026 16:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.


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

i2h3 added 2 commits February 20, 2026 22:51
…ension

- Introduced a new presentFileActions: method in the XPC interface of the main app.
- Implemented the presentFileActions: method in the main app to call existing code for file action presentation.
- Added the new custom action to the build-time declarations of custom actions in the Info.plist of the file provider extension.
- Extended the custom actions handling code switch to process the invocation and call the main app via XPC.

Chores:
- Created a shared file provider manager object and related stored property for the lifetime of the file provider extension object to be used in various places in its implementation. In example: resolving the user-visible URL of the item to present file actions for.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/feature/server-features-integration branch from 11cacfa to 5eeebfa Compare February 20, 2026 21:51
@github-actions
Copy link

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

Digest: sha256:288f3940487a8ae03eae28eb0a4e2fe046a98f112a60d9304dc1ec4b6a936420

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.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
38 New Code Smells (required ≤ 0)
C Maintainability 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

@i2h3 i2h3 merged commit 1a425d9 into master Feb 21, 2026
21 of 24 checks passed
@i2h3 i2h3 deleted the i2h3/feature/server-features-integration branch February 21, 2026 14:39
@github-project-automation github-project-automation bot moved this from 🧭 Planning evaluation (don't pick) to ☑️ Done in 💻 Desktop Clients team Feb 21, 2026
@i2h3
Copy link
Collaborator Author

i2h3 commented Feb 23, 2026

/backport to stable-33.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: ☁️ GUI System tray icon and menu. feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. feature: 🐚 shell integration os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

1 participant