Commit graph

1027 commits

Author SHA1 Message Date
Andras Bacsai
9b7e2e15b0 Merge remote-tracking branch 'origin/next' into env-var-descriptions 2026-03-01 14:39:23 +01:00
Andras Bacsai
9a4b4280be refactor(jobs): split task skip checks into critical and runtime phases
Move expensive runtime checks (service/application status) after cron
validation to avoid running them for tasks that aren't due. Critical
checks (orphans, infrastructure) remain in first phase.

Also fix database heading parameters to be built from the model.
2026-02-28 18:37:51 +01:00
Andras Bacsai
d9e39ba211 Merge remote-tracking branch 'origin/next' into env-var-descriptions 2026-02-28 00:09:54 +01:00
Andras Bacsai
521d995ea1 Merge remote-tracking branch 'origin/next' into 7765-healthcheck-investigation 2026-02-25 11:57:58 +01:00
Andras Bacsai
609cb4190e fix(health-checks): sanitize and validate CMD healthcheck commands
- Add regex validation to restrict allowed characters (alphanumeric, spaces, and specific safe symbols)
- Enforce maximum 1000 character limit on healthcheck commands
- Strip newlines and carriage returns to prevent command injection
- Change input field from textarea to text input in UI
- Add warning callout about prohibited shell operators
- Add comprehensive validation tests for both valid and malicious command patterns
2026-02-25 11:28:33 +01:00
Andras Bacsai
24abd51238
fix(auth): prevent cross-tenant IDOR in resource cloning (#8613) 2026-02-25 11:21:52 +01:00
Andras Bacsai
1759a1631c chore: prepare for PR 2026-02-25 11:18:46 +01:00
Andras Bacsai
65d4005493 Merge remote-tracking branch 'origin/next' into 7765-healthcheck-investigation
# Conflicts:
#	app/Livewire/Project/Shared/HealthChecks.php
2026-02-25 11:02:38 +01:00
Andras Bacsai
30c0b37689 chore: prepare for PR 2026-02-25 10:58:29 +01:00
Aditya Tripathi
036f565785
Merge branch 'next' into feat/healthcheck-cmd 2026-02-24 22:22:02 +05:30
Andras Bacsai
73170fdd33 chore: prepare for PR 2026-02-23 12:12:10 +01:00
Aditya Tripathi
04283a03a0
Merge branch 'next' into feat/healthcheck-cmd 2026-02-21 06:54:29 +05:30
Andras Bacsai
c5afd8638e chore: prepare for PR 2026-02-09 15:24:24 +01:00
Raphael Afonso
dd9e599321
fix(backup): postgres restore arithmetic syntax error (#7997) 2026-01-19 19:08:32 +01:00
Andras Bacsai
95091e918f fix: optimize queries and caching for projects and environments 2026-01-16 11:51:26 +01:00
Aditya Tripathi
33d5879160
Merge branch 'next' into feat/healthcheck-cmd 2026-01-15 16:37:54 +05:30
peaklabs-dev
233c79f598
fix(backup): database restores with custom db name 2026-01-08 16:29:08 +01:00
peaklabs-dev
8ba30d75ea
refactor: move all env sorting to one place 2026-01-06 16:19:38 +01:00
🏔️ Peak
caca421e2e
fix: db public port instant save and simplify if condition (#7883) 2026-01-06 13:44:46 +01:00
peaklabs-dev
e774921866
refactor: remove duplicated validation messages 2026-01-05 13:15:14 +01:00
Andras Bacsai
63380d27c7 fix(service): prevent public toggle from saving entire database form
The instantSave method for the 'Make it publicly available' checkbox was
calling submitDatabase(), which saved all form fields. This caused
unintended saves when only toggling the public visibility. The
syncDatabaseData() call already handles saving the public toggle state.
2026-01-02 16:59:20 +01:00
Andras Bacsai
796bb3a19d feat: Refactor service database management and backup functionalities
- Introduced a new sidebar component for service database navigation.
- Updated routes for database import and backup functionalities.
- Refactored the database import view to improve clarity and maintainability.
- Consolidated service application and database views into a more cohesive structure.
- Removed deprecated service application view and integrated its functionalities into the service index.
- Enhanced user experience with modal confirmations for critical actions.
- Improved code readability and organization across various components.
2026-01-02 16:29:48 +01:00
Andras Bacsai
9466ad4a48 fix(service): handle missing service database and redirect to configuration 2026-01-02 13:46:53 +01:00
Andras Bacsai
360a82ec5d Merge branch 'next' into feat/servicedatabase-restore 2026-01-02 13:45:15 +01:00
Andras Bacsai
006e787e2a
feat(logs): Add loading indicator to download all logs buttons (#7847) 2026-01-02 12:05:14 +01:00
Andras Bacsai
4d4254b591
claude fix test (#7825) 2026-01-02 12:04:23 +01:00
Andras Bacsai
a980fd460a feat(logs): Add loading indicator to download all logs buttons
Add visual feedback when downloading all logs in both container and deployment log views. Users now see an animated spinner and "Downloading..." text, preventing multiple concurrent downloads and improving UX during long operations.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-02 12:04:17 +01:00
Andras Bacsai
770ce2d327 Refactor application general settings view for improved readability and maintainability
- Adjusted indentation and formatting for better code clarity.
- Simplified conditional statements and removed unnecessary null checks.
- Enhanced user interface elements for Docker Compose and Dockerfile configurations.
- Improved handling of deployment commands and network settings.
- Updated helper texts for better user guidance.
2025-12-31 11:44:08 +01:00
Andras Bacsai
3ffe05f0ce refactor: remove unused updateServiceEnvironmentVariables method 2025-12-31 11:32:02 +01:00
Claude
bbb2aa9ad4
feat(logs): Add dropdown to download displayed or all logs
Users can now choose between downloading only the currently displayed
logs or fetching and downloading all available logs from the container.

Changes:
- Add downloadAllLogs() method that fetches all logs without limit
- Replace download button with dropdown menu
- Options: "Download displayed logs" and "Download all logs"

Addresses #7803
2025-12-29 17:59:23 +00:00
Claude
b484c0cc25
fix(logs): Remove hardcoded 2000 line display limit
The log viewer was artificially limiting display to 2000 lines
regardless of user's requested amount. Users could request 10k, 40k,
or 50k lines but only 2000 were ever shown.

Changes:
- Remove the hardcoded $maxDisplayLines = 2000 limit in the view
- Add MAX_LOG_LINES constant (50,000) in GetLogs component
- Enforce maximum limit in backend to prevent extremely large requests
- Update input field with max attribute and tooltip

Fixes #7803
2025-12-29 17:52:35 +00:00
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
e4cc5c1178 fix: update success message logic to only show when changes are made 2025-12-27 15:24:09 +01:00
Andras Bacsai
d640911bb9 fix: preserve existing comments in bulk update and always show save notification
This commit fixes two UX issues with environment variable bulk updates:

1. Comment Preservation (High Priority Bug):
   - When bulk updating environment variables via Developer view, existing
     manually-entered comments are now preserved when no inline comment is provided
   - Only overwrites existing comments when an inline comment (#comment) is explicitly
     provided in the pasted content
   - Previously: pasting "KEY=value" would erase existing comment to null
   - Now: pasting "KEY=value" preserves existing comment, "KEY=value #new" overwrites it

2. Save Notification (UX Improvement):
   - "Save all Environment variables" button now always shows success notification
   - Previously: only showed notification when changes were detected
   - Now: provides feedback even when no changes were made
   - Consistent with other save operations in the codebase

Changes:
- Modified updateOrCreateVariables() to only update comment field when inline comment
  is provided (null check prevents overwriting existing comments)
- Modified handleBulkSubmit() to always dispatch success notification unless error occurred
- Added comprehensive test coverage for bulk update comment preservation scenarios

Tests:
- Added 4 new feature tests covering comment preservation edge cases
- All 22 existing unit tests for parseEnvFormatToArray pass
- Code formatted with 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
0eb0dbef02 fix: save comment field when creating application environment variables
The comment field was not being saved when creating environment variables from applications, even though it worked for shared environment variables. The issue was in the createEnvironmentVariable method which was missing the comment assignment.

Added: $environment->comment = $data['comment'] ?? null;

The comment is already dispatched from the Add component and now it's properly saved to the database for application environment 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
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
ab472bf5ed feat: enhance environment variable handling to support mixed formats and add comprehensive tests 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
ef1abe17b8 refactor(redirect): replace redirect calls with redirectRoute helper for consistency 2025-12-26 13:29:59 +01:00
Andras Bacsai
5d98847e49 feat(redirect): add redirectRoute helper for SPA navigation support 2025-12-26 13:29:59 +01:00
Andras Bacsai
41b3c71d02 fix(terminal): add sudo for non-root users to access Docker socket in terminal command 2025-12-26 11:49:02 +01:00
Aditya Tripathi
1ef6351701 feat: require health check command for 'cmd' type with backend validation and frontend update 2025-12-25 21:03:49 +00:00
Aditya Tripathi
342e8e765d feat: add command healthcheck type 2025-12-25 08:11:11 +00:00
Andras Bacsai
9493398b58 Fix deployment logs flickering and HTML entity encoding
- Remove per-line x-effect directives that re-evaluated for every log line during polling
- Replace with efficient applySearch() function that updates logs once after Livewire morph
- Remove unnecessary caching mechanisms (renderTrigger, decodeCache, matchCountCache)
- Remove double HTML encoding of log lines (e() + Blade escaping)
- Add decodeHtml() helper to properly decode HTML entities from data attributes
- Use morph.updated hook instead of commit hook for efficient DOM updates

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 12:30:26 +01:00
Andras Bacsai
27f2e32fbf
Improve logging view performance to prevent browser freezing (#7682) 2025-12-18 08:50:04 +01:00
Andras Bacsai
acd7106f93 Refactor log view to eliminate flickering during refresh
- Use atomic update pattern in backend: collect logs into temp variable
  before replacing outputs (prevents empty state flash)
- Remove per-line x-effect directives that caused 4000+ reactive
  evaluations on every update
- Replace inline Alpine.js class bindings with CSS utility classes
- Use single $watch and morph.updated hook instead of renderTrigger
- Remove HTML entity decode cache (no longer needed)
- Fix search highlight padding that caused text shifting

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 08:46:39 +01:00
Andras Bacsai
6f2a33f859 feat: Add copy logs button to deployment and runtime logs
Add copy-to-clipboard functionality for both deployment logs and runtime container logs with success notification. Fixed event dispatch to use Livewire.dispatch() for proper toast notification handling. Reorganized copy and download buttons to appear consecutively in runtime logs toolbar.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-17 20:54:22 +01:00
Andras Bacsai
96f2e81191
feat: copy resource logs with PII/secret sanitization (#7648) 2025-12-17 16:05:13 +01:00