Skip to content

feat(sync): add Sharing domain project settings#1043

Closed
kunickiaj wants to merge 1 commit into
mainfrom
05-05-feat_sync_add_sharing_domain_project_settings
Closed

feat(sync): add Sharing domain project settings#1043
kunickiaj wants to merge 1 commit into
mainfrom
05-05-feat_sync_add_sharing_domain_project_settings

Conversation

@kunickiaj
Copy link
Copy Markdown
Owner

@kunickiaj kunickiaj commented May 6, 2026

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_id values and never grant scope_memberships.

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

Validation run:

  • pnpm run tsc
  • pnpm run lint (only existing FeedItemCard info-level suggestions)
  • pnpm run test
  • pnpm --filter @codemem/ui build
  • git diff --check
  • pnpm exec vitest run packages/core/src/project-scope-settings.test.ts
  • pnpm 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.tsx

Checklist

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation updated (if needed)
  • No new warnings introduced

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kunickiaj kunickiaj marked this pull request as ready for review May 6, 2026 05:05
Copy link
Copy Markdown

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

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

Comment on lines +86 to +90
await api.saveSharingDomainProjectMapping({
workspace_identity: project.workspace_identity,
project_pattern: project.display_project,
scope_id: scopeId,
});
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 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 👍 / 👎.

@kunickiaj
Copy link
Copy Markdown
Owner Author

Superseded by the split Graphite stack: #1044 (core), #1045 (viewer API), and #1046 (UI). Closing the monolithic PR so review stays focused.

@kunickiaj kunickiaj closed this May 6, 2026
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