feat(sharing): add recipient onboarding journeys#1343
Conversation
There was a problem hiding this comment.
💡 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".
6d44616 to
d2fa61f
Compare
d446ee2 to
aa9ef6d
Compare
There was a problem hiding this comment.
💡 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".
d2fa61f to
05eae62
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: 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".
05eae62 to
de48cb5
Compare
a28d3ec to
ef05063
Compare
There was a problem hiding this comment.
💡 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".
de48cb5 to
d043ba1
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: 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".
30162d5 to
a3e554b
Compare
d043ba1 to
e77a38e
Compare
There was a problem hiding this comment.
💡 Codex Review
codemem/packages/viewer-server/src/routes/sync.ts
Line 5305 in e77a38e
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".
Merge activity
|
e77a38e to
6f5d627
Compare
There was a problem hiding this comment.
💡 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".
| const preview = recipientInviteOnboardingPreview( | ||
| store, | ||
| { | ||
| kind: payload.kind, | ||
| policy_team_id: payload.kind === "team_member" ? expectedTarget : null, |
There was a problem hiding this comment.
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 👍 / 👎.

Description
Adds recipient-aware onboarding for Team members, direct Project recipients, and additional devices while keeping authorization changes deferred to PR 7.
IdentityDevice,TeamMembership, and exact directProjectRecipientintent without changing scopes, grants, mappings, epochs, or replication state0009Type of Change
Testing
pnpm run tsc,pnpm run lint,pnpm run test)Additional validation:
Checklist
pnpm run lintpasses for touched files)