Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.4.0-beta.7] - 2026-08-23

### Fixed
- Deployment domain summaries show the target service and container port

## [0.4.0-beta.6] - 2026-08-23

### Added
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flatrun/ui",
"version": "0.4.0-beta.6",
"version": "0.4.0-beta.7",
"description": "Web interface for FlatRun container orchestration",
"author": "FlatRun",
"license": "MIT",
Expand Down
25 changes: 25 additions & 0 deletions src/views/DeploymentDetailView.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,31 @@ describe("DeploymentDetailView", () => {
expect((wrapper.vm as any).singleDomainId).toBe("my-domain-id");
});

it("shows the service and container port used by a domain", async () => {
const { deploymentsApi } = await import("@/services/api");
vi.mocked(deploymentsApi.get).mockResolvedValueOnce({
data: {
deployment: {
name: "test-app",
status: "running",
path: "/deployments/test-app",
services: [],
created_at: "2024-01-01T00:00:00Z",
updated_at: "2024-01-01T00:00:00Z",
metadata: {
domains: [{ id: "domain-1", domain: "app.example.com", service: "web", container_port: 8080 }],
},
},
proxy_status: { exposed: true, domain: "app.example.com" },
},
} as any);

const wrapper = mountView();
await flushPromises();
expect(wrapper.text()).toContain("Routes to");
expect(wrapper.text()).toContain("web:8080");
});

it("computes singleDomainId as 'default' for legacy domain", async () => {
const { deploymentsApi, proxyApi } = await import("@/services/api");
vi.mocked(deploymentsApi.get).mockResolvedValueOnce({
Expand Down
12 changes: 12 additions & 0 deletions src/views/DeploymentDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@
</button>
</span>
</div>
<div v-if="singleDomainTarget" class="info-row">
<span class="label">Routes to</span>
<span class="value value-mono">{{ singleDomainTarget }}</span>
</div>
<div class="info-row">
<span class="label">SSL</span>
<span class="value value-inline">
Expand Down Expand Up @@ -2242,6 +2246,14 @@ const singleDomainId = computed(() => {
return null;
});

const singleDomainTarget = computed(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This computed property can be refactored to improve both readability and robustness. By caching the metadata object, we avoid repeated reactive lookups of deployment.value. Additionally, switching to the nullish coalescing operator (??) is safer for optional configuration properties; it ensures that valid but falsy values (like an empty service name or a port of 0, should they ever occur in this context) are correctly handled rather than triggering an unintended fallback to global networking settings.

Suggested change
const singleDomainTarget = computed(() => {
const singleDomainTarget = computed(() => {
const metadata = deployment.value?.metadata;
const domains = metadata?.domains;
const configured = domains?.length === 1 ? domains[0] : null;
const service = configured?.service ?? metadata?.networking?.service;
const port = configured?.container_port ?? metadata?.networking?.container_port;
return service && port ? `${service}:${port}` : "";
});

const domains = deployment.value?.metadata?.domains;
const configured = domains?.length === 1 ? domains[0] : null;
const service = configured?.service || deployment.value?.metadata?.networking?.service;
const port = configured?.container_port || deployment.value?.metadata?.networking?.container_port;
return service && port ? `${service}:${port}` : "";
});

const deletingDomain = ref(false);

const registryCredential = ref<RegistryCredential | null>(null);
Expand Down
Loading