You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: start issue 41 env runtime support
Open a draft branch for the project-specific environment variable runtime support work before implementation begins.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add project-specific environment variable runtime support (#68)
Implements Issue #41 - Project-specific environment variable runtime support
Changes:
- Add PersistedEnvVariable type and envVars field to PersistedProject
- Add .env file parsing utility with parseEnvFile and mergeEnvVars functions
- Add env-resolution helper for terminal spawn with variable expansion
- Extend DialogApi with selectFile method for .env file selection
- Update ProjectSettings to support .env import with error handling
- Pass resolved env vars through all terminal spawn paths:
- WorkspaceLayout handleCreateTerminalInPane
- use-terminal-restore restoreFromLayout and createDefaultTerminal
- use-snapshots restoreFromSnapshot
- Print one-time terminal info line when env vars are applied
- Add comprehensive test coverage for env-parser utility
Technical details:
- Supports Unix ($VAR, ${VAR}) and Windows (%VAR%) variable references
- Only expands against inherited system/process env, not other project vars
- Normalizes env vars on save (trims keys, filters empty)
- Shows warnings for invalid lines during .env import
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address code review findings for env var runtime support
- Fix race condition in handleImportEnvFile by capturing project ID and using
functional state updates
- Make inheritedEnv parameter required in resolveEnvForSpawn and add TODO
for fetching system env from backend
- Use hasProjectEnv flag to conditionally pass env to terminal spawn
- Add env notice check in ConnectedTerminal for external terminal ID path
- Add TODO comments about secure storage for secret env var values
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments