Skip to content

Fix validation, middleware, and client typing regressions#72

Merged
aryansondharva merged 2 commits into
mainfrom
copilot/fix-all-bugs
May 28, 2026
Merged

Fix validation, middleware, and client typing regressions#72
aryansondharva merged 2 commits into
mainfrom
copilot/fix-all-bugs

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor

The repo had a mix of failing backend schema checks, broken middleware exports, and a few high-signal client lint/type regressions. The affected paths now align with the expected constraints and runtime behavior again.

  • Backend validation

    • Tightened profile/sponsor/resource URL validation to reject non-web schemes consistently.
    • Enforced the expected skills limit and UUID validation on leaderboard inputs.
    • Adjusted sponsor tier messaging to match the schema contract used by tests.
  • Middleware

    • Restored a callable middleware export for CORS handling.
    • Kept Clerk-compatible request flow while ensuring the CORS response shape is stable for preflight and standard requests.
  • Supabase client surface

    • Added the missing backend/lib/supabase index module with the server/client helpers expected by consumers and tests.
    • Preserved error normalization for query execution.
  • Client cleanup

    • Removed any from the touched auth/API paths.
    • Replaced empty catch blocks and untyped action payloads in the mentorship UI.
    • Fixed the hook dependency issue in the mentor panel.

Example:

export const profileUpdateSchema = z.object({
  github_url: z.string().regex(/^https?:\/\/.+/i, 'GitHub URL must be a valid URL').optional().or(z.literal('')),
  skills: z.array(z.string()).max(10, 'Cannot have more than 10 skills').optional(),
})

@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
aryansondharva Ready Ready Preview, Comment May 28, 2026 5:11am
tech-assassin Ready Ready Preview, Comment May 28, 2026 5:11am

@aryansondharva aryansondharva marked this pull request as ready for review May 28, 2026 05:12
Copilot AI review requested due to automatic review settings May 28, 2026 05:12
@aryansondharva aryansondharva merged commit d687edd into main May 28, 2026
3 checks passed
aryansondharva added a commit that referenced this pull request May 28, 2026
Copilot AI review requested due to automatic review settings May 28, 2026 05:36
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