Skip to content

Conversation

@qiuethan
Copy link
Contributor

Summary

This PR fixes the frontend CI pipeline and TypeScript configuration. It addresses issues where import.meta.env was not properly typed, causing type-check failures, and ensures the VITE_API_BASE_URL is correctly properly available during the CI build process.

Related Issues

  • Relates to CI pipeline configuration failures.

Changes

  • TypeScript Configuration:
    • Created src/vite-env.d.ts with explicit ImportMetaEnv interface definitions to fix TS2339 errors regarding import.meta.env.
    • Updated tsconfig.app.json to strictly include src/vite-env.d.ts via the files array, ensuring types are always loaded.guarantees the build environment matches local configuration patterns.
  • Documentation & Setup:
    • Added .env.example to guide local development setup.

How to Test

  1. Local:
    • Run npm install in frontend/.
    • Run npm run type-check. It should pass without errors.
    • Run npm run dev. The app should start and connect to http://localhost:8000/api/v1 (verify in network tab or console).
  2. CI:
    • Push these changes.
    • Check the "Frontend CI" action on GitHub.
    • Verify that the "Run type checking" and "Build application" steps pass.

Checklist

  • Tests added or updated (CI & Types)
  • CI passes (lint, tests, build)
  • Documentation updated (README, .env.example)
  • No secrets or credentials committed

@qiuethan qiuethan requested a review from vivjd December 17, 2025 01:27
Copy link
Contributor

@vivjd vivjd left a comment

Choose a reason for hiding this comment

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

LGTM🫡

@qiuethan qiuethan merged commit 3f1f003 into main Dec 17, 2025
1 check passed
@qiuethan qiuethan deleted the fix-frontend-ci-env-setup branch December 17, 2025 01:43
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.

3 participants