Skip to content

chore: update configuration files and workflows#1174

Closed
techwithanirudh wants to merge 17 commits intovercel:mainfrom
techwithanirudh:09-09-fix_playwright_tests_not_building
Closed

chore: update configuration files and workflows#1174
techwithanirudh wants to merge 17 commits intovercel:mainfrom
techwithanirudh:09-09-fix_playwright_tests_not_building

Conversation

@techwithanirudh
Copy link
Copy Markdown

  • Refactored .gitignore to simplify environment file handling and added cspell cache.
  • Updated biome.jsonc schema reference and adjusted file inclusion/exclusion rules.
  • Added devcontainer.json for development environment setup.
  • Introduced GitHub action for setup to streamline Node and pnpm installation.
  • Modified CI workflow to include type checking and Biome linting.
  • Updated Playwright workflow to utilize the new setup action.

- Refactored .gitignore to simplify environment file handling and added cspell cache.
- Updated biome.jsonc schema reference and adjusted file inclusion/exclusion rules.
- Added devcontainer.json for development environment setup.
- Introduced GitHub action for setup to streamline Node and pnpm installation.
- Modified CI workflow to include type checking and Biome linting.
- Updated Playwright workflow to utilize the new setup action.
- Refactored .gitignore to simplify environment file handling and added cspell cache.
- Updated biome.jsonc schema reference and adjusted file inclusion/exclusion rules.
- Added devcontainer.json for development environment setup.
- Introduced GitHub action for setup to streamline Node and pnpm installation.
- Modified CI workflow to include type checking and Biome linting.
- Updated Playwright workflow to utilize the new setup action.
- Introduced .cspell.jsonc for code spell checking with custom dictionaries and ignore paths.
- Added .nvmrc to specify Node.js version.
- Created env.ts for environment variable management using T3 OSS.
- Updated next.config.ts to support typed routes and server actions.
- Enhanced package.json scripts for linting and spell checking.
- Modified GitHub workflows to include a spelling check job.
- Updated TODO.md with upcoming tasks and enhancements.
…e management

- Updated drizzle.config.ts, middleware.ts, playwright.config.ts, and other files to utilize the env module for accessing environment variables.
- Improved consistency and maintainability by centralizing environment variable management.
- Added new database schema files for user authentication and chat functionality.
- Updated drizzle configuration to point to the new schema index file.
- Refactored biome.jsonc to improve file inclusion/exclusion rules.
- Upgraded @biomejs/biome package version in package.json and pnpm-lock.yaml.
- Added a new TODO item for organizing database and authentication files.
- Upgraded various dependencies in package.json and pnpm-lock.yaml to their latest versions for improved performance and security.
- Notable updates include @ai-sdk/gateway to 1.0.20, @codemirror packages, and several @radix-ui components.
- Updated TypeScript and ESLint configurations to maintain compatibility with the latest versions.
- Upgraded various dependencies in package.json and pnpm-lock.yaml to their latest versions for improved performance and security.
- Notable updates include @ai-sdk/gateway to 1.0.20, @codemirror packages, and several @radix-ui components.
- Updated TypeScript and ESLint configurations to their latest versions for better compatibility and features.
- Introduced a new database index file for improved ORM integration using drizzle-orm.
- Refactored queries to utilize the new database instance, enhancing code organization.
- Updated biome.jsonc to refine file exclusion rules by removing the ui components directory.
- Upgraded zod in package.json and pnpm-lock.yaml to version 4.1.5 for improved functionality and compatibility.
- Updated all references to zod in the lock file to reflect the new version.
- Updated biome.jsonc to include a new linting rule for unique element IDs, reflecting developer preferences.
- Enhanced TODO.md with additional tasks and warnings from lint checks.
- Addressed multiple instances of unused function parameters across various components, improving code quality and maintainability.
- Added a comment in components/message.tsx to ignore a specific lint warning regarding iterable callback returns.
- Removed dotenv configuration from drizzle.config.ts and playwright.config.ts to simplify environment handling.
- Updated package.json scripts to use pnpm with-env for environment variable management during development and build processes.
- Deleted the obsolete migrate.ts file to clean up the codebase.
- Enhanced devcontainer.json to include Playwright dependency installation in the post-create command.
- Created a new SQL migration to rename the "text" column to "kind" in the Document table.
- Updated the migration journal to include the new migration entry.
- Added a snapshot of the database schema reflecting the changes made in this migration.
- Adjusted the chat schema to align with the updated column name.
- Increased button padding in the Context component for improved UI consistency.
- Switched from using the env module to process.env for environment variable management in constants, enhancing compatibility.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Sep 9, 2025

