Skip to content

feat(domains): add organization domain management tab - #3240

Open
rmnbrd wants to merge 81 commits into
stagingfrom
feat/organization-domains
Open

rmnbrd wants to merge 81 commits into
stagingfrom
feat/organization-domains

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds an organisation-level Domains tab where administrators can find, create, edit and delete custom domains across every project and environment of the organisation.

Feature flag: the tab is behind the PostHog flag organization-domains. When it is off, the tab is hidden from the organisation navigation and /organization/:organizationId/domains redirects to the organisation overview. The page waits for PostHog flags to load before redirecting, so a cold load of the URL works for users who have the flag. Create and enable the flag in PostHog before rolling it out.

Access: organisation admins and owners, plus Qovery administrators. Other members see an "Administrator access required" state.

👁️ Preview

Here is the preview URL

Domains list

  • Search, project and environment filtering, and pagination are server-side, using the new organisation custom domains endpoint. The page and page size are kept in the URL. The search waits for typing to pause (300 ms), since each search runs a list request and a DNS check. The Project and Environment filters list their options by name.
  • The table uses TanStack headers and the shared TableFilter, TableFilterSearch, Checkbox and table primitives. Skeleton rows replace the rows while a page loads, while the search waits for typing to pause, and while a new search, page or filter loads, so the previous results are never shown as the new ones. A background refresh of the same results, for example after an edit, keeps the rows; if it fails, they stay with a red callout offering a retry. A page, search or filter that never loaded shows the error in the table instead.
  • Rows follow the Figma reference: 48px cells, bounded single-line labels, neutral project/environment links, a single circular domain link, compact service/path chips and the shared service icons. Environment-mode badges reuse the existing component and the project-environments query, which rows of the same project share.
  • DNS status: one GET /organization/{organizationId}/customDomain/check request, with the same filters and page as the list, checks every domain on the page; results are cached for 5 minutes and matched to rows by environment and domain name. A domain is valid only when the check of every service that serves it passes. It is failing when one check fails, and unknown when a check could not run (status: null), when it has no check, or when the request fails. Failing and unknown statuses explain why in a multi-line tooltip, which the keyboard can open too. The API has no check for a single domain, so the Check DNS records button on the right of the table header re-checks the page; every status cell shows a skeleton until the results are back, and the button is disabled meanwhile and on an empty page. Edits and deletes invalidate the page check, including those made from a service's settings.
  • Per-status counts and the single-choice Status column filter apply to the current page only, because statuses are only known for the domains on screen. While the checks of a new page or search load, a status filter shows skeleton rows rather than an empty result.

Creating a domain

  • The New domain modal has the domain name, CDN and certificate toggles, the CNAME records to configure, and a list of routes.
  • Domain names are validated client-side with the same rule as the API, and the error says what is wrong (for example a scheme, spaces, slashes or uppercase letters).
  • Each route picks a project, an environment and a service, and shows which port will receive the traffic. Every route must be in the same environment, because the domain is created with the environment custom domain endpoint. Adding more routes is blocked when the environment can't share a domain between services. A service without a public port is rejected; if its ports can't be loaded, the form says so and offers a retry. Conflicts are checked with the validation endpoint before the route is added, and the route form can't be changed, cancelled or submitted again during that check. Create can't be submitted twice either.
  • The CNAME records show the environment's target, or explain that it isn't available until the environment is deployed.
  • Conflicts returned when the domain is created are shown next to the routes they concern. The API doesn't deploy anything, so the success toast offers to redeploy the impacted services.
  • The route dropdowns are portalled out of the modal so they aren't clipped, and they scroll.
  • The New domain and edit modals can't be dismissed while they save, so the result or error of the request is never lost.

