Context
Nested shared folders rely on the existing sharing replication system to deliver file changes to recipients.
Realtime only covers live UI updates while the app is connected. Replication and changes feed are the durable mechanism that keeps shared-drive content synchronized between owner and recipients.
With nested shared folders, we must verify that replication still behaves correctly when one shared folder exists inside another.
Goal
Ensure changes are replicated to the right recipients when shared folders are nested.
Related Endpoint
GET /sharings/drives/:id/_changes
Related Code
web/sharings/drives.go
ChangesFeed
model/sharing/setup.go
AddTrackTriggers
AddReplicateTrigger
AddUploadTrigger
model/sharing/shared.go
UpdateShared
model/sharing/replicator.go
model/sharing/upload.go
Expected Behavior
For this structure:
Project/ shared with Alice
Project/Finance/ shared with Bob
Project/Finance/q1.xlsx
Project/Roadmap.md
Alice should receive:
Project/Roadmap.md
Project/Finance/q1.xlsx
because Alice has access through the parent shared folder.
Bob should receive:
Project/Finance/q1.xlsx
but should not receive:
Project/Roadmap.md
because Bob only has access to the child shared folder.
Scope
Verify and adjust, if needed:
- the shared-drive _changes endpoint for nested shared folders,
- sharing track triggers,
- sharing replicate triggers,
- sharing upload triggers,
- filtering logic used to decide whether a file belongs to a sharing scope.
Acceptance Criteria
- Parent sharing recipients receive changes from nested child folders.
- Child sharing recipients receive changes only from the child shared folder.
- Child-only recipients do not receive parent or sibling changes.
- Changes are not duplicated when a file is covered by both parent and child sharing scopes.
- Read-only recipients still receive replicated changes but cannot upload changes back.
- Existing non-nested sharing replication tests still pass.
- Add regression tests for nested parent/child shared-folder replication.
Context
Nested shared folders rely on the existing sharing replication system to deliver file changes to recipients.
Realtime only covers live UI updates while the app is connected. Replication and changes feed are the durable mechanism that keeps shared-drive content synchronized between owner and recipients.
With nested shared folders, we must verify that replication still behaves correctly when one shared folder exists inside another.
Goal
Ensure changes are replicated to the right recipients when shared folders are nested.
Related Endpoint
GET /sharings/drives/:id/_changes
Related Code
web/sharings/drives.go
ChangesFeed
model/sharing/setup.go
AddTrackTriggers
AddReplicateTrigger
AddUploadTrigger
model/sharing/shared.go
UpdateShared
model/sharing/replicator.go
model/sharing/upload.go
Expected Behavior
For this structure:
Project/ shared with Alice
Project/Finance/ shared with Bob
Project/Finance/q1.xlsx
Project/Roadmap.md
Alice should receive:
Project/Roadmap.md
Project/Finance/q1.xlsx
because Alice has access through the parent shared folder.
Bob should receive:
Project/Finance/q1.xlsx
but should not receive:
Project/Roadmap.md
because Bob only has access to the child shared folder.
Scope
Verify and adjust, if needed:
Acceptance Criteria