Skip to content

Joshen/fe 2670 dashboard to pull partner integrations into project - #43545

Merged
joshenlim merged 17 commits into
masterfrom
joshen/fe-2670-dashboard-to-pull-partner-integrations-into-project
Mar 11, 2026
Merged

joshenlim merged 17 commits into
masterfrom
joshen/fe-2670-dashboard-to-pull-partner-integrations-into-project

Conversation

@joshenlim

@joshenlim joshenlim commented Mar 9, 2026 •

Copy link
Copy Markdown
Member

Context

Initial ground work for Marketplace Integrations (feature flagged under the flag marketplaceIntegrations), in which some integrations will be fetched over a network request (than hard-coded within the repo). Feature flag just controls whether to we need to fetch them.

Similarly, categories under "Explore" will also be fetched, and the flag just decides whether that should be enabled.

We're also planning to update the overview tab for integrations as well, in which integrations fetched over the network request will use the new UI (altho not functional just yet)

To test

Note that the LOC changes are seemingly large, but that's just because I've added in a types file for the Supabase project that we're using to store the integrations data

  • Verify that behaviour is status quo with the flag off (Priority)
  • Verify that behaviour is status quo on CLI / self-host env
  • Verify that with the flag on you'll see one of the new integrations fetched over network (Grafana), including an additional category "Observability" (and clicking into it will show the new UI)
  • Verify that all other existing integrations are status quo

@joshenlim
joshenlim requested a review from a team as a code owner March 9, 2026 10:00
@vercel

vercel Bot commented Mar 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Mar 11, 2026 8:00am
docs Ready Ready Preview, Comment, Open in v0 Mar 11, 2026 8:00am
learn Ready Ready Preview, Comment Mar 11, 2026 8:00am
studio-self-hosted Ready Ready Preview, Comment Mar 11, 2026 8:00am
studio-staging Ready Ready Preview, Comment Mar 11, 2026 8:00am
ui-library Ready Ready Preview, Comment Mar 11, 2026 8:00am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Mar 11, 2026 8:00am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
cms Ignored Ignored Mar 11, 2026 8:00am
studio Ignored Ignored Mar 11, 2026 8:00am

Request Review

@supabase

supabase Bot commented Mar 9, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a marketplace integration system and refactors the Integrations UI. New data layer: typed marketplace client, marketplace types, React Query helpers (integrations + categories) and query keys. Introduces useAvailableIntegrations (feature-flag aware) that fetches marketplace items, normalizes them into integration definitions, and combines them with local integrations. UI changes: FilesViewer, IntegrationOverviewTabV2, and a new ProjectIntegrationsLayout (replacing the removed IntegrationsLayout). Integration pages and listings now use useAvailableIntegrations; useInstalledIntegrations no longer exposes available integrations.

Sequence Diagram

sequenceDiagram
    participant Page as Integration Page
    participant Hook as useAvailableIntegrations
    participant Flags as FeatureFlagContext
    participant Query as React Query
    participant Client as createMarketplaceClient
    participant DB as Marketplace DB
    participant Transform as Transformer
    participant UI as ProjectIntegrationsLayout

    Page->>Hook: invoke to load available integrations
    Hook->>Flags: check marketplace feature flag
    Flags-->>Hook: flag value

    alt marketplace enabled
        Hook->>Query: run marketplaceIntegrationsQueryOptions
        Query->>Client: create client & request integrations
        Client->>DB: query items (+ categories)
        DB-->>Client: return rows
        Client-->>Query: return marketplace data
        Query-->>Hook: provide query result
        Hook->>Transform: map rows -> IntegrationDefinition[]
        Transform-->>Hook: transformed integrations
        Hook->>Hook: combine with local INTEGRATIONS, filter & sort
    else marketplace disabled
        Hook->>Hook: use local INTEGRATIONS only
    end

    Hook-->>Page: return allIntegrations + state flags
    Page->>UI: render layout and pages (Overview, FilesViewer, listings)
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@blacksmith-sh

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx (1)

42-45: ⚠️ Potential issue | 🟠 Major

Category tabs exclude marketplace integrations.

