From 87e3c0634a04f0e037deb3749e52c324f0ed4f5c Mon Sep 17 00:00:00 2001 From: lxk955 <164191365+lxk955@users.noreply.github.com> Date: Sun, 4 Oct 2026 22:17:05 +0800 Subject: [PATCH] feat(objects): show invalid indicator and validity badge for routines/views --- .../src/components/objects/ObjectBrowser.vue | 17 +- ...ctBrowser.validityStatus.component.spec.ts | 209 ++++++++++++++++++ .../__tests__/table/objectBrowserRows.spec.ts | 15 ++ .../src/lib/table/objectBrowserRows.ts | 1 + 4 files changed, 238 insertions(+), 4 deletions(-) create mode 100644 apps/desktop/src/components/objects/__tests__/ObjectBrowser.validityStatus.component.spec.ts diff --git a/apps/desktop/src/components/objects/ObjectBrowser.vue b/apps/desktop/src/components/objects/ObjectBrowser.vue index b7c1faa817..67165ce905 100644 --- a/apps/desktop/src/components/objects/ObjectBrowser.vue +++ b/apps/desktop/src/components/objects/ObjectBrowser.vue @@ -13,6 +13,7 @@ import { Braces, Check, CheckSquare, + CircleX, Clock, Clipboard, Code2, @@ -1117,6 +1118,7 @@ const tableOverviewRows = computed(() => { { label: t("common.table"), value: sidePanelRow.value?.name ?? "" }, { label: t("common.schema"), value: sidePanelRow.value?.schema || selectedSchema.value || props.database }, { label: t("common.database"), value: props.database }, + ...(sidePanelRow.value?.valid != null ? [{ label: t("objects.validity"), value: t(sidePanelRow.value.valid ? "objects.validStatus" : "objects.invalidStatus") }] : []), { label: t("structureEditor.comment"), value: tableOverviewComment.value ?? "" }, { label: t("grid.tableInfoEstimatedRows"), value: formatObjectBrowserCount(stats?.estimated_rows) }, { label: t("grid.tableInfoTotalSize"), value: formatObjectBrowserBytes(stats?.total_bytes) }, @@ -4106,7 +4108,10 @@ function getObjectBrowserMenuItems(item: ObjectBrowserRow): ContextMenuItem[] { - + + + {{ item.displayName }} {{ t("objects.partitions", { count: item.partitionCount }) }} @@ -4114,7 +4119,7 @@ function getObjectBrowserMenuItems(item: ObjectBrowserRow): ContextMenuItem[] {
{{ typeLabel(item) }} - + {{ t(item.valid ? "objects.validStatus" : "objects.invalidStatus") }}
@@ -4157,13 +4162,14 @@ function getObjectBrowserMenuItems(item: ObjectBrowserRow): ContextMenuItem[] { -
+
+
{{ item.displayName }}
{{ typeLabel(item) }} - + {{ t(item.valid ? "objects.validStatus" : "objects.invalidStatus") }} {{ @@ -4410,6 +4416,9 @@ function getObjectBrowserMenuItems(item: ObjectBrowserRow): ContextMenuItem[] {
{{ sourceTitle(sourceRow) }} + + {{ t(sourceRow.valid ? "objects.validStatus" : "objects.invalidStatus") }} +