Skip to content

feat(sharing): add recipient onboarding journeys#1343

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

feat(sharing): add recipient onboarding journeys#1343
kunickiaj merged 1 commit into
mainfrom
07-22-feat_sharing_add_recipient_onboarding_journeys

Conversation

@kunickiaj

@kunickiaj kunickiaj commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Description

Adds recipient-aware onboarding for Team members, direct Project recipients, and additional devices while keeping authorization changes deferred to PR 7.

  • adds preview-first Team and add-device invitation journeys with current Projects, memory counts, future inheritance, and exclusions
  • binds invitations to one Identity, device, and public-key fingerprint with fail-closed conflict handling
  • persists IdentityDevice, TeamMembership, and exact direct ProjectRecipient intent without changing scopes, grants, mappings, epochs, or replication state
  • bridges existing exact Project invitation acceptance into recipient-policy intent without creating Team membership
  • adds explicit coordinator invite kinds and additive D1 migration 0009
  • preserves legacy pairing and coordinator invitations as enrollment-only compatibility paths
  • replaces the Sharing Invitations placeholder with accessible create/review/accept flows

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,921 tests passed; 3 existing todos
  • Cloudflare Worker Node and integration suites passed
  • Snyk scan of the onboarding engine: 0 high-severity issues
  • independent security/correctness review: no remaining medium-or-higher findings
  • cross-journey binding, stale-preview, replay conflict, authorization-negative, SQLite, and D1 coverage added

Checklist

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

@kunickiaj
kunickiaj marked this pull request as ready for review July 22, 2026 07:47

@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: 6d44616fc6

ℹ️ 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/better-sqlite-coordinator-store.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-22-feat_sharing_add_recipient_onboarding_journeys branch from 6d44616 to d2fa61f Compare July 22, 2026 18:17
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from d446ee2 to aa9ef6d 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: d2fa61f4c7

ℹ️ 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/coordinator-actions.ts Outdated
Comment thread packages/core/src/share-operation.ts
@kunickiaj
kunickiaj force-pushed the 07-22-feat_sharing_add_recipient_onboarding_journeys branch from d2fa61f to 05eae62 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: 05eae6218d

ℹ️ 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-invitations.tsx
@kunickiaj
kunickiaj force-pushed the 07-22-feat_sharing_add_recipient_onboarding_journeys branch from 05eae62 to de48cb5 Compare July 22, 2026 19:37
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from a28d3ec to ef05063 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: de48cb5539

ℹ️ 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/coordinator-actions.ts
@kunickiaj
kunickiaj force-pushed the 07-22-feat_sharing_add_recipient_onboarding_journeys branch from de48cb5 to d043ba1 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: d043ba17a9

ℹ️ 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/coordinator-actions.ts Outdated
@kunickiaj
kunickiaj force-pushed the 07-21-feat_sharing_add_bidirectional_recipient_management branch from 30162d5 to a3e554b Compare July 22, 2026 21:17
@kunickiaj
kunickiaj force-pushed the 07-22-feat_sharing_add_recipient_onboarding_journeys branch from d043ba1 to e77a38e 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

recipientActorId: store.actorId,

P2 Badge Adopt the target identity for add-device accepts

When an add-device invitation is accepted on a fresh profile, this explicit store.actorId overrides coordinatorImportInviteAction's fallback to the invite's target_identity_id; fresh evidence is that the viewer import route still supplies the fallback-local actor even though the core action now only adopts the target when no explicit/configured actor is present. In that common new-device flow the UI can inspect an add-device invite but import rejects it with invite_identity_conflict unless the profile was already configured with the invited identity, so pass the decoded target identity (or omit recipientActorId) for add_device invites.

ℹ️ 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".

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:47 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 22, 9:54 PM UTC: @kunickiaj merged this pull request with Graphite.

@kunickiaj
kunickiaj changed the base branch from 07-21-feat_sharing_add_bidirectional_recipient_management to graphite-base/1343 July 22, 2026 21:42
@kunickiaj
kunickiaj changed the base branch from graphite-base/1343 to main July 22, 2026 21:45
@kunickiaj
kunickiaj force-pushed the 07-22-feat_sharing_add_recipient_onboarding_journeys branch from e77a38e to 6f5d627 Compare July 22, 2026 21:46

@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: 6f5d627870

ℹ️ 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 on lines +5198 to +5202
const preview = recipientInviteOnboardingPreview(
store,
{
kind: payload.kind,
policy_team_id: payload.kind === "team_member" ? expectedTarget : null,

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 Build recipient previews from invite data

When a Team-member invite is opened on a fresh recipient profile, this rebuilds the onboarding preview from the recipient's local policy tables via recipientInviteOnboardingPreview; that profile does not yet have the inviter's policy_teams/project_recipients rows, so the helper throws team_not_found (and similarly add-device can throw identity_not_found) before the user can review or accept the invite. The inspect path needs to use policy/team/project details carried by the invite/coordinator response, or otherwise seed enough data for the preview, rather than requiring the recipient to already have the policy state being invited into.

Useful? React with 👍 / 👎.

@kunickiaj
kunickiaj merged commit 2c74cdb into main Jul 22, 2026
11 checks passed
@kunickiaj
kunickiaj deleted the 07-22-feat_sharing_add_recipient_onboarding_journeys branch July 22, 2026 21:54
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