useAvailableIntegrations() adds partner items with category slugs, but this filter only matches i.type. For marketplace entries, type is not wrapper / postgres_extension, so the "Wrappers" and "Postgres Modules" tabs can never show them.

Suggested fix
 const integrationsByCategory =
   selectedCategory === 'all'
     ? availableIntegrations
-    : availableIntegrations.filter((i) => i.type === selectedCategory)
+    : availableIntegrations.filter(
+        (i) => i.type === selectedCategory || i.categories?.includes(selectedCategory)
+      )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx`
around lines 42 - 45, The category filter in integrationsByCategory only checks
i.type and thus excludes marketplace/partner items that use a category slug;
update the filter expression (the integrationsByCategory computation) to include
marketplace category fields by checking i.type === selectedCategory OR
i.category === selectedCategory OR i.categorySlug === selectedCategory (or
whichever partner property useAvailableIntegrations adds), so
partner/marketplace entries appear in the "Wrappers" and "Postgres Modules"
tabs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/index.tsx`:
- Line 29: The code computes siteUrlLabel with new URL(siteUrl) which will throw
for malformed URLs; update the logic around the siteUrlLabel variable
(referencing siteUrlLabel and siteUrl) to safely parse the origin — wrap the new
URL(siteUrl) call in a try-catch (or use a safe parsing utility) and fall back
to undefined (or a sanitized value) when parsing fails so the page cannot crash
on invalid siteUrl values.

In `@apps/studio/pages/project/`[ref]/integrations/index.tsx:
- Around line 50-51: The page currently gates rendering of the integrations
catalog on useInstalledIntegrations() (installedIntegrations,
isLoading/isError/isSuccess) which hides availableIntegrations cards when the
installed-status query fails; change the control flow so the catalog rendering
and loading/error state come from useAvailableIntegrations() (use
data/isLoading/isError/isSuccess from useAvailableIntegrations) and treat
useInstalledIntegrations() as best-effort only for badge/status decoration
(merge installedIntegrations results into the availableIntegrations items when
available, but do not block or show global error UI if installed query errors).
Update the same wiring in the AvailableIntegrations component
(Landing/AvailableIntegrations.tsx) to rely on useAvailableIntegrations for
primary UI gating and only apply useInstalledIntegrations for optional
badge/state enrichment.

---

Outside diff comments:
In
`@apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx`:
- Around line 42-45: The category filter in integrationsByCategory only checks
i.type and thus excludes marketplace/partner items that use a category slug;
update the filter expression (the integrationsByCategory computation) to include
marketplace category fields by checking i.type === selectedCategory OR
i.category === selectedCategory OR i.categorySlug === selectedCategory (or
whichever partner property useAvailableIntegrations adds), so
partner/marketplace entries appear in the "Wrappers" and "Postgres Modules"
tabs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: f1428017-8d80-4a92-ad32-438477673e84

📥 Commits

Reviewing files that changed from the base of the PR and between 3885265 and d52e398.

📒 Files selected for processing (17)
  • apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer.tsx
  • apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/index.tsx
  • apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx
  • apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
  • apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx
  • apps/studio/components/interfaces/Integrations/Landing/useInstalledIntegrations.tsx
  • apps/studio/components/layouts/Integrations/layout.tsx
  • apps/studio/components/layouts/ProjectIntegrationsLayout.tsx
  • apps/studio/data/marketplace/integration-categories-query.ts
  • apps/studio/data/marketplace/integrations-query.ts
  • apps/studio/data/marketplace/keys.ts
  • apps/studio/data/marketplace/marketplace-client.ts
  • apps/studio/data/marketplace/marketplace.types.ts
  • apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/[childId]/index.tsx
  • apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/index.tsx
  • apps/studio/pages/project/[ref]/integrations/[id]/index.tsx
  • apps/studio/pages/project/[ref]/integrations/index.tsx
💤 Files with no reviewable changes (2)
  • apps/studio/components/interfaces/Integrations/Landing/useInstalledIntegrations.tsx
  • apps/studio/components/layouts/Integrations/layout.tsx

@github-actions

github-actions Bot commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  155 passed
flaky  1 flaky
skipped  4 skipped

Details

stats  160 tests across 20 suites
duration  6 minutes, 10 seconds
commit  f500170

