Skip to content

feat(dev): support shared environment directory - #2914

Open
rmnbrd wants to merge 1 commit into
stagingfrom
chore/external-console-env-dir
Open

feat(dev): support shared environment directory#2914
rmnbrd wants to merge 1 commit into
stagingfrom
chore/external-console-env-dir

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Issue: N/A

Add support for loading Console environment variables from a stable directory shared across Git worktrees.

  • Add QOVERY_CONSOLE_ENV_DIR configuration for local development
  • Configure Vite to load environment files from the selected directory
  • Preserve the repository root as the default environment directory
  • Prevent QOVERY_CONSOLE_ENV_DIR from being exposed to the client
  • Document the new setup in README.md

Screenshots / Recordings

Not applicable.

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

Summary by cubic

Supports loading Console environment variables from a shared directory so developers can reuse one env config across Git worktrees.

  • Adds QOVERY_CONSOLE_ENV_DIR to point Vite at the directory containing the env files.
  • Falls back to the repository root when the variable isn't set.
  • Strips QOVERY_CONSOLE_ENV_DIR from the client-side env bundle to avoid leaking it.
  • Documents the new setup in README.md.

Written for commit f014de9. Summary will update on new commits.

Review in cubic

- Allow Vite environment files to be loaded from QOVERY_CONSOLE_ENV_DIR
- Document shared environment configuration across worktrees
Copilot AI lite review requested due to automatic review settings August 28, 2026 09:57
@nx-cloud

nx-cloud Bot commented Aug 28, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f014de9

Command Status Duration Result
nx run console:build --parallel=3 --configurati... ✅ Succeeded 1m 9s View ↗
nx affected --target=test --parallel=3 --config... ✅ Succeeded <1s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 2m 34s View ↗
nx-cloud record -- yarn nx format:check ✅ Succeeded 5s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-28 10:02:15 UTC

Copilot AI left a comment

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.

Pull request overview

This PR adds a local-development mechanism to load Console environment files from a stable, shared directory (useful across multiple Git worktrees), while keeping the existing default behavior and documenting the setup for contributors.

Changes:

  • Document QOVERY_CONSOLE_ENV_DIR usage in README.md.
  • Update apps/console/vite.config.ts to load env files from a configurable directory and set Vite’s envDir.
  • Remove QOVERY_CONSOLE_ENV_DIR from the inlined client env object to avoid exposing it to the browser bundle.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Documents how to start the Console with env files sourced from a shared directory via QOVERY_CONSOLE_ENV_DIR.
apps/console/vite.config.ts Adds envDir support for Vite env loading and strips QOVERY_CONSOLE_ENV_DIR from the client-inlined env map.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/console/vite.config.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/console/vite.config.ts
@rmnbrd rmnbrd self-assigned this Aug 28, 2026
@rmnbrd
rmnbrd enabled auto-merge (squash) August 28, 2026 11:49
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