Skip to content

fix(deployments): prevent false-positive redeploy domain warning - #861

Merged
Hydralerne merged 1 commit into
oblien:feat/bugfix-integration-2026-09-15from
chbndrhnns:fix/858-redeploy-domain-warning
Sep 15, 2026
Merged

Hydralerne merged 1 commit into
oblien:feat/bugfix-integration-2026-09-15from
chbndrhnns:fix/858-redeploy-domain-warning

Conversation

@chbndrhnns

Copy link
Copy Markdown
Contributor

Summary

Fixes a false-positive "No public domain is connected" warning modal when redeploying multi-service (compose) projects that already have connected and verified domains.

Motivation

When clicking Redeploy on a multi-service stack, handleRedeploy checks shouldWarnAboutUnreachableServices(services). The previous implementation of hasConnectedDomain only checked the legacy scalar properties service.customDomain and service.domain on the Service record. It ignored:

  1. Active and verified domains in the domain table (domainsData.domains) bound to the service via serviceId or targetPort, as well as project-level domains.
  2. Multi-route endpoints declared in service.publicEndpoints.
  3. Default free domain resolution for exposed services (service.name).

This falsely showed the "No public domain is connected" modal on stacks that are already publicly reachable via the edge proxy. Additionally, the modal button and suggested fix copy directed users to the Services tab ("Open the Services tab. Pick the service that should be public. Enable domain exposure..."), even though domain routing is managed in the Domains tab.

Related issue

Closes #858

Changes

apps/dashboard

  • Deployments.tsx: Pass domainsData.domains to shouldWarnAboutUnreachableServices and accurately count unrouted candidate services. Update the modal primary action button to navigate to the Domains tab (setActiveTab("domains")).
  • redeploy-unreachable-warning.ts: Extract and generalize service reachability logic. A service is considered connected if:
    • Any domain in domains matches by serviceId, targetPort, or project-level assignment.
    • Any endpoint in publicEndpoints defines a valid custom or free domain.
    • Explicit scalar customDomain or domain is set.
    • For exposed free-domain services, a fallback service name exists.
  • redeploy-unreachable-warning.test.ts: Add 13 unit tests covering port matching syntax (container port, host:container, protocol suffixes), domain linking variants, and stack warning conditions.
  • Sidebar.tsx: Update hasConnectedDomain in the deploy wizard to also support service.publicEndpoints.
  • locales/*/projects.json: Add openDomains translation and update fixStep1-3 across all 9 supported locales to point to the Domains tab.

Verification

  • Ran vitest run src/app/(dashboard)/projects/[id]/components/redeploy-unreachable-warning.test.ts (13/13 passed).
  • Ran bun run lint (tsc --noEmit) in apps/dashboard (clean exit, 0 errors).
  • Ran bun test src/i18n/i18n-parity.test.ts (3/3 passed, 0 drift).

Checklist

  • One change per PR — one bug, or one agreed feature, with nothing unrelated bundled in
  • The diff is scoped — no reformatting or lint fixes on lines I wasn't otherwise changing
  • A test fails without this change and passes with it
  • bun run test, bun run --cwd <workspace> lint pass locally
  • I understand every line of this diff and can explain it in review

…ien#858)

- Check project and service domain rows in redeploy unreachable services check
- Support multi-route publicEndpoints on services
- Direct user to Domains tab in warning modal action and suggested fix copy
@Hydralerne

Hydralerne commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Incorporated this PR into feat/bugfix-integration-2026-09-15 via 05fb8a7b, preserving the original commits and adapting the fix to the current architecture.

Redeploy preflight now reads project/service domain rows and multi-port endpoints, recognizes legacy project-port bindings and free-domain defaults, and directs missing-domain fixes to the Domains tab.

GitHub now records this contributor PR as merged into the integration branch. The integrated changes are tested and awaiting merge to main.

Validation:

  • 31 dashboard tests passed, including 5 DOM tests exercising the Redeploy button, loaded/fetched service bindings, and the Domains-tab action.
  • All 5 new DOM tests fail against the pre-fix Deployments component, confirming the regression.
  • Dashboard TypeScript check passed.

@Hydralerne Hydralerne closed this Sep 15, 2026
@Hydralerne Hydralerne reopened this Sep 15, 2026
@Hydralerne
Hydralerne changed the base branch from main to feat/bugfix-integration-2026-09-15 September 15, 2026 18:25
@Hydralerne
Hydralerne merged commit 05fb8a7 into oblien:feat/bugfix-integration-2026-09-15 Sep 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: False-positive "No public domain is connected" warning on redeploy

2 participants