Skip to content

Address review comments: fix Next.js 15+ params handling, validation, and error handling#16

Closed
Copilot wants to merge 3 commits into
fix/Collaboratorfrom
copilot/sub-pr-15
Closed

Address review comments: fix Next.js 15+ params handling, validation, and error handling#16
Copilot wants to merge 3 commits into
fix/Collaboratorfrom
copilot/sub-pr-15

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 19, 2026

Addresses 13 review comments from PR #15 focusing on Next.js 15+ compatibility, input validation, error handling, and user feedback.

API Route Fixes

  • Await params Promise in all route handlers (Next.js 15+ requirement)
  • Add email validation with format checking and trimming
  • Add role validation against allowed values (owner, admin, editor, viewer)

Error Handling & Loading State

  • Clear loading state on all error paths in add/remove collaborator flows
  • Check response.ok before parsing JSON to handle malformed responses
  • Track and alert users when project collaborator loads fail

User Feedback

  • Add success messages for collaborator removal operations
  • Display warnings when some projects fail to load with specific project names

CI/CD

  • Set ESLint continue-on-error: false to enforce code quality

Example of params fix:

// Before
export async function GET(
  request: Request,
  { params }: { params: { id: string } }
) {
  const projectId = params.id

// After
export async function GET(
  request: Request,
  { params }: { params: Promise<{ id: string }> }
) {
  const { id: projectId } = await params

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jan 19, 2026

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

Project Deployment Review Updated (UTC)
lab68dev-platform Error Error Jan 20, 2026 6:39am
lab68dev-platform-1ds5 Ready Ready Preview, Comment Jan 20, 2026 6:39am

…idation, and user feedback

Co-authored-by: DongDuong2001 <64120873+DongDuong2001@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix collaborator issue with new API route Address review comments: fix Next.js 15+ params handling, validation, and error handling Jan 19, 2026
Copilot AI requested a review from DongDuong2001 January 19, 2026 15:45
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