Commit Graph

13181 Commits

Author SHA1 Message Date
Andras Bacsai 2aef2c383c Merge pull request #6868 from coollabsio/handle-pr-process-statuses
Handle all ProcessStatus values in PR updates
2025-10-14 11:07:15 +02:00
Andras Bacsai 8408faf897 Handle all ProcessStatus values in ApplicationPullRequestUpdateJob
- Add support for QUEUED, KILLED, and CANCELLED statuses
- Replace if-elseif chain with match expression for better exhaustiveness
- Add appropriate emoji indicators for each status
- Ensure all ProcessStatus enum values are handled

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 11:05:42 +02:00
Andras Bacsai 040e2b4332 fix: enhance run script to remove existing containers before starting 2025-10-14 10:53:27 +02:00
Andras Bacsai ff71b28b81 Fix Monaco editor @entangle error with unique HTML IDs
**Problem:**
Monaco editor was receiving unique HTML IDs (e.g., "customLabels-a09a7773")
and using them in @entangle(), causing errors:
"Livewire property ['customLabels-a09a7773'] cannot be found"

**Root Cause:**
Monaco editor template uses @entangle($id) to bind to Livewire properties.
After our unique ID fix, $id contained the unique HTML ID with suffix,
not the original property name.

**Solution:**
Pass $modelBinding (original property name) instead of $htmlId to Monaco
editor component. This ensures @entangle() uses the correct property name
while HTML elements still get unique IDs.

**Result:**
 Monaco editor @entangle works correctly
 HTML IDs remain unique
 No Livewire property errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:34:36 +02:00
Andras Bacsai 598984f291 Fix wire:model warnings and ensure truly unique HTML IDs
**Problems Fixed:**
1. Livewire warnings about non-existent properties (e.g., wire:model="dcgoowgw0gcgcsgg00c8kskc")
2. Duplicate HTML IDs still appearing despite initial fix

**Root Causes:**
1. Auto-generated Cuid2 IDs were being used for wire:model when no explicit id was provided
2. Livewire's wire:id attribute isn't available during server-side rendering

**Solutions:**
1. Set $modelBinding to 'null' (string) when id is not provided, preventing invalid wire:model generation
2. Use random MD5 suffix instead of Livewire component ID for guaranteed uniqueness during initial render
3. Maintain correct $name attribute based on original property name

**Technical Changes:**
- Input, Textarea, Select, Datalist: Use random 8-char suffix for uniqueness
- Checkbox: Apply same random suffix approach
- wire:model now only created for explicit property names
- HTML IDs are unique from initial server render (no hydration required)

**Result:**
 No more Livewire property warnings
 Truly unique HTML IDs across all components
 wire:model bindings work correctly
 Validation and form submission unaffected

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:32:49 +02:00
Andras Bacsai a514c837b6 Fix duplicate HTML ID warnings in form components
Resolve browser console warnings about non-unique HTML IDs when multiple
Livewire components with similar form fields appear on the same page.

**Problem:**
Multiple forms using generic IDs like `id="description"` or `id="name"`
caused duplicate ID warnings and potential accessibility/JavaScript issues.

**Solution:**
- Separate `wire:model` binding name from HTML `id` attribute
- Auto-prefix HTML IDs with Livewire component ID for uniqueness
- Preserve existing `wire:model` behavior with property names

**Implementation:**
- Added `$modelBinding` property for wire:model (e.g., "description")
- Added `$htmlId` property for unique HTML ID (e.g., "lw-xyz123-description")
- Updated render() method to generate unique IDs automatically
- Updated all blade templates to use new properties

**Components Updated:**
- Input (text, password, etc.)
- Textarea (including Monaco editor)
- Select
- Checkbox
- Datalist (single & multiple selection)

**Result:**
 All HTML IDs now unique across page
 No console warnings
 wire:model bindings work correctly
 Validation error messages display correctly
 Backward compatible - no changes needed in existing components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:27:41 +02:00
Andras Bacsai 1cdd6fb876 Merge pull request #6867 from coollabsio/fix-service-refresh-issues
fix: prevent duplicate services on image change and enable real-time UI refresh
2025-10-14 10:20:51 +02:00
Andras Bacsai ff054cfea9 Merge branch 'next' into fix-service-refresh-issues 2025-10-14 10:17:59 +02:00
Andras Bacsai ce12c94709 fix: prevent duplicate services on image change and enable real-time UI refresh
This commit addresses two critical issues with Docker Compose service management:

