fix: Add missing Database type export for Supabase client typings (Issue #1795) - #1802
Conversation
|
@SuvamKumarBhola is attempting to deploy a commit to the durdana3105's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds Supabase TypeScript exports, a local type-generation script, CI synchronization checks, and a ChangesSupabase type generation
Repository ignore rule
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/integrations/supabase/types.ts (1)
9-9: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy liftReplace the Supabase
anyfallback with generated schema types
Database = anydisables table/column/RPC typing increateClient<Database>. Swap in generated Supabase types, and add a checked-in generation step or CI guard so this doesn’t remain a permanent fallback.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/integrations/supabase/types.ts` at line 9, Replace the any alias in Database with the generated Supabase schema type used by createClient<Database>, preserving table, column, and RPC inference. Add a checked-in generation step or CI validation that regenerates or verifies src/integrations/supabase/types.ts so the fallback cannot be reintroduced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/integrations/supabase/types.ts`:
- Line 9: Replace the any alias in Database with the generated Supabase schema
type used by createClient<Database>, preserving table, column, and RPC
inference. Add a checked-in generation step or CI validation that regenerates or
verifies src/integrations/supabase/types.ts so the fallback cannot be
reintroduced.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 673aaaf2-7ae8-4b29-953e-9bef36e15794
📒 Files selected for processing (2)
.gitignoresrc/integrations/supabase/types.ts
|
RESOLVE FAILING CI TEST |
|
ANY UPDATE? |
Hi! I looked into the failing CI run. The reported failure appears to be in |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 32-36: Update the “Verify Supabase Types” workflow step so it no
longer runs a generation-and-diff check against the checked-in fallback
`src/integrations/supabase/types.ts`; defer or remove that validation until
authoritative schema-backed typings are ready, unless the repository first
adopts and commits the exact generated output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3ef8e45b-80be-4169-8990-86ebfd0e7ce4
📒 Files selected for processing (3)
.github/workflows/ci.ymlpackage.jsonsrc/integrations/supabase/types.ts
💤 Files with no reviewable changes (1)
- src/integrations/supabase/types.ts
Description
This PR resolves Issue #1795 by fixing the missing
Databasetype export insrc/integrations/supabase/types.ts.Previously,
types.tswas empty, leading to aTS2305error whensrc/integrations/supabase/client.tsattempted to import theDatabaseinterface. This broke the Supabase client typings and resulted in widespreadnevertype errors during the build and type checking processes (e.g., when callingsupabase.from()).Changes Made
Databasetype (asany) insrc/integrations/supabase/types.ts.TS2305andnevertype-checking errors across the application and restores functionality for Supabase client queries.Note: This is a safe fallback to ensure the codebase compiles properly until the full schema types can be properly auto-generated via the Supabase CLI against an active database.
Related Issue
Closes #1795
Summary by CodeRabbit
Chores
Refactor