Skip to content

feat(sharing): add bidirectional recipient management#1342

Merged
kunickiaj merged 1 commit into
mainfrom
07-21-feat_sharing_add_bidirectional_recipient_management
Jul 22, 2026
Merged

feat(sharing): add bidirectional recipient management#1342
kunickiaj merged 1 commit into
mainfrom
07-21-feat_sharing_add_bidirectional_recipient_management

Conversation

@kunickiaj

@kunickiaj kunickiaj commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Description

Adds preview-first, digest-bound Project-recipient edge management in both directions.

  • introduces strict preview and transactional commit APIs that write only project_recipients
  • rejects stale previews and display-name-only selection while preserving scope-based authorization
  • adds bulk Project selection and recipient chips to Projects
  • adds a Sharing tab with add-only and full management workflows for Teams and Identities
  • preserves focus across polling and dialog lifecycle, and moves legacy controls under Advanced
  • adds concurrency, lock-contention, stale-preview, rollback, accessibility, and UI behavior coverage

Type of Change

  • 🚀 Feature (new functionality)
  • 🐛 Bug fix (fixes an issue)
  • 📚 Documentation (docs-only change)
  • 🔧 Maintenance (refactor, chore, CI, etc.)
  • 🧪 Testing (test-only changes)

Testing

  • Relevant checks pass locally (pnpm run tsc, pnpm run lint, pnpm run test)
  • Added/updated tests for changes
  • Manually verified changes work as expected

Additional validation:

  • 2,896 tests passed; 3 existing todos
  • independent correctness/security review: no remaining medium-or-higher findings
  • accessibility review: no remaining medium-or-higher findings
  • Snyk scan of the core edge engine: 0 high-severity issues

Checklist

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation impact reviewed; existing approved design and implementation plans already describe this slice
  • No new warnings introduced

@kunickiaj
kunickiaj marked this pull request as ready for review July 21, 2026 20:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-edges.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from d446ee2 to aa9ef6d Compare July 22, 2026 18:17
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from f0a7f1b to b32edb8 Compare July 22, 2026 18:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-edges.ts Outdated
Comment thread packages/ui/src/tabs/recipient-policy-management.tsx
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from b32edb8 to d8bdaaf Compare July 22, 2026 18:29
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from aa9ef6d to a28d3ec Compare July 22, 2026 18:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/ui/src/tabs/recipient-policy-management.tsx
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from a28d3ec to ef05063 Compare July 22, 2026 19:37
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from d8bdaaf to 3f34fc5 Compare July 22, 2026 19:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/ui/src/tabs/recipient-policy-management.tsx
Comment thread packages/ui/src/app.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from 3f34fc5 to 477bd88 Compare July 22, 2026 19:55
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from ef05063 to 30162d5 Compare July 22, 2026 19:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/core/src/recipient-policy-edges.ts Outdated
Comment thread packages/ui/src/tabs/recipient-policy-management.tsx Outdated
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_persist_recipient_policy_intent branch from 477bd88 to fe6ae9c Compare July 22, 2026 21:17
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from 30162d5 to a3e554b Compare July 22, 2026 21:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

kunickiaj commented Jul 22, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jul 22, 9:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 22, 9:43 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 22, 9:45 PM UTC: @kunickiaj merged this pull request with Graphite.

@kunickiaj
kunickiaj changed the base branch from 07-21-feat_sharing_persist_recipient_policy_intent to graphite-base/1342 July 22, 2026 21:38
@kunickiaj
kunickiaj changed the base branch from graphite-base/1342 to main July 22, 2026 21:41
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from a3e554b to 7b9a370 Compare July 22, 2026 21:42
@kunickiaj
kunickiaj merged commit 664d264 into main Jul 22, 2026
11 checks passed
@kunickiaj
kunickiaj deleted the 07-21-feat_sharing_add_bidirectional_recipient_management branch July 22, 2026 21:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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