Flaky tests

Features › realtime-inspector.spec.ts › Realtime Inspector › Broadcast Messages › broadcast modal validates JSON payload

Skipped tests

Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/studio/components/layouts/ProjectIntegrationsLayout.tsx`:
- Around line 72-82: ProjectIntegrationsLayout has a plural slug mismatch: the
menu entry uses url `?category=wrappers` and pages
`integrations?category=wrapper` while the integrations page logic
(selectedCategory / filter i.type === selectedCategory in
apps/studio/pages/project/[ref]/integrations/index.tsx) expects the singular
`wrapper`; update the ProjectIntegrationsLayout entry (name/key/url/pages) to
use the singular `wrapper` consistently (align url query and pages to
`category=wrapper`) so selectedCategory matches i.type and the Wrappers view
loads correctly.

In
`@apps/studio/pages/project/`[ref]/integrations/[id]/[pageId]/[childId]/index.tsx:
- Around line 27-32: The crash occurs because allIntegrations (from
useAvailableIntegrations) can be undefined while loading; update the useMemo
that computes integration to guard against that by treating allIntegrations as
an empty array when undefined (e.g., use optional chaining or a default []
before calling .find). Locate the integration useMemo in the component (the
block using useMemo, allIntegrations and id) and change the dependency callback
to safely handle undefined allIntegrations so .find is never invoked on
undefined.

In `@apps/studio/pages/project/`[ref]/integrations/[id]/[pageId]/index.tsx:
- Around line 48-56: The integration lookup crashes because allIntegrations can
be undefined while loading; update the useMemo for integration (the variable
named integration) to guard against undefined allIntegrations by either
defaulting it to an empty array or using optional chaining before calling .find
(i.e., reference allIntegrations?.find(...) or use (allIntegrations || [])
inside useMemo) and keep the same dependency array [allIntegrations, id] to
avoid UI resets.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: bff27f6a-a16b-474a-bad0-9efe75aa7429

📥 Commits

Reviewing files that changed from the base of the PR and between d52e398 and d773ac1.

📒 Files selected for processing (5)
  • apps/studio/components/layouts/ProjectIntegrationsLayout.tsx
  • apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/[childId]/index.tsx
  • apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/index.tsx
  • apps/studio/pages/project/[ref]/integrations/[id]/index.tsx
  • apps/studio/pages/project/[ref]/integrations/index.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
apps/studio/components/layouts/ProjectIntegrationsLayout.tsx (1)

76-84: ⚠️ Potential issue | 🟠 Major

Use the singular wrapper slug here.

Line 81 still links to category=wrappers, but apps/studio/pages/project/[ref]/integrations/index.tsx matches wrapper at Lines 66 and 94. That leaves the Wrappers view empty even though wrapper integrations exist.

Proposed fix
     ...(showWrappers
       ? [
           {
             name: 'Wrappers',
-            key: 'wrappers',
-            url: `/project/${ref}/integrations?category=wrappers`,
+            key: 'wrapper',
+            url: `/project/${ref}/integrations?category=wrapper`,
             items: [],
           },
         ]
       : []),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/studio/components/layouts/ProjectIntegrationsLayout.tsx` around lines 76
