Commit graph

106 commits

Author SHA1 Message Date
Andras Bacsai
208f0eac99 feat: add comprehensive environment variable parsing with nested resolution and hardcoded variable detection
This commit introduces advanced environment variable handling capabilities including:
- Nested environment variable resolution with circular dependency detection
- Extraction of hardcoded environment variables from docker-compose.yml
- New ShowHardcoded Livewire component for displaying detected variables
- Enhanced UI for better environment variable management

The changes improve the user experience by automatically detecting and displaying
environment variables that are hardcoded in docker-compose files, allowing users
to override them if needed. The nested variable resolution ensures complex variable
dependencies are properly handled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:53 +01:00
Andras Bacsai
d67fcd1dff feat: add magic variable detection and update UI behavior accordingly 2025-12-27 15:24:09 +01:00
Andras Bacsai
61dcf8b4ac refactor: replace inline note with callout component for consistency
- Use x-callout component in developer view for env var note
- Simplify label text from "Comment (Optional)" to "Comment"
- Minor code formatting improvements via Pint

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
dfb180601a fix: position Update button next to comment field for locked variables
Moved the Update button to appear inline with the comment field for better UX when editing comments on locked environment variables. The button now appears on the same row as the comment input on larger screens.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
c1be02dfb9 fix: remove duplicate delete button from locked environment variable view
Removed the duplicate delete button that was appearing at the bottom of locked environment variables. The delete button at the top (next to the lock icon) is sufficient.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
c8558b5f78 fix: add Update button for locked environment variable comments
Removed instantSave from comment field and added a proper Update button with Delete modal for locked environment variables. This ensures users can explicitly save their comment changes on locked variables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
4623853c99 fix: allow editing comments on locked environment variables
Modified the locked environment variable view to keep the comment field editable even when the variable value is locked. Users with update permission can now edit comments on locked variables, while users without permission can still view the comment for reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
a4d5465963 feat: show comment field for locked environment variables
When an environment variable is locked (is_shown_once=true), the comment field is now displayed as disabled/read-only for future reference. This allows users to see the documentation/note about what the variable is for, even when the value is hidden for security.

The comment field appears after the key field and before the configuration checkboxes in the locked view.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
4e329053dd feat: add comment field to shared environment variables
Add comment field support to the "New Shared Variable" modal, ensuring it's saved properly for both normal and shared environment variables at all levels (Team, Project, Environment).

Changes:
- Add comment property, validation, and dispatch to Add component (Livewire & view)
- Update saveKey methods in Team, Project, and Environment to accept comment
- Replace SharedEnvironmentVariable model's $guarded with explicit $fillable array
- Include comment field in creation flow for all shared variable types

The comment field (max 256 chars, optional) is now available when creating shared variables and is consistently saved across all variable types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 15:24:09 +01:00
Andras Bacsai
201c9fada3 feat: limit comment field to 256 characters for environment variables 2025-12-27 15:24:09 +01:00
Andras Bacsai
e33558488e feat: add comment field to environment variables
- Add comment field to EnvironmentVariable model and database
- Update parseEnvFormatToArray to extract inline comments from env files
- Update Livewire components to handle comment field
- Add UI for displaying and editing comments
- Add tests for comment parsing functionality
2025-12-27 15:24:09 +01:00
Andras Bacsai
7009cef8a4 fix: conditionally enable buildtime checkbox based on environment type 2025-11-27 10:58:44 +01:00
Andras Bacsai
c2e1379ba8 feat: add availableSharedVariables method and enhance env-var-input component for better password handling 2025-11-27 10:23:46 +01:00
Andras Bacsai
e47e241da1 fix: update environment variable form to use consistent naming and improve checkbox logic 2025-11-27 09:39:16 +01:00
Andras Bacsai
92dff0c0c7 fix: prevent divide-by-zero in env-var autocomplete navigation
Fixes a critical bug in the environment variable autocomplete component
where arrow key navigation could cause divide-by-zero errors when the
suggestions array is empty.

Changes:
- Add early guard in handleKeydown to check for empty suggestions array
  before performing modulo operations