## Issue 1: Duplicate Services Created on Image Change
When changing the image in a docker-compose file, the parser was creating new
ServiceApplication/ServiceDatabase records instead of updating existing ones.

**Root Cause**: The parsers used `firstOrCreate()` with `['name', 'image', 'service_id']`,
meaning any image change would create a new record.

**Fix**: Remove `image` from `firstOrCreate()` queries and update it separately after
finding or creating the service record.

**Changes**:
- `bootstrap/helpers/parsers.php` (serviceParser v3): Fixed in presave loop (lines 1188-1203)
  and main parsing loop (lines 1519-1539)
- `bootstrap/helpers/shared.php` (parseDockerComposeFile v2): Fixed null check logic
  (lines 1308-1348)

## Issue 2: UI Not Refreshing After Changes
When compose file or domain was modified, the Configuration component wasn't receiving
events to refresh its data, requiring manual page refresh to see updates.

**Root Cause**: The Configuration component wasn't listening for refresh events dispatched
by child components (StackForm, EditDomain).

**Fix**: Add event listeners and dispatchers to enable real-time UI updates.

**Changes**:
- `app/Livewire/Project/Service/Configuration.php`: Added listeners for `refreshServices`
  and `refresh` events (lines 36-37)
- `app/Livewire/Project/Service/EditDomain.php`: Added `refreshServices` dispatch (line 76)
- Note: `app/Livewire/Project/Service/StackForm.php` already had the dispatch

## Tests Added
- `tests/Unit/ServiceParserImageUpdateTest.php`: 4 tests verifying no duplicates created
- `tests/Unit/ServiceConfigurationRefreshTest.php`: 4 tests verifying event dispatching

All 8 new tests pass, and all existing unit tests continue to pass.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:12:36 +02:00
Andras Bacsai 03d4dd5cad Merge pull request #6866 from coollabsio/conductor/hetzner-affiliation-link
feat: add Hetzner affiliate link to token form
2025-10-14 09:40:30 +02:00
Andras Bacsai baabbc9fb4 Merge branch 'next' into conductor/hetzner-affiliation-link 2025-10-14 09:29:30 +02:00
Andras Bacsai b911d2b281 feat: update Hetzner affiliate link text and URL
- Change URL to https://coolify.io/hetzner
- Add detailed explanation about credits (€10 for Coolify, €20 for new users)
- Clarify it's only for new accounts
- Improve text formatting with extra spacing
- Apply consistent messaging across both modal and full-page layouts
2025-10-14 09:28:01 +02:00
Andras Bacsai d4b9b61cbd feat: add Hetzner affiliate link to token form
- Add affiliate link when users add their first Hetzner token
- Shows in both modal and full-page layouts
- Friendly messaging about supporting Coolify and getting credits
2025-10-14 09:25:10 +02:00
Andras Bacsai 56481b31bc Remove migration report for Livewire legacy model binding as all components have been successfully migrated and are ready for production deployment. 2025-10-14 09:15:41 +02:00
Andras Bacsai 043b144f5d Merge branch 'next' into andrasbacsai/livewire-model-binding 2025-10-14 09:02:00 +02:00
elmariss 9c79e2bfbc simplify the getCpuVendorInfo method 2025-10-13 22:41:13 +02:00
elmariss ea584902ec feat: add CPU vendor information to server types in Hetzner integration 2025-10-13 22:21:35 +02:00
xwxfox c3ea1f234d + Pinned version
+ Removed comments (moved to coolify-docs)
2025-10-13 19:24:05 +02:00
Andras Bacsai 53b605c4b2 Disable legacy_model_binding flag in Livewire config
All components have been migrated from legacy model binding to explicit
public properties with syncData() pattern. Safe to disable the flag.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 15:44:23 +02:00
Andras Bacsai f77ad4cbd9 Complete Livewire legacy model binding migration (25+ components)
This completes the migration from Livewire's legacy `id="model.property"`
pattern to explicit properties with manual synchronization. This allows
disabling the `legacy_model_binding` feature flag.

