Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(frontend): show engine details in instance header (#21444)

p0ny0bd1dcccf2dd
diff --git a/frontend/src/components/instance/InstanceDetailView.test.tsx b/frontend/src/components/instance/InstanceDetailView.test.tsx
index 4ed212dc45..4ad5c090e7 100644
--- a/frontend/src/components/instance/InstanceDetailView.test.tsx
+++ b/frontend/src/components/instance/InstanceDetailView.test.tsx
@@ -121,6 +121,7 @@ vi.mock("@/stores", () => ({
}));
vi.mock("@/utils", () => ({
+ engineNameV1: () => "PostgreSQL",
extractDatabaseResourceName: (name: string) => {
const [, instanceName, , databaseName] = name.split("/");
return { instanceName, databaseName };
diff --git a/frontend/src/components/instance/InstanceDetailView.tsx b/frontend/src/components/instance/InstanceDetailView.tsx
index 86341d0cc4..d6b70dd67a 100644
--- a/frontend/src/components/instance/InstanceDetailView.tsx
+++ b/frontend/src/components/instance/InstanceDetailView.tsx
@@ -66,6 +66,7 @@ import {
import type { Project } from "@/types/proto-es/v1/project_service_pb";
import { unknownInstance } from "@/types/v1/instance";
import {
+ engineNameV1,
extractInstanceResourceName,
extractProjectResourceName,
getDefaultPagination,
@@ -593,12 +594,20 @@ export function InstanceDetailView({
)}
{/* Header */}
- <div className="flex items-center justify-between">
- <div className="flex items-center gap-x-2">
- <EngineIcon engine={instance.engine} className="h-6 w-6" />
- <span className="text-lg font-medium">
- {instanceV1Name(instance)}
- </span>
+ <div className="flex flex-wrap items-center justify-between gap-2">
+ <div className="flex min-w-0 items-start gap-2">
+ <EngineIcon engine={instance.engine} className="size-6 shrink-0" />
+ <div className="min-w-0">
+ <h1 className="text-lg font-medium break-words">
+ {instanceV1Name(instance)}
+ </h1>
+ {cachedInstance && (
+ <p className="text-sm text-control-light break-words">
+ {engineNameV1(instance.engine)}
+ {instance.engineVersion && ` · ${instance.engineVersion}`}
+ </p>
+ )}
+ </div>
</div>
<div className="flex items-center gap-x-2">
{instance.state === State.ACTIVE && (
diff --git a/frontend/src/components/instance/InstanceFormBody.tsx b/frontend/src/components/instance/InstanceFormBody.tsx
index 43d1df2406..4b9d505b5f 100644
--- a/frontend/src/components/instance/InstanceFormBody.tsx
+++ b/frontend/src/components/instance/InstanceFormBody.tsx
@@ -1276,12 +1276,6 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {
<FormLabel htmlFor="name" className="flex flex-row items-center">
{t("instance.instance-name")}
<span className="ml-0.5 text-error">*</span>
- {instance && (
- <div className="ml-2 flex items-center">
- <EngineIcon engine={instance.engine} className="size-4" />
- <span className="ml-1">{instance.engineVersion}</span>
- </div>
- )}
</FormLabel>
<Input
id="name"