- Remove unreachable "No suggestions" template that could never display
- Add validation to hide dropdown when user types third brace ({{{)
- Refactor add.blade.php to use @if directives instead of x-show for
  better performance and cleaner code

The fix ensures arrow keys do nothing when suggestions are empty,
preventing JavaScript errors while maintaining all existing functionality
including the scoped empty state messages with helpful links.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 10:55:37 +01:00
Andras Bacsai
4147cfa537 refactor: use Laravel route() helper for shared variable URLs
- Replace hardcoded URL paths in getScopeUrl() with Laravel's route() helper
- Add scopeUrls property to EnvVarInput component with named routes
- Pass projectUuid and environmentUuid to enable context-specific environment links
- Environment scope link now navigates to the specific project/environment shared variables page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 10:12:17 +01:00
Andras Bacsai
c79b5f1e5c feat: add environment variable autocomplete component
Adds a new EnvVarInput component that provides autocomplete suggestions for shared environment variables from team, project, and environment scopes. Users can reference variables using {{ syntax.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 10:54:19 +01:00
Andras Bacsai
04ee546a49 fix: make environment variable forms responsive
Replace horizontal scrolling with flex-wrap for checkbox containers
in environment variable forms to improve mobile responsiveness.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 10:22:26 +02:00
Andras Bacsai
664e2eaac7 fix(environment-variable): update checkbox visibility and helper text for build and runtime options
- Removed unnecessary condition for displaying the buildtime checkbox.
- Improved the layout and helper text for runtime and literal checkboxes to enhance user understanding.
2025-09-24 17:27:48 +02:00
Andras Bacsai
b1abdcee83 feat(environment-variables): implement environment variable analysis for build-time issues
- Added EnvironmentVariableAnalyzer trait to analyze and warn about problematic environment variables during the build process.
- Integrated analysis into ApplicationDeploymentJob and Livewire components to provide feedback on potential build issues.
- Introduced a new Blade component for displaying warnings related to environment variables in the UI.
2025-09-23 08:53:14 +02:00
Andras Bacsai
3cc2426b9a style(environment-variable): adjust SVG icon margin for improved layout in locked state 2025-09-22 09:26:55 +02:00
Andras Bacsai
99fd4b424d feat(environment): add dynamic checkbox options for environment variable settings based on user permissions and variable types 2025-09-19 14:17:10 +02:00
Andras Bacsai
bfaefed1ae refactor(environment): streamline rendering of Docker Build Secrets checkbox and adjust layout for environment variable settings 2025-09-19 13:45:37 +02:00
peaklabs-dev
b64de1b5cd
fix: order for git deploy types 2025-09-18 19:56:46 +02:00
peaklabs-dev
c0ddf73b75
fix(ui): change order and fix ui on small screens 2025-09-18 19:14:34 +02:00
peaklabs-dev
429c43f9e5
chore: change order of runtime and buildtime 2025-09-18 19:13:45 +02:00
Andras Bacsai
711c16f0e6 refactor(environment): conditionally render Docker Build Secrets checkbox based on build pack type 2025-09-18 18:25:36 +02:00
Andras Bacsai
b0ff584ff4 fix(environment): correct grammatical errors in helper text for environment variable sorting checkbox 2025-09-18 18:17:37 +02:00
Andras Bacsai
f33df13c4e feat(environment): replace is_buildtime_only with is_runtime and is_buildtime flags for environment variables, updating related logic and views 2025-09-18 18:14:54 +02:00
Andras Bacsai
c1bee32f09 feat(deployment): introduce 'use_build_secrets' setting for enhanced security during Docker builds and update related logic in deployment process 2025-09-17 10:34:38 +02:00
Andras Bacsai
8e155f25b3 refactor(environment): streamline environment variable handling by replacing sorting methods with direct property access and enhancing query ordering for improved performance 2025-09-12 12:09:03 +02:00
Andras Bacsai
20ad2165e7 feat(environment): introduce 'is_buildtime_only' attribute to environment variables for improved build-time configuration 2025-09-11 17:38:16 +02:00
Andras Bacsai
5b3b4bbc43 refactor(environment): remove 'is_build_time' attribute from environment variable handling across the application to simplify configuration 2025-09-11 16:51:56 +02:00
Andras Bacsai
d98b7ab7e0 feat(policies): add EnvironmentVariablePolicy for managing environment variables ( it was missing ) 2025-08-26 21:44:36 +02:00
Andras Bacsai
63fcc0ebc3 feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled. 2025-08-26 10:27:38 +02:00
Sandro Sobczyński
554b566735
fix(ui): add flex-wrap to prevent overflow on small screens (#6307) 2025-08-04 14:09:26 +02:00
Sandro Sobczyński
7bb91faf92
fix(ui): Delete button width on small screens (#6308) 2025-08-04 13:11:39 +02:00
Andras Bacsai
b181e5bb33 fix(ui): env variable settings wrong order 2025-07-03 14:01:13 +02:00
Andras Bacsai
0e27d1f46d fix(ui): update border styling for consistency across components and enhance loading indicators 2025-06-25 10:56:35 +02:00
Andras Bacsai
c8bc80f448 refactor(environment-variables): simplify application build pack check in environment variable handling 2025-05-30 09:11:54 +02:00
Andras Bacsai
3804a7d765 fix(environment-variables): update label text for build variable checkboxes to improve clarity 2025-05-30 09:11:33 +02:00
0x4e32
c728e6f2ba
feat(ui): Upgrade to Tailwind v4 (#5710) 2025-05-14 12:43:23 +02:00
Andras Bacsai
d383344ab9 feat(EnvironmentVariable): add handling for Redis credentials in the environment variable component 2025-04-06 21:13:11 +02:00
Andras Bacsai
693c7c4cb3 fix(ui): Add literal and multiline env support to services. 2025-02-22 13:32:10 +01:00
Andras Bacsai
0ff7c468c8 fix(ui): skip SERVICE_FQDN and SERVICE_URL variables during update 2025-02-03 15:44:15 +01:00
peaklabs-dev
43a4d9b467
fix(ui): show preview deployment environment variables 2025-01-21 17:09:03 +01:00
Andras Bacsai
2a9d499251 feat: migrate env variables to polymorphic relationship
fix: proxy status query ui
2024-12-17 10:38:42 +01:00
Andras Bacsai
7f0094ed55 feat: add hex magic env var 2024-11-26 13:01:42 +01:00
Andras Bacsai
88f1e58c63 feat: required envs 2024-10-11 14:38:22 +02:00
Andras Bacsai
c2c0afa0ba fix: service env orders, application env orders 2024-10-04 12:08:57 +02:00