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 ui/koko/tests/kubernetes/kubernetesWorkspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ describe("kubernetes workspace click typing", () => {
expect(kubernetesWorkspace).toContain('@click="void (resourceTreeOpen = true)"');
});

it("hides the idle empty placeholder while the connection progress overlay is showing", () => {
expect(kubernetesWorkspace).toContain('v-if="!terminalTabs.length && !connectingOverlay"');
expect(kubernetesWorkspace).toContain("koko.kubernetes.empty");
});

it("keeps the themed terminal edge-to-edge with FitAddon-aware text spacing", () => {
expect(kubernetesWorkspace).toMatch(
/\.kubernetes-terminal :deep\(\.terminal\)\s*\{[^}]*height:\s*100%;[^}]*padding:\s*8px 2px 4px 8px;/
Expand Down
6 changes: 5 additions & 1 deletion ui/koko/workspaces/KubernetesWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ let resizeHandle: HTMLElement | null = null;
let resizePointerId: number | null = null;
const terminalSocket = useKubernetesTerminalSocket();

const connectingOverlay = computed(() => Boolean((tab.value as { connectionProgress?: string }).connectionProgress));
const activeTab = computed(() => terminalTabs.value.find((item) => item.id === activeTabId.value) || null);
const assetName = computed(() => tab.value.assetName || t("koko.kubernetes.name"));
const resize = useDebounceFn(() => {
Expand Down Expand Up @@ -826,7 +827,10 @@ onUnmounted(() => {
class="kubernetes-terminal absolute inset-0"
:class="activeTabId === item.id ? '' : 'pointer-events-none invisible'"
/>
<div v-if="!terminalTabs.length" class="grid h-full place-items-center p-6 text-sm text-(--app-muted)">
<div
v-if="!terminalTabs.length && !connectingOverlay"
class="grid h-full place-items-center p-6 text-sm text-(--app-muted)"
>
<div class="flex flex-col items-center gap-3">
<UIcon name="i-lucide-square-terminal" class="size-10" />
<span>{{ t("koko.kubernetes.empty") }}</span>
Expand Down
Loading