refactor: scope-aware project and organisation integrations#7311
refactor: scope-aware project and organisation integrations#7311
Conversation
…ion pages
Clarify which integrations belong at which scope, tighten permission gating,
and let admins add project-level integrations from the org page.
- Project page: surface GitHub (org-only) with a permission-gated link to
org settings; dual-level integrations (Jira, Grafana) expose both an
"Add to project" primary CTA and a "Manage at organisation level" link.
- Org page: list all integrations, grouped into org-level (actionable) and
project-level (now actionable via a project selector in the standard
modal, gated by org admin via renderWithPermission).
- Integration modal: adds a project dropdown when required, seeds formData
with field defaults so validation borders reflect actual state, suppresses
autocomplete on all fields, and switches to edit mode when the selected
project (and env, for per-env integrations) already has a configuration.
- Integration tiles: action area is now a single primary button or an
ellipsis menu styled like the feature-row menu; each added config row
gets its own Edit/Delete menu.
- Add to project / Add to organisation labelling, with Edit {scope}
integration when an existing non-per-env config is present.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
…, reset form on project switch - Add useGetIntegrationQuery to replace ad-hoc _data fetches for existing integration config - Extract ProjectSelect component mirroring EnvironmentSelect - Reset form state when the selected project changes so stale values (notably flagsmithEnvironment, used to key per-environment queries) don't leak between projects - Initialise every field key in default form data so controlled inputs actually clear instead of going uncontrolled - Collapse the external-integration CTA ladder into a single getPrimaryCta helper - Simplify renderActions to honour action.requiresOrgAdmin/disabled directly Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ration summary Render each read-only entry as a col-md-3 cell with label above value inside a shared row, so multiple entries flow side-by-side instead of stacking. Edit mode rendering is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ct renderField - Add create/update RTK mutations for integration config; modal submit goes through them with tag-based invalidation - Alphabetise integrations by display title on both project and organisation pages - Extract renderField helpers to remove nested ternary in the fields loop - Tighten Res['integration'] to (ActiveIntegration & Record<string, any>)[] - Shorten a couple of stale comments Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
talissoncosta
left a comment
There was a problem hiding this comment.
Thanks for handling that @kyle-ssg.
I've added some comments, mostly clarifications..
…-page-scoping # Conflicts: # frontend/web/components/IntegrationList.tsx # frontend/web/components/modals/CreateEditIntegrationModal.tsx
- Rename environmentId to environmentApiKey on integration request types and CreateEditIntegrationModal helpers to reflect that the value is the api_key (EnvironmentSelect default). - Type Req['getEnvironment'].id as string; all call sites pass api_keys. Removes the "as any" cast in ReadOnlyEnvironmentName and resolves pre-existing string-vs-number errors at sibling call sites. - Replace local IntegrationActionsMenu with the shared DropdownMenu component; drop now-unused imports. - Flatten the no-op try/catch/finally in onError.
Show a confirmation toast when a new integration is added, naming the
integration and the scope ("added to organisation" or "added to {name}
project"). Skipped on edits.
When a project-only integration is added from the org page, show an in-card success banner with a link to the project's integrations page. The org list cannot enumerate project-scoped integrations, so this gives the user a path to verify and manage the new integration. The modal's onComplete now passes back the created project id; the list keeps a per-integration map of last-added project ids and exposes a dismiss action.
Use SuccessMessage for proper icon, title and close affordance instead of a hand-rolled alert. Tighten copy: title shows the project name, body is a single "Manage in project integrations" link.
Render the success banner inline (not via SuccessMessage) so the close
icon sits on the right and inherits white in dark mode. Copy reads
"Added to {name} project" with a primary-coloured "Manage in project
integrations" link.
Fire the toast and show the inline org-page banner for both create and update of project-only integrations. Banner copy now reads "Added to" or "Updated in" based on the action.
- Drop redundant trailing "project" so it reads "Updated in My Project" rather than "Updated in My Project project." - Force the project name to inherit text-white so it's readable in dark mode (alert-success strong defaults to body-color which is dark). - Remove the bumped close icon size; keep it white at the default size.
Reword to "Added to {name}" / "Saved to {name}" so the project name
flows naturally without a trailing "project" or "in {name} project."
Use template-literal whitespace so adjacent spans don't collide.
Render the prefix as a single template literal so React can't strip whitespace between adjacent text nodes and tags. Reword to name the integration explicitly: "Amplitude added to test." / "Amplitude saved to test." — answers "what was saved" without the awkward double preposition.
Drop the integration title from the prefix (the card heading already
names it) — banner now reads "Integration added/saved to {name}".
Use after the full stop so the space isn't collapsed between
adjacent inline elements.
talissoncosta
left a comment
There was a problem hiding this comment.
Looks great, thanks for addressing the feedbacks!
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
connected (fixes the GitHub dead-end).
Project integrations page
Organistaion integrations page with the ability to create/edit at project level
abc.mov
How did you test this code?