- 84, The "Wrappers" tab URL uses the plural slug `category=wrappers` which
doesn't match the integrations page expecting the singular `wrapper`; update the
URL string in the ProjectIntegrationsLayout component where the tab object is
built (the object with name: 'Wrappers', key: 'wrappers', url:
`/project/${ref}/integrations?category=wrappers`) to use `category=wrapper` so
it matches the routing logic in the integrations page and surfaces existing
wrapper integrations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/index.tsx`:
- Around line 23-24: The code calls useAvailableIntegrations() and immediately
does allIntegrations.find(...) which will crash if data is undefined; update the
destructuring or usage so allIntegrations defaults to an empty array (e.g.,
const { data: allIntegrations = [] } = useAvailableIntegrations()) or guard
before using .find, then compute integration = (allIntegrations || []).find(i =>
i.id === id); ensure you change references to useAvailableIntegrations,
allIntegrations, and integration so .find is never invoked on undefined.

In `@apps/studio/components/layouts/ProjectIntegrationsLayout.tsx`:
- Around line 61-66: The current logic in ProjectIntegrationsLayout ties
rendering of the entire Explore sidebar to isSuccessCategories via the isSuccess
and isLoading flags, which causes the whole menu (including static entries like
All, Wrappers, Postgres Modules) to disappear when marketplace category fetch
fails; update the logic so only marketplace-specific entries are gated by
isSuccessCategories/isPendingCategories: keep the Explore/sidebar rendering
unconditional when isMarketplaceEnabled is true (or when not on platform), and
move the isSuccessCategories check into the conditional that renders
marketplace-dependent items (references: isLoading, isSuccess,
isMarketplaceEnabled, isSuccessCategories, isPendingCategories and the sidebar
render block inside ProjectIntegrationsLayout that currently returns nothing
when the category fetch fails). Ensure static menu items render regardless of
category fetch outcome and only the marketplace list shows a loading/error state
when isPendingCategories/isSuccessCategories indicates failure.

---

Duplicate comments:
In `@apps/studio/components/layouts/ProjectIntegrationsLayout.tsx`:
- Around line 76-84: The "Wrappers" tab URL uses the plural slug
`category=wrappers` which doesn't match the integrations page expecting the
singular `wrapper`; update the URL string in the ProjectIntegrationsLayout
component where the tab object is built (the object with name: 'Wrappers', key:
'wrappers', url: `/project/${ref}/integrations?category=wrappers`) to use
`category=wrapper` so it matches the routing logic in the integrations page and
surfaces existing wrapper integrations.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: cf19cceb-0595-409a-92af-496d54aa79c1

📥 Commits

Reviewing files that changed from the base of the PR and between ebfe27b and 502f3bd.

📒 Files selected for processing (4)
  • apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/index.tsx
  • apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx
  • apps/studio/components/layouts/ProjectIntegrationsLayout.tsx
  • apps/studio/pages/project/[ref]/integrations/index.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx

@charislam charislam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrappers no longer seem to show either with or without the flag:

Image

sidebar also seems to refetch frequently which is a bit annoying because it takes a while

not seeing Grafana/observability (don't know if I'm looking in the wrong place?)

Comment thread apps/studio/data/marketplace/keys.ts Resolved

@alaister alaister left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of a strange loading state here:
Image

@charislam charislam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status quo and CLI look good! 👍🏼

The only thing I still can't get working is seeing observability/Grafana. I looked through all the network requests and can't find the ones that fetch from the marketplace project tables

Going to approve to unblock though since this is feature-flagged and status quo is good anyway

@joshenlim
joshenlim merged commit 9949b75 into master Mar 11, 2026
24 checks passed
@joshenlim
joshenlim deleted the joshen/fe-2670-dashboard-to-pull-partner-integrations-into-project branch March 11, 2026 08:17
@github-actions

github-actions Bot commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1773217167)

Score Average Improvements Regressions
Completeness 97.2% (+3pp) 1 🟢 -
Conciseness 1.4% (+1pp) 1 🟢 -
Goal Completion 91.7% (-3pp) - 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Tool Usage 100% (+0pp) - -
Correctness 100% (+4pp) 1 🟢 -
Docs Faithfulness 58.3% (+0pp) 1 🟢 1 🔴
URL Validity 100% (+0pp) - -
Time_to_first_token 0.19tok (-0.1tok) 12 🟢 -
Llm_calls 8.33 (-0.22) 1 🟢 6 🔴
Tool_calls 3 (-0.14) 3 🟢 7 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 50208.61tok (+128.25tok) 5 🟢 7 🔴
Prompt_cached_tokens 26062.22tok (+1297.78tok) 3 🟢 8 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 2601.56tok (-19.75tok) 5 🟢 7 🔴
Completion_reasoning_tokens 1875.56tok (-14.22tok) 4 🟢 8 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 52810.17tok (+108.5tok) 6 🟢 6 🔴
Estimated_cost 0.01$ (0$) 6 🟢 5 🔴
Duration 33.64s (-8.52s) 11 🟢 1 🔴
Llm_duration 65.95s (-16.5s) 11 🟢 1 🔴

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.

5 participants