Skip to content

fix: Show deployment exposure details - #110

Merged
nfebe merged 1 commit into
mainfrom
fix/first-deployment-findings
Aug 23, 2026
Merged

fix: Show deployment exposure details#110
nfebe merged 1 commit into
mainfrom
fix/first-deployment-findings

Conversation

@nfebe

@nfebe nfebe commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Show the routed service and container port in deployment details so exposure state is visible without reading service configuration.

@sourceant

sourceant Bot commented Aug 23, 2026

Copy link
Copy Markdown

Code Review Summary

This PR enhances the deployment detail view by displaying the routed service and container port. This provides immediate visibility into the exposure state for both simple and complex deployment configurations.

🚀 Key Improvements

  • Added a 'Routes to' detail row in src/views/DeploymentDetailView.vue using a new singleDomainTarget computed property.
  • Unified version bump to 0.4.0-beta.7 across package.json and package-lock.json.
  • Added a unit test in src/views/DeploymentDetailView.test.ts to ensure the exposure details are correctly rendered when domains are configured.

💡 Minor Suggestions

  • Refactor the computed property logic to use nullish coalescing for improved safety and readability.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

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}` : "";
});

@nfebe
nfebe merged commit 5812932 into main Aug 23, 2026
5 checks passed
@nfebe
nfebe deleted the fix/first-deployment-findings branch August 23, 2026 22:07
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.

1 participant