Commit graph

4981 commits

Author SHA1 Message Date
Muhammed Mustafa AKŞAM
cbf412ea35
fix: add datetime cast to finished_at column (#7418) 2026-01-04 17:23:22 +01:00
Muhammed Mustafa AKŞAM
9b6d1613ed
fix(docs): remove incorrect uuid format in openapi spec (#7419)
Co-authored-by: 🏔️ Peak <122374094+peaklabs-dev@users.noreply.github.com>
2026-01-04 16:16:19 +01:00
Andras Bacsai
e4e0618cea
perf(server): optimize destinationsByServer query (#7854) 2026-01-02 19:53:46 +01:00
Andras Bacsai
dd7962885c
fix: use original_server for log drain config in generate_compose_file (#7619) 2026-01-02 17:12:41 +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
29c62cb38f fix(service): use database UUID for ServiceDatabase proxy container name
The proxy container was incorrectly named using the service UUID instead
of the database UUID, causing proxy logs to query the wrong container.
Each ServiceDatabase should have its own uniquely named proxy container.
2026-01-02 16:49:24 +01:00
Andras Bacsai
f53229b7af
feat: add ServiceDatabase restore/import support (#7540) 2026-01-02 16:32:27 +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
luojiyin
a38717810c
perf(server): optimize destinationsByServer query
Replace in-memory filtering with database-level query in
Server::destinationsByServer(). Previously loaded all team servers
into memory before filtering by ID. Now uses findOrFail() to query
directly at the database level.
2026-01-02 22:09:38 +08:00
Andras Bacsai
7ea4191aac feat: add Sessy as one-click service
Add email observability platform Sessy to the service catalog with auto-generated HTTP Basic Auth credentials and SQLite storage.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-02 14:38:19 +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
009b4e7d48
fix(settings): fix 404 on /settings for root user on cloud (#7785) 2026-01-02 13:18:07 +01:00
Andras Bacsai
b448b08058
fix: prevent metric charts from freezing on page navigation (#7848) 2026-01-02 13:13:45 +01:00
Andras Bacsai
6cdda5427a
Fix: Trim whitespace from domain input in instance settings (#7837) 2026-01-02 13:12:11 +01:00
Andras Bacsai
a8aa452475 fix: prevent metric charts from freezing when navigating with wire:navigate
Wraps inline chart initialization scripts in IIFEs to create local scope for variables. This prevents "Identifier has already been declared" errors when Livewire's SPA navigation re-executes scripts, allowing smooth navigation between metrics pages without page refresh.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-02 12:36:17 +01:00
claude[bot]
5b6074c38a Move FQDN trim before validation in submit() method
The trim operation was happening after validation, which meant
whitespace was counted toward the max:255 validation rule. Now
input is normalized before validation, matching the pattern used
in Application and Service components.

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

Co-authored-by: Andras Bacsai <andrasbacsai@users.noreply.github.com>
2026-01-02 11:16:52 +00: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
b33962bf82 chore: remove unused $server property and add missing import
- Remove unused $server property and Server import from Advanced.php
- Add proper import for UpdateStripeCustomerEmailJob in User.php

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 15:42:21 +01:00
claude[bot]
d130030ad6 Fix domain input whitespace trimming in instance settings
- Add trim() to FQDN in instantSave() method to prevent whitespace from being saved
- Add trim() to FQDN in submit() method before validation and DNS checks
- Prevents invalid HostSNI rules caused by leading/trailing whitespace
- Fixes issue where accidental whitespace from copy-paste causes deployment failures

Fixes #7797

Co-authored-by: Andras Bacsai <andrasbacsai@users.noreply.github.com>
2026-01-01 10:45:13 +00:00
Andras Bacsai
a674720c7a
fix(metrics): prevent 30-day interval page freeze with LTTB downsampling (#7787) 2025-12-31 11:51:48 +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
8d212bc110 fix(team): improve team retrieval and session handling for users 2025-12-28 14:50:59 +01:00
Andras Bacsai
ddd78658e8 fix(user): improve cache key and remove redundant route check
- Include sessionTeamId in currentTeam() cache key to prevent stale
  team data when users switch teams
- Update refreshSession() to use new cache key format
- Remove redundant routeIs('settings.index') check since settings.*
  already matches it

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 14:02:41 +01:00
Andras Bacsai
2743229cc4 fix(user): complete User model fixes for non-web contexts
- Fix currentTeam() to return null instead of crashing when no session
- Fix role() to use $this->currentTeam() instead of global helper
- Add roleInTeam() method for explicit team context
- Remove unused otherTeams() method
- Fix InviteLink authorization bypass when role() returns null
- Fix confirmEmailChange() null safety for currentTeam()
- Fix ActivityMonitor to handle null currentTeam with fallback chain

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:55:55 +01:00
Andras Bacsai
2cf915aed8 fix(user): use $this instead of Auth::user() in User model methods
Fix isInstanceAdmin(), currentTeam(), otherTeams(), and role() methods
to operate on the actual User instance instead of always using the
authenticated user. This ensures correct behavior when these methods
are called on non-authenticated user instances (e.g., in ActivityMonitor).

Also fix settings route check to use routeIs() instead of path matching.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:55:55 +01:00
Andras Bacsai
acff543e09 fix(settings): fix 404 on /settings for root user on cloud instance
- Make Server property nullable in Settings components (Index, Advanced, Updates)
- Add conditional server loading: only load when not on cloud
- Add null checks before using server for DNS validation and proxy configuration
- Fix isInstanceAdmin() to check root team's pivot role directly instead of current team
- Make root team (id=0) bypass subscription check on cloud
- Remove isInstanceAdmin() from main middleware bypass: only settings/admin routes are exempted
- Update isSubscribed() to only check isSubscriptionActive() for navbar consistency

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-28 13:55:55 +01:00
Andras Bacsai
bd22c0e470 fix: back navigation in global search resource selection
Add smart goBack() method that skips auto-selected steps and returns to the
last step where user had a real choice. This prevents navigation loops when
previous steps only have a single option and auto-select.

Fixes #7739

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-28 13:53:26 +01:00
Andras Bacsai
0e9dbc3625 fix(metrics): address code review feedback for LTTB downsampling
- Wrap return values in collect() to maintain Collection compatibility
- Add comment explaining threshold <= 2 prevents division by zero
- Refactor tests to use actual Server model method via reflection
- Use seeded mt_rand() for reproducible test results

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:39:43 +01:00
Andras Bacsai
f199b6bfc4 fix(metrics): prevent page freeze with 30-day server metrics interval using LTTB downsampling
Implement the Largest-Triangle-Three-Buckets (LTTB) algorithm to downsample
metrics data for large time intervals (30 days generates 260K-500K+ points).
Reduces rendered points to ~1000 while preserving visual accuracy of peaks
and valleys. Fixes unresponsive page when selecting 30-day metrics interval.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-27 19:10:02 +01:00
Andras Bacsai
083d745d70
fix(restart): reset restart count when resource is manually stopped (#7784) 2025-12-27 15:22:26 +01:00
Andras Bacsai
75d8ebe803 fix(restart): reset restart count when resource is manually stopped
When a database or application was in a restart loop, the restart count
persisted even after the user manually stopped the resource. This caused
the UI to continue showing "(Xx restarts)" after user intervention.

Now resets restart_count, last_restart_at, and last_restart_type when:
- User stops a database (StopDatabase action)
- User stops an application (StopApplication action)

The existing reset in GetContainersStatus is still needed for containers
that exit on their own (crash without recovery, Docker giving up).

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-27 15:21:19 +01:00
Andras Bacsai
367d7eeabc fix(proxy): defer UI refresh until Traefik version check completes
Fixes #7732 - The proxy status change listener was dispatching ProxyStatusChangedUI
before the Traefik version check job had a chance to run. This caused users to see
stale version information when they refreshed the page immediately after restarting
the proxy.

The fix defers the UI refresh when a Traefik version check is being dispatched. The
version check job already dispatches its own ProxyStatusChangedUI event when
complete, ensuring the UI refreshes with updated version data.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-27 15:16:58 +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
Andras Bacsai
9a1020d5be fix(database): replace temporary file handling with base64 encoding for Keydb and Redis configuration 2025-12-25 18:17:42 +01:00
Andras Bacsai
f995426fb3 fix(sentinel): Add missing instantSave method and prevent duplicate notifications
- Add public instantSave() method to handle instant saves from checkbox clicks
- Remove redundant updatedIsMetricsEnabled() and updatedIsSentinelDebugEnabled() hooks
- These hooks were causing duplicate notifications when checkboxes were toggled

The instantSave attribute on checkboxes triggers wire:click='instantSave', which was failing
because the method didn't exist. Now it saves settings and restarts Sentinel in one action,
preventing the duplicate updates from both wire:click and wire:model events.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-23 15:34:09 +01:00
Andras Bacsai
f77a2674fc
feat: Add manual Stripe subscription sync command (#7706) 2025-12-19 09:35:52 +01:00
Andras Bacsai
e6ed3130b5 feat(stripe): Add manual subscription sync command with dry-run support
Add cloud:sync-stripe-subscriptions command to manually check all
subscriptions against Stripe. By default it only reports discrepancies
without making changes. Use --fix flag to actually apply corrections.

This addresses race conditions where subscriptions can be cancelled in
Stripe but remain marked as active in Coolify's database.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-19 09:34:39 +01:00
Andras Bacsai
c6c9d5a591 fix(deployment): Skip docker rm -f for builder containers with --rm flag
Builder containers are started with the --rm flag, which automatically removes them when stopped. The explicit docker rm -f is redundant and adds unnecessary steps to deployment logs.

This change adds a skipRemove parameter to graceful_shutdown_container() and sets it to true for builder container shutdowns (uuid-based) while keeping the default behavior for application containers.

Fixes #7566

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 19:36:54 +01:00
Andras Bacsai
21ce75e4d4
Revert "fix(deployment): Remove redundant docker rm when using --rm flag" 2025-12-18 13:20:59 +01:00
Andras Bacsai
922c0a9e7c
Fix deployment logs flickering and HTML entity encoding (#7689) 2025-12-18 12:53:02 +01:00
Andras Bacsai
d28e7f7f8a
fix(deployment): Remove redundant docker rm when using --rm flag (#7688) 2025-12-18 12:31:21 +01:00
Andras Bacsai
6379123f93 fix(deployment): Remove redundant docker rm when using --rm flag
Helper containers are started with --rm flag which automatically removes the container when it stops. Removed redundant docker rm commands from graceful_shutdown_container in ApplicationDeploymentJob and replaced docker rm with docker stop in DatabaseBackupJob.

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 12:30:34 +01:00