Skip to content

feat: add default_action field to files-actions-menu registration#887

Open
jvdp wants to merge 2 commits into
nextcloud:mainfrom
jvdp:feat/default-actions
Open

feat: add default_action field to files-actions-menu registration#887
jvdp wants to merge 2 commits into
nextcloud:mainfrom
jvdp:feat/default-actions

Conversation

@jvdp
Copy link
Copy Markdown

@jvdp jvdp commented May 18, 2026

fixes #748

@jvdp jvdp force-pushed the feat/default-actions branch from 0b814e3 to 38390e7 Compare May 18, 2026 21:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a defaultAction field to file action menu registration. The OCS V2 controller accepts and validates the parameter ('' → null, or 'default'/'hidden'), the service persists it, the entity exposes and serializes default_action, a migration adds the nullable DB column, and the frontend maps fileAction.default_action to action.default. PHP and JS tests cover valid, empty, and invalid inputs.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add default_action field to files-actions-menu registration' clearly and concisely describes the main change in the changeset.
Description check ✅ Passed The description 'fixes #748' is related to the changeset, linking to the issue requesting default file action registration support.
Linked Issues check ✅ Passed The PR implements the proposed solution from issue #748 by adding a default_action field to the files-actions-menu registration API with proper validation and persistence across PHP and JavaScript layers.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing default_action support: controller endpoint updates, database entity and migration, service layer updates, JavaScript frontend changes, and corresponding tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@oleksandr-nc
Copy link
Copy Markdown
Contributor

@jvdp , could you rebase the PR when you have time?

@jvdp jvdp force-pushed the feat/default-actions branch 3 times, most recently from c757e82 to 9f54fde Compare May 19, 2026 09:37
@jvdp
Copy link
Copy Markdown
Author

jvdp commented May 19, 2026

@oleksandr-nc rebase done and also fixed up a bit. The second commit is to fix a bug found on CI.

jvdp added 2 commits May 19, 2026 12:47
fixes nextcloud#748

Signed-off-by: Jaap van der Plas <jvdplas@gmail.com>
…persists

Signed-off-by: Jaap van der Plas <jvdplas@gmail.com>
@jvdp jvdp force-pushed the feat/default-actions branch from 9f54fde to 747e363 Compare May 19, 2026 10:49
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.

Support default file action registration

2 participants