Editing and deleting a domain

  • The edit modal shows the domain, CNAME records, CDN and certificate toggles, and the domain's routes. The CNAME target comes from the same single environment request as in the New domain modal. If it can't be loaded, the records say so and offer a retry. Removing a route removes every route of that service. It can save with or without redeploying the services.
  • Saving sends one PUT /environment/{environmentId}/customDomain/{domainName} with the services that keep the domain, so every copy changes or none does. Renaming is allowed. Removing every route sends DELETE instead, with a warning in the modal; a domain already deleted elsewhere counts as deleted. Edit is disabled, like Delete, on a domain with no application, container or Helm route, so saving can never delete it by accident. Conflicts are shown next to the routes they concern, as in the New domain modal, and the modal stays open.
  • Deleting a domain from its row asks for confirmation (naming the domain and asking to type "delete"), then sends one DELETE /environment/{environmentId}/customDomain/{domainName}. A domain that is already gone counts as deleted.
  • The API deploys nothing: the toasts offer to redeploy the impacted_services it returns. A failed redeploy shows an error toast that retries only the failed services, and is never dropped silently. "Save and redeploy" redeploys after a successful edit, so a redeploy failure never re-runs the edit.

Bulk actions

Bulk actions follow the Figma selection screen:

  • Select individual domains, or all selectable domains on the visible page, with an indeterminate header checkbox for a partial selection.
  • Selection is keyed by environment and domain. Changing the page, page size, search or filters clears it, including through browser history, so returning to a page never brings back its selection.
  • A floating bar offers Unselect and Delete. The DNS check is not a selection action, since it always covers the page: it is in the table header.
  • Delete asks for confirmation, then sends one POST /organization/{organizationId}/customDomain/bulkDelete for the selection: all the domains are deleted, or none. On success the selection is cleared; on failure it is kept and the confirmation stays open to retry.

