Skip to content

Conversation

@cfsmp3
Copy link
Collaborator

@cfsmp3 cfsmp3 commented Jan 19, 2026

Summary

Fix frontend to read backend/frontend/container URLs from environment variables instead of using hardcoded localhost values.

Problem

The URLs.ts file had hardcoded values:

backendURL: 'http://localhost:8000/',
frontendURL: 'http://localhost:80',
containerOrigin: 'http://localhost:8080/',

This meant the VITE_BACKEND_URL, VITE_FRONTEND_URL, and VITE_CONTAINER_ORIGIN environment variables in .env files were completely ignored, making production deployment impossible without code changes.

Solution

Use Vite's import.meta.env to read environment variables at build time, with localhost fallbacks for development:

backendURL: import.meta.env.VITE_BACKEND_URL || 'http://localhost:8000/',
frontendURL: import.meta.env.VITE_FRONTEND_URL || 'http://localhost:80',
containerOrigin: import.meta.env.VITE_CONTAINER_ORIGIN || 'http://localhost:8080/',

Test plan

  • Verified localhost defaults still work for development
  • Verified production deployment with custom URLs works when .env is present during build

🤖 Generated with Claude Code

The URLs.ts file had hardcoded localhost values which prevented
the VITE_BACKEND_URL, VITE_FRONTEND_URL, and VITE_CONTAINER_ORIGIN
environment variables from being used.

This change makes the frontend respect the .env configuration,
falling back to localhost defaults for development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

cfsmp3 and others added 2 commits January 19, 2026 10:32
The ts-jest-mock-import-meta transformer was only mocking import.meta.url
but not import.meta.env, causing tests to fail when URLs.ts tries to
access import.meta.env.VITE_BACKEND_URL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Taskwarrior deprecated sync.server.origin in favor of sync.server.url.
Updated the setup guide to use the new configuration option name.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@its-me-abhishek its-me-abhishek merged commit 2b3d043 into main Jan 19, 2026
5 checks passed
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