Skip to content

fix(service): close edit domain modal after successful save - #10990

Open
devrim-1283 wants to merge 1 commit into
coollabsio:nextfrom
devrim-1283:fix/service-edit-domain-modal-close
Open

fix(service): close edit domain modal after successful save#10990
devrim-1283 wants to merge 1 commit into
coollabsio:nextfrom
devrim-1283:fix/service-edit-domain-modal-close

Conversation

@devrim-1283

Copy link
Copy Markdown
Contributor

Changes

  • Fixed the service "Edit Domains" modal staying open after a successful save. Editing a domain on a service container (e.g. one that requires a specific port) saved correctly, but the modal never closed.
  • Root cause: the component saved and refreshed but never dispatched the close-modal event the modal wrapper listens for. I dispatch it on the success path only, so the domain-conflict and required-port dialogs still behave as before — matching how the app's other modal forms close.

Issues

  • No existing issue found — searched open and closed issues and PRs. Reproduces on a service container's "Edit Domains": enter a valid domain, click Save, save succeeds but the modal stays open.

Category

  • Bug fix
  • Improvement
  • New feature
  • Adding new one click service
  • Fixing or updating existing one click service

Preview

Before: the service "Edit Domains" modal stayed open after saving. After: it closes once the domain is saved.

AI Assistance

  • AI was NOT used to create this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Code (credited as co-author on the commit)
  • How extensively: It helped trace the root cause, wrote the one-line fix and the tests, and repaired the pre-existing test setup. I reviewed every change and ran the tests myself.

Testing

  • Extended the service edit-domain test to run in isolation (database refresh, current-team session, base instance settings, the server's auto-created destination) and added a missing factory the file already referenced.
  • New cases: modal closes after a save and after a confirmed port removal, and stays open while the port warning shows.
  • php artisan test tests/Feature/Service/EditDomainPortValidationTest.php — 11 passed.

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

EditDomain::submit() never dispatched the close-modal event that
x-modal-input listens for, so the service Edit Domains modal stayed
open after a successful save. Dispatch it on the success path only.
Also make EditDomainPortValidationTest runnable in isolation and add
the missing ServiceApplicationFactory.

Co-Authored-By: Claude <noreply@anthropic.com>
@devrim-1283
devrim-1283 force-pushed the fix/service-edit-domain-modal-close branch from abce7b2 to 7d3c484 Compare July 28, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants