Skip to content

fix(domains): don't render CDN info message as an error in DNS tooltip - #4911

Open
AbiRaditya wants to merge 1 commit into
Dokploy:canaryfrom
AbiRaditya:fix/cloudflare-badge-tooltip-error-title
Open

fix(domains): don't render CDN info message as an error in DNS tooltip#4911
AbiRaditya wants to merge 1 commit into
Dokploy:canaryfrom
AbiRaditya:fix/cloudflare-badge-tooltip-error-title

Conversation

@AbiRaditya

@AbiRaditya AbiRaditya commented Jul 26, 2026

Copy link
Copy Markdown

What is this PR about?

validateDomain treats a CDN-fronted domain as valid, but reuses the error field to carry the provider's informational warning:

// packages/server/src/services/domain.ts
if (cdnProvider) {
    return { isValid: true, resolvedIp, cdnProvider: cdnProvider.displayName, error: cdnProvider.warningMessage };
}

show-domains.tsx already untangles this when storing state (message: result.error && result.isValid ? result.error : undefined), and the badge reads message to render the green "Behind Cloudflare" label correctly. The tooltip, however, branched on error alone — so the informational text was displayed under a red Error: heading, as reported in #4910.

This checks the valid + message case first, mirroring the distinction the badge already makes.

Note that the same tooltip is duplicated in two places, so both are fixed:

  • columns.tsx — the domains table view
  • show-domains.tsx — the card view, which is the one in the issue screenshot ("Behind Cloudflare")

Fixing only the table view would leave the reported repro unchanged.

Checklist

Before submitting this PR, please make sure that:

Repro for anyone verifying: detectCDNProvider matches the resolved IP against CDN ranges, so any Cloudflare-fronted domain (e.g. discord.com) added as an application domain will hit the CDN branch — you don't need to own a domain on Cloudflare.

Issues related (if applicable)

closes #4910

Screenshots (if applicable)

image (5) Screenshot-224

validateDomain returns isValid: true for CDN-fronted domains but reuses
the `error` field to carry the provider's informational warning. Both
domain tooltips branched on `error` alone, so the message rendered under
a red "Error:" heading even though the badge correctly showed a green
"Behind Cloudflare" state.

Check the valid+message case first, matching how the badge already
distinguishes the two. Applied to both the table view (columns.tsx) and
the card view (show-domains.tsx), which shares the same tooltip.

Fixes Dokploy#4910

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@AbiRaditya
AbiRaditya marked this pull request as ready for review July 26, 2026 14:20
@AbiRaditya
AbiRaditya requested a review from Siumauricio as a code owner July 26, 2026 14:20
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Domains badge "Behind Cloudflare" has Error title

1 participant