Skip to content

fix(studio): handle undefined connectionStringPooler in connect sheet#44611

Merged
alaister merged 1 commit intomasterfrom
fix/connect-sheet-undefined-pooler
Apr 7, 2026
Merged

fix(studio): handle undefined connectionStringPooler in connect sheet#44611
alaister merged 1 commit intomasterfrom
fix/connect-sheet-undefined-pooler

Conversation

@alaister
Copy link
Copy Markdown
Member

@alaister alaister commented Apr 7, 2026

Follow-up to #44471. Fixes Sentry error: can't access property "ipv4SupportedForDedicatedPooler", g is undefined.

connectionStringPooler can be undefined when the databases query hasn't resolved yet (returns [] by default, so the lookup object is empty). Added optional chaining + explicit typing.

To test

  • Open the connect sheet on any project — should render without errors
  • Check that IPv4 status panel still displays correctly once loaded

Summary by CodeRabbit

  • Refactor
    • Improved type safety and robustness in connection pooler configuration handling for more reliable IPv4 capability detection.

…tion content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alaister alaister requested a review from a team as a code owner April 7, 2026 05:53
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Apr 7, 2026 5:58am
studio-staging Ready Ready Preview, Comment Apr 7, 2026 5:58am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Apr 7, 2026 5:58am
design-system Skipped Skipped Apr 7, 2026 5:58am
docs Skipped Skipped Open in v0 Apr 7, 2026 5:58am
learn Skipped Skipped Apr 7, 2026 5:58am
ui-library Skipped Skipped Apr 7, 2026 5:58am
zone-www-dot-com Skipped Skipped Open in v0 Apr 7, 2026 5:58am

Request Review

@supabase
Copy link
Copy Markdown

supabase bot commented Apr 7, 2026

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
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42fefe78-1669-4eac-956f-65d0f8d7d2d0

📥 Commits

Reviewing files that changed from the base of the PR and between 042248f and 40a0ac0.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/ConnectSheet/content/steps/direct-connection/content.tsx

📝 Walkthrough

Walkthrough

Updated DirectConnectionContent component to add explicit type annotation for connectionStringPooler as ConnectionStringPooler | undefined and replaced unsafe property access with optional chaining to safely handle potentially missing pooler data.

Changes

Cohort / File(s) Summary
Type Safety Enhancement
apps/studio/components/interfaces/ConnectSheet/content/steps/direct-connection/content.tsx
Added explicit type annotation for connectionStringPooler variable; replaced direct property access with optional chaining (?.) and nullish coalescing (??) for safer handling of undefined pooler data; expanded imports to include ConnectionStringPooler type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A pooler undefined? No fear!
Optional chains make it clear,
Types now explicit, precise and sound,
Safe null-checks all around!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: handling undefined connectionStringPooler in the connect sheet component.
Description check ✅ Passed The description covers the context (follow-up to #44471), root cause (undefined connectionStringPooler), the fix (optional chaining + explicit typing), and testing instructions, but deviates from the template structure.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/connect-sheet-undefined-pooler

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.

@alaister alaister enabled auto-merge (squash) April 7, 2026 05:58
@alaister alaister merged commit 474c125 into master Apr 7, 2026
33 checks passed
@alaister alaister deleted the fix/connect-sheet-undefined-pooler branch April 7, 2026 06:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🎭 Playwright Test Results

passed  188 passed
skipped  4 skipped

Details

stats  192 tests across 21 suites
duration  8 minutes, 36 seconds
commit  40a0ac0

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Braintrust eval report

Evals in progress... ⌛

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.

2 participants