-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(envvars): use getEnv on the client-side when we need to inject vars for docker runtime, fix folder container & removed folder/subfolder creation modals #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…runtime, fix folder container & removed folder/subfolder creation modals
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR addresses Docker runtime environment variable injection issues and improves the folder management UX. The primary change replaces static env object usage with the dynamic getEnv() function across client-side components to support Docker deployments where environment variables are injected at runtime rather than build time.
The getEnv() function provides universal environment variable access by first attempting to use next-runtime-env (which supports Docker runtime injection) and falling back to process.env when needed. This change affects critical components including socket connections, authentication, deployment modals, file selectors, and various workflow utilities that rely on NEXT_PUBLIC_* variables.
Additionally, the PR introduces significant UX improvements to folder management by removing modal dialogs for folder/subfolder creation and implementing automatic name generation using incremental patterns ("Folder 1", "Folder 2", etc.). A new centralized naming utility (lib/naming.ts) consolidates naming logic for workspaces, folders, and workflows, while maintaining creative naming for workflows using adjective-noun combinations.
Minor CSS fixes were also included to improve text truncation in folder and workflow items by adding min-w-0 classes to flex containers.
Confidence score: 2/5
• This PR has architectural inconsistencies that could cause environment variable issues in Docker deployments
• The env.ts file reverts experimental runtime environment configuration to use process.env directly, contradicting the PR's goal of Docker runtime support
• Files that need more attention: lib/env.ts (inconsistent runtime configuration), lib/naming.ts (new centralized utility needs review), and components using getEnv() to ensure proper fallback behavior
21 files reviewed, 2 comments
.../sim/app/workspace/[workspaceId]/w/components/sidebar/components/create-menu/create-menu.tsx
Outdated
Show resolved
Hide resolved
|
✅ No security or compliance issues detected. Reviewed everything up to 061d2e3. Security Overview
Detected Code Changes
Reply to this PR with |
…rs for docker runtime, fix folder container & removed folder/subfolder creation modals (simstudioai#751) * use getEnv on the client-side when we need to inject vars for docker runtime, fix folder container & removed folder/subfolder creation modals * consolidated naming utils * additional type safety
Description
use getEnv on the client-side when we need to inject vars for docker runtime, fix folder container & removed folder/subfolder creation modals
Type of change
How Has This Been Tested?
Tested manually to ensure environments are read properly, even on the client
Checklist:
bun run test)Security Considerations: