Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

Remove key field to make it valid route for redirect.

Type of Change

  • Bug fix

Testing

Must test by attempting deploy.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 15, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Building Building Preview Comment Aug 15, 2025 10:18pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 15, 2025 10:18pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR fixes a Next.js build error by correcting the redirect configuration syntax in next.config.ts. The change removes the invalid key field from two redirect rules that handle domain redirections from simstudio.ai and www.simstudio.ai to www.sim.ai.

The issue stems from incorrect Next.js redirect API usage. When using has conditions with type: 'host', the key field is not needed and is actually invalid syntax - hostname matching is implicit when the type is 'host'. The previous configuration incorrectly included key: 'host' which was causing build failures.

Additionally, the PR adds TypeScript as const type assertions to the type field values. This ensures TypeScript treats these as literal types rather than generic strings, which aligns with Next.js type requirements and prevents potential type mismatch issues.

This configuration change is part of the main application's routing setup (apps/sim/) within the monorepo structure, ensuring proper domain redirection for the production deployment.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it fixes invalid configuration syntax
  • Score reflects a straightforward configuration fix with clear reasoning and low complexity
  • No files require special attention - the change is isolated to Next.js configuration

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@icecrasher321 icecrasher321 merged commit 2e027dd into staging Aug 15, 2025
4 of 5 checks passed
icecrasher321 added a commit that referenced this pull request Aug 15, 2025
attempt to fix build issues (#985)
@waleedlatif1 waleedlatif1 deleted the fix/build-error branch August 18, 2025 05:26
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
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