feat(sharing): add bidirectional recipient management#1342
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d446ee2690
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d446ee2 to
aa9ef6d
Compare
f0a7f1b to
b32edb8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa9ef6df04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b32edb8 to
d8bdaaf
Compare
aa9ef6d to
a28d3ec
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a28d3ec197
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a28d3ec to
ef05063
Compare
d8bdaaf to
3f34fc5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef0506370f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3f34fc5 to
477bd88
Compare
ef05063 to
30162d5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30162d53f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
477bd88 to
fe6ae9c
Compare
30162d5 to
a3e554b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3e554b690
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const [status, setStatus] = useState(""); | ||
| const [busy, setBusy] = useState(false); | ||
| const submitting = useRef(false); | ||
| const choices = useMemo(() => recipientChoices(intent, request), [intent, request]); |
There was a problem hiding this comment.
Rebase open dialogs when recipient data refreshes
While the dialog is open, the app's polling can remount this component with a fresh intent, so the choice list redraws from the new recipient graph while initial and selected still reflect the graph from when the dialog was opened. If another client grants recipient B to the Project during that refresh, B appears unchecked, but leaving it unchecked emits no remove because buildChanges still diffs against the old initial; when the user makes any other change and confirms, the UI can show B as removed even though the active edge remains. Recompute/freeze the open request selection when the backing intent changes.
Useful? React with 👍 / 👎.
Merge activity
|
a3e554b to
7b9a370
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b9a370421
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| teams, | ||
| devices, | ||
| ), | ||
| desiredActiveEdges: desiredEdges.map(({ status: _status, ...edge }) => edge), |
There was a problem hiding this comment.
Reject stale no-op edge transitions
Because the preview digest is built from the desired edge set after applying the request, it does not change when a requested edge was a no-op at preview time but flips before commit. For example, in the bulk Project add flow, if Project A already has recipient R and Project B does not, the preview reports A as unchanged; if another client removes R from A before confirmation, the recomputed desired set is still “A and B active”, so the old digest is accepted and commit silently re-adds A instead of returning stale. Include the reviewed current edge statuses/write counts (or otherwise distinguish no-op edges) in the digest so these concurrent changes force a re-review.
Useful? React with 👍 / 👎.

Description
Adds preview-first, digest-bound Project-recipient edge management in both directions.
project_recipientsType of Change
Testing
pnpm run tsc,pnpm run lint,pnpm run test)Additional validation:
Checklist
pnpm run lintpasses for touched files)