feat(sync): add Sharing domain project settings#1043
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fae7ca695a
ℹ️ 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".
| await api.saveSharingDomainProjectMapping({ | ||
| workspace_identity: project.workspace_identity, | ||
| project_pattern: project.display_project, | ||
| scope_id: scopeId, | ||
| }); |
There was a problem hiding this comment.
Prevent saving mappings for unmapped project identities
saveProject always sends a mapping regardless of project.identity_source, but resolveProjectScope returns local_default immediately for "unmapped" identities and never consults project_scope_mappings. In that case, clicking Save Sharing domain produces a success notice yet the project still resolves to Local only after reload, while an unused mapping row is still written. This is a user-visible false-success path for unknown/unmapped sessions and should be blocked (or explicitly rejected) before calling the save API.
Useful? React with 👍 / 👎.

Description
Adds local Sharing-domain settings APIs and UI so known projects can be assigned to active domains while workspace-id-only and unknown projects remain Local only. Mapping writes validate active
scope_idvalues and never grantscope_memberships.Type of Change
Testing
pnpm run tsc,pnpm run lint,pnpm run test)Validation run:
pnpm run tscpnpm run lint(only existing FeedItemCard info-level suggestions)pnpm run testpnpm --filter @codemem/ui buildgit diff --checkpnpm exec vitest run packages/core/src/project-scope-settings.test.tspnpm exec vitest run packages/viewer-server/src/index.test.ts -t "updates local Sharing domain project mappings without granting membership"pnpm exec vitest run packages/ui/src/tabs/settings/components/SharingDomainsPanel.test.tsxChecklist
pnpm run lintpasses for touched files)