feat(files_sharing): unified sharing sidebar and dialog - #62593
Open
skjnldsv wants to merge 4 commits into
Open
Conversation
Member
Member
Author
|
this is more than a killswitch :) |
skjnldsv
force-pushed
the
feature/sidebar-sharing-dialog
branch
5 times, most recently
from
August 27, 2026 12:19
f97c68f to
6c27e20
Compare
skjnldsv
force-pushed
the
feature/sidebar-sharing-dialog
branch
2 times, most recently
from
September 3, 2026 03:07
a78b50a to
fe038c3
Compare
skjnldsv
marked this pull request as ready for review
September 3, 2026 07:54
skjnldsv
requested review from
Altahrim,
icewind1991,
kristian-zendato,
provokateurin,
sorbaugh and
susnux
and removed request for
a team
September 3, 2026 07:54
skjnldsv
force-pushed
the
feature/sidebar-sharing-dialog
branch
from
September 3, 2026 08:01
1fcafb0 to
83bb056
Compare
provokateurin
previously requested changes
Sep 3, 2026
susnux
approved these changes
Sep 3, 2026
skjnldsv
force-pushed
the
feature/sidebar-sharing-dialog
branch
from
September 3, 2026 09:57
83bb056 to
8822e13
Compare
susnux
reviewed
Sep 3, 2026
susnux
reviewed
Sep 3, 2026
provokateurin
self-requested a review
September 3, 2026 12:20
Member
Author
Right, I was thinking of vue2, but I forgot the last versions were supporting a nice setup approach, let me adjust! 👍 |
Member
Author
I think, until we rewrite and drop the legacy part of the sharing sidebar, I don't wanna touch the clean sharing app :) |
Member
I think it's also good to not add this code that is files-specific to an app that is not files-specific. |
Replace the share editor in the files sidebar with the unified sharing UI: one flat list of shares ordered by permission, where a share with several recipients renders as an expandable group showing each recipient's own permission, and destructive actions live in the overflow menu. Creating and editing a share opens the Vue 3 dialog from `@nextcloud/sharing`. The sidebar is still Vue 2, so the dialog is reached through an `OCA.Sharing` bridge that the Vue 3 entry point registers; once files_sharing is Vue 3 the bridge can go and the library be imported directly. The new components are written as `<script setup lang="ts">`, which Vue 2.7 supports and other components of this app already use, so they will not need rewriting for Vue 3. The whole thing stays behind `sharing.unified_api_enable`, which is off by default and is now documented in the config sample. Enabling it is left to a follow-up. Signed-off-by: Barthelemy Briand <barthelemy.briand@nextcloud.com> Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Every write endpoint allowed one call per one to five seconds, which the sharing dialog exceeds on its own: it creates a draft when it opens, adds a recipient per pick, and fans a preset change out over one request per permission. Size the limits per minute from those flows instead, keep the tighter one on regenerating a token, and add the missing limit on the per-recipient permission endpoint. Signed-off-by: Barthelemy Briand <barthelemy.briand@nextcloud.com> Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
files_sharing is symlinked into the Vue 3 frontend for its bridge entry point, which also handed its Vue 2 sources to that project's lint and test configs. The Vue 3 lint config rejects the hyphenated event listeners Vue 2 requires, so following it broke the share editor, and its Vitest project picked the Vue 2 specs up a second time. Exclude the app from both; the legacy frontend already covers it with the rules that match the code. Sharing specs also move to their own serial Playwright project: which sidebar the sharing tab renders is instance-wide state, so the unified specs and the share editor specs cannot run beside each other. Finally, ignore the worker teardown error Vitest raises when a worker still has console output in flight as it shuts down. It fails a run in which every test passed, and which files trip it only depends on how they are spread over the workers. Signed-off-by: Barthelemy Briand <barthelemy.briand@nextcloud.com> Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
skjnldsv
force-pushed
the
feature/sidebar-sharing-dialog
branch
from
September 3, 2026 13:25
8822e13 to
2abae94
Compare
Unit tests for the share list, its refresh and its delete guards, and a case pinning the API to off by default. End to end, 34 tests over opening the sidebar, listing and grouping, the row actions, and creating and editing shares, including the destructive paths where a confirmation is declined. On top of those, whole journeys: sharing with a group and then granting one person more than the group, a link beside an invited share, abandoning the dialog, and narrowing a single recipient. The specs turn the API on for their worker, while the share editor specs keep it off. Recipients cannot list the shares addressed to them through the API yet, so the tests assert what the share owner sees. The rate limiter is left on so the specs also stand as the check that its limits are livable. Signed-off-by: Barthelemy Briand <barthelemy.briand@nextcloud.com> Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
skjnldsv
force-pushed
the
feature/sidebar-sharing-dialog
branch
from
September 3, 2026 13:39
2abae94 to
2a54e12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the share editor in the files sidebar with the unified sharing UI: a single flat list of shares, and the Vue 3 sharing dialog from
@nextcloud/sharingfor creating and editing them.What changed
OCA.Sharingbridge — the Vue 3 entry point registers it, the (still Vue 2) sidebar calls it. Oncefiles_sharingis Vue 3 the bridge can go and the library be imported directly.sharing.unified_api_enable, which is off and now documented in the config sample. Turning it on is left to a follow-up.@nextcloud/sharingto1.0.0-beta.2.Known gap
Legacy shares (
oc_share) do not appear in the new list until aISharingLegacyBackendis registered, which is backend work outside this PR. That is one of the reasons the feature stays off by default here; the frontend needs no change when the backend lands.Testing
npx vitest run apps/files_sharing— 104 unit tests, including the sidebar refresh and the delete/remove guards.NOCOVERAGE=0 ./autotest.sh sqlite apps/sharing/tests/CapabilitiesTest.php— pins the API to off by default.npx playwright test --project=sharing— 34 new end-to-end tests: opening the sidebar, listing and grouping, the row actions, creating and editing shares (including declined confirmations and editing a link share), plus whole journeys such as sharing with a group and then granting one person more than the group. Which sidebar the tab renders is instance-wide state, so all sharing specs now run in one serial project; the share editor specs turn the API off for their worker.These caught a regression in this branch: the share detail listeners had been camel-cased, which Vue 2 does not match against the hyphenated events the entries emit, so the previous share editor stopped opening.
Notes for the reviewer
AI disclosure
This pull request was written with AI assistance (Claude Code); every commit carries an
Assisted-bytrailer. The code was reviewed by me before submission.