**Components Migrated (Final Session - 9 components):**
- Server/Proxy.php (1 field)
- Service/EditDomain.php (1 field) - Fixed Collection/string bug & parent sync
- Application/Previews.php (2 fields - array handling)
- Service/EditCompose.php (4 fields)
- Service/FileStorage.php (6 fields)
- Service/Database.php (7 fields)
- Service/ServiceApplicationView.php (10 fields)
- Application/General.php (53 fields) - LARGEST migration
- Application/PreviewsCompose.php (1 field)

**Total Migration Summary:**
- 25+ components migrated across all phases
- 150+ explicit properties added
- 0 legacy bindings remaining (verified via grep)
- All wire:model, id, @entangle bindings updated
- All updater hooks renamed (updatedApplicationX → updatedX)

**Technical Changes:**
- Added explicit public properties (camelCase)
- Implemented syncData(bool $toModel) bidirectional sync
- Updated validation rules (removed model. prefix)
- Updated all action methods (mount, submit, instantSave)
- Fixed updater hooks: updatedBuildPack, updatedBaseDirectory, updatedIsStatic
- Updated Blade views (id & wire:model bindings)
- Applied Collection/string confusion fixes
- Added model refresh + re-sync pattern

**Critical Fixes:**
- EditDomain.php Collection/string confusion (use intermediate variables)
- EditDomain.php parent component sync (refresh + re-sync after save)
- General.php domain field empty (syncData at end of mount)
- General.php wire:model bindings (application.* → property)
- General.php updater hooks (wrong naming convention)

**Files Modified:** 34 files
- 17 PHP Livewire components
- 17 Blade view templates
- 1 MIGRATION_REPORT.md (documentation)

**Ready to disable legacy_model_binding flag in config/livewire.php**

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 15:38:59 +02:00
Andras Bacsai 009ac822ab Merge pull request #6861 from coollabsio/fix-pgadmin-docker-network
fix: enable docker network connection for pgadmin service
2025-10-13 14:17:15 +02:00
Andras Bacsai 473fe6ffa3 Merge branch 'next' into fix-pgadmin-docker-network 2025-10-13 14:16:27 +02:00
Andras Bacsai 777cdc91f0 fix: enable docker network connection for pgadmin service 2025-10-13 14:13:40 +02:00
Andras Bacsai 8d403cc511 Merge pull request #6538 from AmirHosseinKarimi/fix/mattermost-docker-compose
fix(templates): remove mattermost healthcheck command according to lack of shell in new version
2025-10-13 13:40:17 +02:00
Andras Bacsai fe91c25b14 Merge pull request #6557 from elalemanyo/template/once-campfire
feat(campfire): add template for Once Campfire
2025-10-13 13:39:43 +02:00
Andras Bacsai 0681f4d004 Merge pull request #6559 from halilim/add-service-gramps-web
feat(service): add Gramps Web template
2025-10-13 13:39:08 +02:00
Andras Bacsai a1dfb31bf2 Merge pull request #6576 from itsneeku/patch-1
chore(service): update convex template and image
2025-10-13 13:38:40 +02:00
Andras Bacsai 7443b266d8 Merge pull request #6589 from htnminh/v4.x
fix(template/filebrowser): correct healthcheck for Filebrowser
2025-10-13 13:38:10 +02:00
Andras Bacsai e875fed548 Merge pull request #6563 from ShadowArcanist/service/pgadmin
feat(service): add pgAdmin
2025-10-13 13:37:36 +02:00
Andras Bacsai 4092100cce Merge pull request #6655 from yipfram/service/lobe-ai-chat
feat(templates): added Lobe Chat service
2025-10-13 13:34:18 +02:00
Andras Bacsai 591d495ec2 Merge pull request #6631 from zehjotkah/next
added rybbit service template
2025-10-13 13:33:55 +02:00
Andras Bacsai 70ab263115 Merge pull request #6636 from scanash00/main
fix: Bluesky PDS template
2025-10-13 13:04:21 +02:00
Andras Bacsai 3c3ac8cdad Merge pull request #6710 from EvanSchleret/v4.x
feat: Add mail environment variables to docmost.yaml
2025-10-13 13:02:36 +02:00
Andras Bacsai a1fa49eb0d Merge pull request #6721 from ShadowArcanist/shadow/fix-service-traccar-healthcheck
fix(service): traccar no available server error
2025-10-13 13:02:02 +02:00
Andras Bacsai cdfc991e2b Merge pull request #6735 from Blaumaus/swetrix-analytics-service
feat(service): add Swetrix template
2025-10-13 13:01:45 +02:00
Andras Bacsai f8f4c046a7 Merge pull request #6753 from seefs001/next
feat(template): NewAPI template
2025-10-13 12:53:24 +02:00
Andras Bacsai 42e39081f8 Merge pull request #6778 from mario-neuhold/patch-1
feat (template): use new homarr image
2025-10-13 12:52:58 +02:00
Andras Bacsai 6098a58c9f Merge pull request #6793 from YaRissi/service/gotify
feat(template): Adding Gotify service
2025-10-13 12:52:05 +02:00
Andras Bacsai 3e5fb4ae63 Merge pull request #6806 from ShadowArcanist/patch-3
chore(service): Added healthcheck to moodle
2025-10-13 12:50:48 +02:00
Andras Bacsai a1916c965a Merge pull request #6831 from ShadowArcanist/patch-4
fix(service): added missing resend env for documenso
2025-10-13 12:50:19 +02:00
Andras Bacsai bb9ddd089a Merge pull request #6859 from coollabsio/andrasbacsai/fix-livewire-field-reset
refactor: migrate database components from legacy model binding to explicit properties
2025-10-13 10:51:04 +02:00
Andras Bacsai df77a99fa3 Merge branch 'next' into andrasbacsai/fix-livewire-field-reset 2025-10-13 10:50:56 +02:00
Andras Bacsai 174c212617 Merge pull request #6860 from coollabsio/fix-api-env-vars-fields
fix: allow all environment variable fields in API endpoints
2025-10-13 10:45:35 +02:00
Andras Bacsai 78031b991a fix: allow all environment variable fields in API endpoints
Fixes #6847

