Skip to content

feat(4336): sharing hierarchy conflict UX (ADR-0005)#256

Open
Gerry-Cern wants to merge 2 commits into
cernboxfrom
feat-4336
Open

feat(4336): sharing hierarchy conflict UX (ADR-0005)#256
Gerry-Cern wants to merge 2 commits into
cernboxfrom
feat-4336

Conversation

@Gerry-Cern

Copy link
Copy Markdown

Summary

Implements the ownCloud Web side of ADR-0005 hierarchical sharing conflicts for collaborator share mutations via Graph.

When Reva rejects a create/update share with HTTP 409 and a structured JSON body, the UI:

  • Shows an error for hard conflicts (parent_conflict, can_force: false)
  • Shows a confirmation dialog for warnings (child_conflict, can_force: true)
  • Retries the same mutation with the Force: true header after the user confirms

Backend contract: targets Jesse Geens' Reva branch feat/share-consistency. Deploy web and Reva together.

Behaviour

Mutation Entry point Conflict handling
Create (invite) InviteCollaboratorForm Deferred batch: collect all child_conflict 409s during parallel invites, show one combined modal, then re-issue failed invites with Force: true
Update ListItem (role/expiry) Per-action confirm modal → retry with Force: true
Delete FileShares, SpaceMembers Same retry wrapper (latent until Reva exposes hierarchy 409 on DELETE)

Reva JSON contract (409)

{
  "error_type": "parent_conflict | child_conflict",
  "message": "...",
  "can_force": true,
  "conflicting_shares": [{ "id", "resource_id", "path", "permission_type" }]
}

- Added `useSharingHierarchyConflictConfirm` to manage user confirmation for sharing conflicts.
- Introduced `SharingHierarchyConflictCancelledError` for error handling.
- Updated share-related components to utilize the new conflict confirmation logic.
- Enhanced `useSharesStore` to retry share operations with a force header upon user confirmation of conflicts.
- Added tests for conflict handling in share operations.
Match Jesse Geens hierarchy conflict contract (error_type, can_force,
conflicting_shares, Force header) and batch deferred 409 confirmations
when inviting multiple collaborators.
@Gerry-Cern Gerry-Cern requested a review from diocas June 18, 2026 10:55
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.

1 participant