refactor: update chat shortcut initialization and add Supabase type definitions - #1825
refactor: update chat shortcut initialization and add Supabase type definitions#1825TanCodeX wants to merge 4 commits into
Conversation
|
@TanCodeX 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: 56 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 (4)
📝 WalkthroughWalkthroughThe PR updates upload configuration imports, resource activity filtering, chat shortcut placement, and test cleanup. It also adds generated Supabase schema types, generic type helpers, constants, and an authentication error payload across several files. ChangesApplication fixes
Supabase type artifacts
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
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 `@supabase_types.ts`:
- Line 1: Delete the three accidental root-level artifacts: supabase_types.ts,
temp_types.ts, and temp2_types.ts. Keep the canonical
src/integrations/supabase/types.ts as the sole Supabase type definition source;
no replacement code is needed in the deleted files.
🪄 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: 91174b5e-8b54-4957-a677-750615b43066
📒 Files selected for processing (8)
src/components/AvatarUpload.tsxsrc/components/dashboard/RecentActivity.tsxsrc/integrations/supabase/types.tssrc/pages/Chat.tsxsrc/pages/Contact.test.tsxsupabase_types.tstemp2_types.tstemp_types.ts
| @@ -0,0 +1 @@ | |||
| {"_tag":"Error","error":{"code":"LegacyPlatformAuthRequiredError","message":"Access token not provided. Supply an access token by running `supabase login` or setting the SUPABASE_ACCESS_TOKEN environment variable."}} | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Remove the three accidental Supabase type-gen artifacts from the repo root. These files are leftovers from a manual/failed supabase gen types session and are unrelated to the canonical src/integrations/supabase/types.ts; keeping them causes drift (duplicate, divergent Database/Json/Tables definitions) and one is not even valid TypeScript.
supabase_types.ts#L1-L1: delete — it's an error JSON payload (failed auth), not types; regenerate aftersupabase login/SUPABASE_ACCESS_TOKENif needed.temp_types.ts#L1-L9: delete — stale duplicate missingskill_endorsements,testimonials,skill_endorsement_counts, andsubmit_peer_review.temp2_types.ts#L1-L9: delete — stale duplicate missingtestimonialsandsubmit_peer_review.
🧰 Tools
🪛 Biome (2.5.3)
[error] 1-1: Expected a semicolon or an implicit semicolon after a statement, but found none
(parse)
[error] 1-1: Expected a semicolon or an implicit semicolon after a statement, but found none
(parse)
📍 Affects 3 files
supabase_types.ts#L1-L1(this comment)temp_types.ts#L1-L9temp2_types.ts#L1-L9
🤖 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 `@supabase_types.ts` at line 1, Delete the three accidental root-level
artifacts: supabase_types.ts, temp_types.ts, and temp2_types.ts. Keep the
canonical src/integrations/supabase/types.ts as the sole Supabase type
definition source; no replacement code is needed in the deleted files.
…int disables from configuration and UI files
|
RESOLVE MERGE CONFLICTS |
@durdana3105 DONE |
|
RESOLVE MERGE CONFLICTS |
@durdana3105 Done. |
🐛 Description
Closes #1777
This pull request addresses several recent regressions that caused the production build and the test suite to fail. The primary issue was a corrupted Supabase types file (due to a bad merge commit), which had cascading effects across the frontend. This PR fixes the type definitions, resolves all resulting TypeScript errors, and patches a broken test in the Contact page.
🛠️ Changes Made
types.ts):skill_endorsementsandresourcesdefinitions that were dropped in a recent merge.submit_peer_reviewRPC function definition.testimonialstable definition to align the frontend with the20260718000000_create_testimonials.sqlmigration.Chat.tsx: Moved theuseChatShortcutshook invocation below the declarations ofselectUserandfilteredUsersto fix a "variable used before declaration" TypeScript error.RecentActivity.tsx: Updated the query on theresourcestable to filter byuploaded_byinstead ofuser_idto match the latest schema.AvatarUpload.tsx: Added the missing import forAPI_BASE_URLfrom@/config/api.Contact.test.tsx: Safely handled the missingclearmethod on the mockedlocalStorageobject by adding optional chaining (localStorage?.clear?.()), fixing theTypeError: localStorage?.clear is not a functioncrash in the test runner.✅ Verification
npm run buildnow completes successfully on themainbranch with 0 errors.npm run testexecutes cleanly, and all 260 tests are passing.Summary by CodeRabbit
Bug Fixes
Reliability