The API endpoints for environment variables were rejecting valid fields
like is_buildtime, is_runtime, is_multiline, and is_shown_once with
422 errors, even though the code was using these fields internally.

Changes:
- Added missing fields to $allowedFields in create_env()
- Added missing fields to $allowedFields in update_env_by_uuid()
- Updated allowed fields in create_bulk_envs()
- Added validation rules for is_runtime and is_buildtime

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 10:44:06 +02:00
Andras Bacsai 400746f72a Merge pull request #6852 from YaRissi/fix/openapi
fix(openapi): missing 422 error code in openapi spec
2025-10-13 10:42:14 +02:00
Andras Bacsai 6879ba87df Merge branch 'next' into fix/openapi 2025-10-13 10:42:05 +02:00
Andras Bacsai acc5dbe105 Merge branch 'next' into andrasbacsai/fix-livewire-field-reset 2025-10-13 10:38:02 +02:00
Andras Bacsai 3dfef0b53a Merge pull request #6858 from coollabsio/andrasbacsai/fix-db-port-mapping-conflict
fix: prevent container name conflict when updating database port mappings
2025-10-13 10:36:15 +02:00
Andras Bacsai 8d280b4aac fix: prevent container name conflict when updating database port mappings
When port mappings are changed in the UI and the database is restarted,
the system now gracefully stops and removes the existing container before
recreating it with the new configuration.

This prevents the "container name already in use" error that occurred when
Docker Compose tried to create a container with the same name but different
port configuration.

Changes:
- Add graceful container stop (10s timeout) before docker compose up
- Remove old container to avoid name conflicts
- Use --timeout flag (modern Docker CLI) instead of deprecated --time
- Apply fix to all database types: MariaDB, MySQL, PostgreSQL, MongoDB,
  Redis, KeyDB, Dragonfly, and ClickHouse
- Update StopDatabase.php for consistency

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 10:01:54 +02:00
Andras Bacsai a15ab54495 refactor: migrate database components from legacy model binding to explicit properties
- Remove global 'refresh' event listeners from all database General components
- Migrate Redis, MySQL, MariaDB, MongoDB, PostgreSQL, and KeyDB components to use explicit public properties instead of wire:model="database.field"
- Implement syncData() method in each component for manual data synchronization between properties and Eloquent models
- Update all validation rules, messages, and attributes to reference new property names
- Update Blade views to bind inputs to explicit properties (e.g., id="name" instead of id="database.name")
- Prepare codebase for disabling Livewire's legacy_model_binding configuration option

This refactoring resolves form field reset issues caused by global refresh events
and follows Livewire 3 best practices for component property management.
2025-10-13 10:01:17 +02:00