Shared changes

  • TableFilter: typed column generic, a facetedValues column meta for server-filtered tables whose page may be empty (listed in the order given, since keys may be ids), a single-choice mode (multiple={false}), a disabled prop, and an accessible label on the clear button.
  • InputSelect: a portalled menu can now scroll inside a modal, whose scroll lock used to swallow its wheel and touch events.
  • qovery-typescript-axios goes from 1.1.1053 to 1.1.1054, which adds checkOrganizationCustomDomains (qovery-openapi-spec#1274).

Backend follow-ups

  • The organisation listing endpoint takes about 25 seconds for a page of 30 domains, so every load, page change, filter change and post-edit refresh waits that long.
  • A DNS status in the listing endpoint itself would let the status counts and filter work across all pages; today they cover the current page only.
  • Project-name matching in free-text search. No frontend filtering or all-page fetching is used in the meantime.
  • An exact-domain filter (or a single-domain endpoint) for the DNS check, so one row could be re-checked without checking the page.
  • The environment mode in the listing items. Each row loads its project's environments (one request per distinct project on the page) only to show the mode badge.

Validation

  • domains/service-settings/feature: 45 suites, 296 tests and 2 snapshots pass.
  • domains/custom-domains/feature (8 tests) and domains/custom-domains/data-access (4 tests) pass.
  • Shared UI table-filter and input-select specs (3 suites, 21 tests) pass.
  • The console TypeScript check and production build (nx build console) pass.
  • API errors are read in the { message, response } shape the console's HTTP interceptor produces, as well as AxiosErrors. Creation conflicts and the CNAME-target 404 fallback were missing that shape before.
  • Checked in the browser on a sandbox organisation (screenshots below).

Screenshots

1. Domains list

The organization Domains tab lists every custom domain with its DNS status, project, environment, routes and Edit/Delete actions. The table header shows the per-status counts for the page, the search and the Check DNS records button.

01-domains-list

2. Loading state

While a page loads, skeleton rows keep the table layout in place instead of a spinner.

02-loading-skeleton

3. Checking DNS records

Check DNS records in the table header re-checks every domain on the page: the status cells show a skeleton and the button waits until the results are back.

03-dns-check-running

4. Status details

Hovering a failing status shows the DNS check details in a tooltip that wraps long API errors.

04-status-tooltip

5. Status filter

The Status column header filters the current page by DNS status, using plain-text options like the other column filters.

05-status-filter

6. Filtered by status

With a status selected (from the column filter or the count badges), only matching domains on the page are shown.

06-status-filtered

7. Bulk selection

Selecting domains opens a floating action bar to unselect or delete them.

07-bulk-selection

8. Bulk delete

Deleting selected domains asks for confirmation and removes them from every service they are configured on.

08-bulk-delete-confirmation

9. Edit domain

The edit modal shows the domain, its CNAME records, CDN and certificate toggles and its routes, and can save with or without redeploying.

09-edit-modal

10. Delete one domain

Deleting a single domain from its row names the domain, says how many service configurations it removes it from, and asks to type "delete".

10-row-delete-confirmation

11. New domain

The New domain modal starts with the domain field, the CNAME records to configure and an empty route list.

11-new-domain-modal

12. Domain validation

The domain field rejects values the API would refuse, such as a URL with http:// or https://, with a specific message.

12-domain-validation

13. Add route

Adding a route picks the project, environment and service that will serve the domain.

13-add-route-form

14. Route dropdowns

The route dropdowns open outside the modal and scroll, so every option stays reachable.

14-route-dropdown

15. Route preview

Once a service is picked, the form explains which port of that service will receive the traffic.

15-route-selected

16. Domain with a route

Added routes are listed in the modal, and the CNAME records show the environment's target, or explain when it is not available yet.

16-new-domain-with-route

17. Pagination

Pagination is server-side, and the page and page size are kept in the URL (here ?page=2&pageSize=10).

17-pagination-url

18. Restricted access

Users who are not organization administrators (or Qovery admins) see a locked state instead of the domains.

18-admin-required

References: Figma design, API specification.

🤖 Generated with Claude Code

@nx-cloud

nx-cloud Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 14ee99e

Command Status Duration Result
nx run console:build --parallel=3 --configurati... ✅ Succeeded 1m 27s View ↗
nx run-many --target=test --parallel=3 --config... ✅ Succeeded 5m 18s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 2m 46s View ↗
nx-cloud record -- yarn nx format:check ✅ Succeeded 3s View ↗

💡 With Ultracache enabled, Nx Cloud learns each task's file inputs in CI and uses them on later runs. Turn on Ultracache in workspace settings ↗ · Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-12-02 17:09:20 UTC

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.66202% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.79%. Comparing base (dfe7d98) to head (14ee99e).

Files with missing lines Patch % Lines
...ation-domains/organization-domain-create-modal.tsx 89.47% 8 Missing and 6 partials ⚠️
...stom-domain/use-edit-organization-custom-domain.ts 35.00% 11 Missing and 2 partials ⚠️
.../lib/organization-domains/organization-domains.tsx 90.15% 9 Missing and 4 partials ⚠️
...om-domain/use-delete-organization-custom-domain.ts 0.00% 12 Missing ⚠️
...ins/use-bulk-delete-organization-custom-domains.ts 0.00% 10 Missing ⚠️
...b/components/table-filter/table-filter.stories.tsx 0.00% 10 Missing ⚠️
...cess/src/lib/domains-custom-domains-data-access.ts 74.19% 7 Missing and 1 partial ⚠️
...tom-domain/use-create-environment-custom-domain.ts 0.00% 6 Missing ⚠️
...ization-domains/organization-domain-edit-modal.tsx 92.06% 0 Missing and 5 partials ⚠️
...i/src/lib/components/table-filter/table-filter.tsx 28.57% 3 Missing and 2 partials ⚠️
... and 9 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #3240      +/-   ##
===========================================
+ Coverage    55.48%   55.79%   +0.31%     
===========================================
  Files         1609     1614       +5     
  Lines        39313    39549     +236     
  Branches     12391    12442      +51     
===========================================
+ Hits         21811    22066     +255     
+ Misses       14120    14115       -5     
+ Partials      3382     3368      -14     
Flag Coverage Δ
unittests 55.79% <80.66%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

rmnbrd and others added 27 commits November 19, 2026 15:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edit the domain, CDN and certificate settings on every service serving
it, list its routes, stage route removals, and optionally redeploy the
affected services.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Derive the status from the per-service DNS checks of the domains on the
current page, since the list API has no status yet. Add a Status column
with a header filter, page-level count badges that filter the page, and
make the row's Check DNS button refresh the status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Status cells and the status summary each suspend on their own DNS
checks behind a same-size skeleton, so the table renders right away and
statuses appear once settled instead of flipping through provisional
states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…domains

# Conflicts:
#	package.json
#	yarn.lock
Adds the environment custom domain API (create, validate, CNAME target).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configure the domain first, then add routes (project, environment and
service) before creating it on every routed service in one call through
the environment custom domain API. Show the environment CNAME target,
check route conflicts before adding them, and report creation conflicts
on the routes they concern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A modal locks scrolling outside itself and cancels wheel and touch moves
that reach the document. Stop them in menus portalled out of the modal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check domain names against the API rule in the new and edit modals, with
a message per mistake, and show the API detail when a creation fails
without conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show the DNS check summary and partial deletion failures as toasts
instead of a status line in the selection bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rmnbrd and others added 7 commits December 1, 2026 11:32
…public port

A failed request for the ports of a service asked the user to configure a public port.
It now says the ports could not be loaded and offers a retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed refresh, for example after an edit, replaced the rows with an error. The rows
stay with a callout offering a retry; a page, search or filter that never loaded still
shows the error in the table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The modal fetched the custom domains of every service serving the domain to show one
CNAME target. It now reads the environment CNAME target, as the New domain modal does,
and explains a target that is not available yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The explanation of a failing or unknown status was only available on hover: its badge
is now focusable. The CNAME panel title is a level 4 heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DNS-check filters, the route port tooltip, a missing domain with a route, and that a
redeploy retry only redeploys the failed service. The row spec's Link mock now forwards
its ref and handlers, so tooltips open in it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row action re-ran the DNS check of the whole page, so every status reloaded. It now
checks that domain only, with the organization check narrowed to its environment and
name, keeping the exact match. Only that row waits for its result, which lasts until the
page is checked again; a check that could not run makes that row unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

The API cannot check a single domain: the row action searched the environment for names
containing the domain and kept the exact match, which can miss it when more than 100 names
match. A "Check DNS records" button on the right of the table header now checks the page,
which is what one request does. The row action and the selection action bar's DNS check
are removed, with the single-domain check and the per-row results it needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 14 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

The search and DNS check could not shrink, so on a narrow screen they squeezed the
domain count and status badges onto several lines. The header now wraps: the search
and button move below the counts, and the count and badge labels stay on one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 issues found and verified against the latest diff

Confidence score: 3/5

  • In organization-domain-edit-modal.tsx, the certificate toggle can stay enabled with CDN/DNS proxy, allowing a contradictory use_cdn: true and generate_certificate: true payload. Disable the toggle when CDN/DNS proxy is enabled.
  • In organization-domain-create-modal.tsx, CNAME-target query failures are presented as if the environment has not deployed yet, with no retry; creation errors without a response body also hide the server or interceptor message. Show error-specific feedback, expose retry for the query, and include error.message before the generic fallback.
  • The tests miss important behavior: organization-domain-row.spec.tsx bypasses the environment lookup, organization-domain-edit-modal.spec.tsx checks unique keys rather than query count, and impacted-services.spec.ts does not assert query invalidations. Add assertions for the actual lookup, single query invocation, and expected invalidations.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-row.spec.tsx">

<violation number="1" location="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-row.spec.tsx:15">
P2: This `useQuery` mock bypasses the row’s environment lookup, so the “actual environment mode” test cannot catch wrong query parameters, IDs, or `select` behavior. Return a fixture environment list and apply the supplied `select` callback instead.</violation>
</file>

<file name="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-edit-modal.spec.tsx">

<violation number="1" location="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-edit-modal.spec.tsx:95">
P2: This assertion checks only unique keys, not invocation count, so repeated CNAME queries still pass. Assert `mockCnameTargetQuery` was called exactly once to enforce the one-query guarantee.</violation>
</file>

<file name="libs/domains/custom-domains/feature/src/lib/utils/impacted-services.spec.ts">

<violation number="1" location="libs/domains/custom-domains/feature/src/lib/utils/impacted-services.spec.ts:8">
P3: This test never verifies the query invalidations performed after redeployment. Assert the expected `invalidateQueries` calls so regressions in status and custom-domain refreshes cannot pass unnoticed.</violation>
</file>

<file name="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-edit-modal.tsx">

<violation number="1" location="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-edit-modal.tsx:149">
P2: The certificate toggle remains operable after enabling the CDN/DNS-proxy option, allowing an invalid or contradictory `use_cdn: true` and `generate_certificate: true` payload. Disable this toggle while `use_cdn` is true, as the surrounding domain UI requires certificate generation to be disabled for CDN-managed domains.</violation>
</file>

<file name="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-create-modal.tsx">

<violation number="1" location="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-create-modal.tsx:279">
P3: Creation drops useful server or interceptor error messages when the error has no response body. Include `error.message` before the generic fallback, matching the edit modal.</violation>

<violation number="2" location="libs/domains/service-settings/feature/src/lib/organization-domains/organization-domain-create-modal.tsx:344">
P2: The create modal mislabels CNAME-target request failures as “Available after the environment's first deployment” and offers no retry. Read `isError`/`refetch` from the query and pass an error-specific message with `onRetry`, as the edit modal does.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

rmnbrd and others added 7 commits December 1, 2026 15:36
The edit modal drew its title and sections with raw h2/h3/section markup. It now uses
the shared primitives with explicit levels, keeping the same heading order (h2 title,
h3 sections, h4 CNAME panel) and the same look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DNS check starts with the domain list so statuses arrive with the rows. Once the
list of the current filters is known to be empty or to have failed, there is nothing
to check: the check is now disabled, so refreshes after edits, re-checks and cached
empty searches no longer send it. A list still loading keeps the check running, so
statuses do not wait for the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An error without a response body, such as a network error from the HTTP interceptor,
fell back to the generic message. The New domain modal now shows the error's message
first, as the edit modal does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…New domain modal

A failed CNAME target request read as "Available after the environment's first
deployment", with no way to retry. The New domain modal now says the target could not
be loaded and offers a retry, as the edit modal does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The impacted services spec checked the redeploys but not the queries refreshed after
them, and did not test the refreshes after an edit at all. It now checks the service
statuses after a redeploy, and the organization domains, DNS checks and service custom
domains after a change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hey claim

The edit modal test counted distinct CNAME query keys, so the same query repeated per
service still passed: it now expects a single query. The row test mocked the
environment mode directly: it now returns the project's environments and applies the
row's own lookup, and checks the query is for the domain's project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 51 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

rmnbrd and others added 5 commits December 1, 2026 16:20
…in modal

Like the edit modal, the New domain modal and its Add route form now draw their titles
and sections with the shared primitives, keeping the same heading order (h2 titles, h3
sections) and the same look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
During a re-check the status cells waited for the new results, but the counts and the
status filters kept using the previous ones, so a filter could pick rows by outdated
statuses. Statuses now count as unknown while a check runs: the counts show their
skeleton and an active status filter shows loading rows, as on the first load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hange

Changing the domain or a route cleared the conflicts of the previous attempt but kept
its generic error, so the alert could describe an attempt that no longer applies. Both
domain modals now clear the error with the conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed re-check turned every status into "unknown", dropping the results it already
had. The statuses of the last successful check now stay, with a red callout saying they
may be out of date and a retry, like a failed refresh of the domains. A check that
never succeeded still shows every domain as unknown with the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Helm charts can have custom domains, but the spec only had an application, a container
and a database. It now includes a Helm chart and checks it is counted, refreshed and
redeployed like the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

// One request checks the DNS of every domain on the page: pass the same filters as the domain list. `enabled: false`
// skips the check, for a page known to have no domains to check.
export function useOrganizationDomainDnsStatuses(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this hook and its test into src/lib/hooks/use-organization-domain-dns-statuses/ to match the existing hook layout?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to src/lib/hooks/use-organization-domain-dns-statuses/ with its spec, in #3315 (stacked on this branch) (b990142).

<Tooltip content={removed ? 'Keep route' : 'Remove route'}>
<Button
type="button"
aria-label={`${removed ? 'Keep' : 'Remove'} route ${route.path} of ${route.service.name}`}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use one “Remove domain from service” action per service and show the affected paths? If web serves / and /cable, clicking “Remove route /cable” also removes / when saved.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #3315 (stacked on this branch) (1a097ed, fe162b4, d98e4df): one item per service lists every path, and which path goes to which port, with one "Remove domain from service" action.

const params = Route.useParams()
// `undefined` until PostHog has loaded the flags: wait instead of redirecting a user who has the flag.
const enabled = useFeatureFlagEnabled('organization-domains')
if (enabled === undefined)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we redirect to Overview if the flag is still missing after PostHog finishes loading? The hook can return undefined after the flags load, so a direct link can get stuck on the spinner.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #3315 (stacked on this branch) (ef03686, 0b474fa): once PostHog has loaded the flags without organization-domains, the route redirects to Overview. A failed flag request shows a Retry instead.


return (
<div role="listbox">
<div role="listbox" onWheel={stopScrollLock} onTouchMove={stopScrollLock}>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we handle the dropdown scroll in the Domains modal? In my test with a long list, handling wheel events in the form wrapper made the menu scroll while keeping the modal’s scroll lock.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the shared InputSelect change. The route form of the Domains modal now stops wheel/touch events of its portalled menus, in #3315 (stacked on this branch) (5786115).

<TableFilter
column={header.column}
multiple={false}
disabled={header.column.id === 'environmentId' && !filters.projectId}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we prevent the Status dropdown from opening when there are no options, including while DNS checks are loading? If a filter is already selected, could we still let users clear it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #3315 (stacked on this branch) (eb70963): Status is disabled without options, including while the checks load. The TableFilter clear button no longer follows disabled, so an active filter can still be cleared.

<div
role="region"
aria-label="Selected domain actions"
className="pointer-events-auto w-max max-w-full rounded-lg border border-neutral bg-surface-neutral p-3 pl-4 text-sm text-neutral shadow-xl"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we reuse animate-action-bar-fade-in here when the first domain is selected, like we do in the Services and Environments tables?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #3315 (stacked on this branch) (01422ac).

isChecking: isCheckingDns,
refreshFailed: dnsRefreshFailed,
recheck,
} = useOrganizationDomainDnsStatuses(listFilters, { enabled: !hasNoDomainsToCheck })

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheoGrandin74 what do you think would help here? On Qovery Prod, the rows showed up in ~400 ms after filtering by project, but the DNS check took over 15 seconds. During that time I couldn’t tell what was still loading, and it eventually showed Unknown because the cluster agent timed out. Changing the page size from 30 to 100 also started a new check for the same 24 domains.

Could we show a visible “Checking DNS…” label and keep any previous statuses visible while the check runs?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #3315 (stacked on this branch) (ed42ffb): a "Checking DNS…" label shows while a check runs, and known statuses stay visible in cells, counts and the filter, including across a page size change. This reverses 5c6c5ca. The 30→100 change still sends a new check, since the API checks a page at a time.

const { openModal, closeModal } = useModal()
const navigate = route.useNavigate()
const { page = 1, pageSize = 30 } = route.useSearch()
const [filterState, setFilterState] = useState<{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we store the search and active Project, Environment and Status filters in the URL alongside pagination? That would let us share a filtered view and restore it on reload.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #3315 (stacked on this branch) (1a39609, 5b5bf31): search, project, environment and status are in the URL with the pagination. The search is written once typing pauses.

<div className="flex min-w-0 flex-wrap items-center gap-2">
<TableFilterSearch
aria-label="Search domains"
placeholder="Search..."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
placeholder="Search..."
placeholder="Search…"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in #3315 (stacked on this branch) (4125da1).

},
{
id: 'domains',
label: 'Domains',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move the “New” badge from Agents to Domains in the organization navigation?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved in #3315 (stacked on this branch) (4ec9773).

Copy link
Copy Markdown
Contributor

Some UI/UX feedback and open questions:

  • I don't think we need to show the number of domains in the table.
  • Status icons should use the regular variant instead of solid.
  • I'd place the Check DNS record action to the left of New domain. That said, I'd challenge the need for a global DNS check: should this be per service (for example, when its status is failing), or available as a bulk action? Open question.
  • The table is missing the “double border” effect shown in Figma. We already have this in the console's service list, for example.
  • I'm missing an action to check the DNS record for a single domain. Is that still useful? It was in the design, but perhaps things have changed.
  • For project filtering, can we exclude projects with no detected domains by default?
  • When checking DNS records, I'd prefer an explicit Loading... state instead of skeleton loading for:
    • The DNS button.
    • The statuses, using a blue loading state. I think we prepared one for the secret manager; there's an example in Figma.
    • The statuses at the top as well.
  • In route cells, the scroll clipping should happen at the cell's edge. Currently, it seems to stop 16px before the right edge, presumably because of the padding.
  • When adding a route, we should also be able to add its port from that flow, or at least keep this in mind for later. Otherwise, adding a route from the global domains tab is difficult because the port must first be added on the service itself.
  • Do we plan to follow up with the improvements planned for the domain page at the service level?

…domains

# Conflicts:
#	package.json
#	yarn.lock
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.

5 participants