@techwithanirudh is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Sep 9, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​radix-ui/​react-label@​2.1.2 ⏵ 2.1.710010064 -391100
Updated@​radix-ui/​react-separator@​1.1.2 ⏵ 1.1.710010064 -391100
Updated@​radix-ui/​react-visually-hidden@​1.1.2 ⏵ 1.2.310010064 -391100
Updated@​radix-ui/​react-dropdown-menu@​2.1.6 ⏵ 2.1.169910069 -398100
Updated@​radix-ui/​react-alert-dialog@​1.1.6 ⏵ 1.1.159910069 -498100
Updated@​radix-ui/​react-dialog@​1.1.6 ⏵ 1.1.159910069 -398100
Updated@​radix-ui/​react-tooltip@​1.1.8 ⏵ 1.2.89910070 -398100
Updatedeslint-config-prettier@​9.1.0 ⏵ 9.1.21001007090100
Updated@​vercel/​functions@​2.0.0 ⏵ 2.2.139910071 +299 +1100
Updated@​radix-ui/​react-select@​2.1.6 ⏵ 2.2.69810072 -398100
Updated@​types/​pdf-parse@​1.1.4 ⏵ 1.1.510010072 +277100
Updated@​types/​papaparse@​5.3.15 ⏵ 5.3.16100 +110072 +178100
Updated@​types/​react-dom@​18.3.5 ⏵ 19.1.910010073 -192100
Updatednext-auth@​5.0.0-beta.25 ⏵ 5.0.0-beta.29991007787100
Updatedprosemirror-schema-basic@​1.2.3 ⏵ 1.2.4100 +110077 +177100
Updatedprosemirror-inputrules@​1.4.0 ⏵ 1.5.0100 +110077 +177100
Updatedcodemirror@​6.0.1 ⏵ 6.0.210010078 +685100
Updatedprosemirror-markdown@​1.13.1 ⏵ 1.13.2100 +1100100 +178100
Updated@​types/​react@​18.3.18 ⏵ 19.1.12100 +110078 +194100
Updatednanoid@​5.1.3 ⏵ 5.1.51001007983100
Updatedpostgres@​3.4.5 ⏵ 3.4.799 +110010079100
Updated@​codemirror/​theme-one-dark@​6.1.2 ⏵ 6.1.31001008279100
Updated@​types/​node@​22.13.10 ⏵ 22.18.1100 +110080 +196100
Updatedtsx@​4.19.3 ⏵ 4.20.5100 +110080 +189100
Addedcross-env@​10.0.09910010080100
Updated@​codemirror/​lang-javascript@​6.2.3 ⏵ 6.2.4100 +1100100 +180100
Updatedpostcss@​8.5.3 ⏵ 8.5.699 +110081 +183100
Updated@​codemirror/​lang-python@​6.1.7 ⏵ 6.2.1100 +110088 +181100
Updatedprosemirror-model@​1.24.1 ⏵ 1.25.31001008185100
Added@​ai-sdk/​gateway@​1.0.201001008197100
Updatednext@​15.3.0-canary.31 ⏵ 15.5.1-canary.3582 +1100 +1390 +19870
Updatedprosemirror-view@​1.38.1 ⏵ 1.41.0100 +110081 +191 +5100
Updatedpapaparse@​5.5.2 ⏵ 5.5.3100 +110094 +182100
See 21 more rows in the dashboard

View full report

- Replaced all instances of framer-motion with motion from the new motion library in component files for improved performance and consistency.
- Updated package.json and pnpm-lock.yaml to reflect the addition of the motion library and removal of framer-motion.
- Deleted the ModelSelector component from the codebase to streamline the UI.
- Updated the data-testid for the StopButton in the MultimodalInput component for consistency.
- Added data-testid to the model selector trigger in the PureModelSelectorCompact component for improved testing capabilities.
- Changed import paths in drizzle.config.ts and playwright.config.ts to use relative paths for better compatibility.
- Added knip as a new script in package.json for enhanced dependency management.
- Updated pnpm-lock.yaml to reflect the addition of knip and its dependencies.
@techwithanirudh techwithanirudh force-pushed the 09-09-fix_playwright_tests_not_building branch from bb9d400 to a3bb30e Compare September 9, 2025 10:01
export async function GET(
_: Request,
{ params }: { params: Promise<{ id: string }> },
{ params }: RouteContext<'/api/chat/[id]/stream'>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ params }: RouteContext<'/api/chat/[id]/stream'>,
{ params }: { params: Promise<{ id: string }> },

Using undefined RouteContext type that is not imported, which will cause a TypeScript compilation error.

View Details

Analysis

Bug Validation Report: Undefined RouteContext Type in Next.js API Route

Bug Summary

The reported issue about using undefined RouteContext type in app/(chat)/api/chat/[id]/stream/route.ts has been VALIDATED as a real bug causing TypeScript compilation errors.

Root Cause Analysis

The code was using RouteContext<'/api/chat/[id]/stream'> as a type annotation for the route handler's context parameter, but this type was not available, resulting in TypeScript compilation error: Cannot find name 'RouteContext'.

Evidence of the Bug

1. TypeScript Compilation Error

Running pnpm typecheck confirmed the compilation failure:

app/(chat)/api/chat/[id]/stream/route.ts(16,15): error TS2304: Cannot find name 'RouteContext'.

2. Type Not Found in Codebase

  • Search through the entire codebase confirmed RouteContext is not imported or defined anywhere
  • Grep through node_modules/*.d.ts files showed no RouteContext type definition
  • The project uses Next.js 15.5.1-canary.35, which should theoretically support this type

3. Next.js Documentation Research

According to Next.js official documentation, RouteContext should be:

  • A globally available helper for typing route handler context
  • Generated during next dev, next build, or next typegen
  • Used to provide strongly typed params from route literals

However, the type generation appears to be failing or incomplete in this project setup.

Impact Assessment

Severity: High - Blocks TypeScript compilation
Scope: Specific to this one API route handler
User Impact: Prevents successful builds and deployments

Fix Implementation

Solution: Replace the undefined RouteContext type with the standard Next.js API route type definition.

Code Change:

export async function GET(
  _: Request,
-  { params }: RouteContext<'/api/chat/[id]/stream'>,
+  { params }: { params: Promise<{ id: string }> },
) {

Verification

Post-fix TypeScript compilation shows the RouteContext error is resolved. The Cannot find name 'RouteContext' error no longer appears in the type checking output.

Why This Bug Occurred

While RouteContext is documented as available in Next.js 15, the type generation mechanism appears to have failed or is incomplete. The standard Next.js type definition { params: Promise<{ id: string }> } is the reliable alternative that works consistently across Next.js 15 projects.

The bug reporter was correct in identifying that this type usage would cause TypeScript compilation errors and needed to be fixed with proper Next.js API route type definitions.

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.

1 participant