···438438 // restarts the live subscription so future edits from them stream in too.
439439 async onEditorsChanged(nextDids) {
440440 const added = nextDids.filter((did) => !this.dids.includes(did));
441441- if (added.length === 0) return;
442441 this.dids = nextDids;
443442444444- await this.fetchDidsData(added);
443443+ // Our own did is already in `this.dids` even as a read-only viewer, so
444444+ // `added` can be empty when we're the one newly granted editor access.
445445+ // Always replicate (it no-ops if canEdit() is still false) and only
446446+ // refetch/resubscribe when there's actually a new did to pull in.
447447+ if (added.length > 0) {
448448+ await this.fetchDidsData(added);
445449446446- if (this.unsubscribe) this.unsubscribe();
447447- this.unsubscribe = await subscribe({
448448- dids: nextDids,
449449- collections: [LIST_NSID, ITEM_NSID, TOMBSTONE_NSID],
450450- onCommit: this.onCommit,
451451- });
450450+ if (this.unsubscribe) this.unsubscribe();
451451+ this.unsubscribe = await subscribe({
452452+ dids: nextDids,
453453+ collections: [LIST_NSID, ITEM_NSID, TOMBSTONE_NSID],
454454+ onCommit: this.onCommit,
455455+ });
456456+ }
452457453458 await this.replicateAll();
454459 }