From bf46d96c1403e17d6e9e7decd230486d717829b8 Mon Sep 17 00:00:00 2001 From: Brett Chien Date: Mon, 7 Sep 2026 18:43:48 +0800 Subject: [PATCH] fix(console): block Add-instance on a k8s fleet instead of silently deploying to ECS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit studio#146 final-review pass (mirrors studio#83 slice 7): re-reading the merged console/ fresh off main after all 4 slices landed surfaced a newly-reachable bug. Before this issue, a k8s fleet couldn't be selected at all, so its Fleet detail "+ Add instance" button was unreachable. Now that slice 4 lets you drill into one, clicking it opens `deploy.ts`'s compose step — which assumes ECS whenever mode isn't "new-fleet" (the provider only lives in the identity + // step, skipped for "add instance"), so submitting here would silently + // deploy an ECS service into a k8s fleet instead of erroring. Block it + // with the same clear-message pattern the wizard already uses for its + // own not-yet-supported k8s-provider case, rather than let that happen. + const fleet = fleetConfig?.fleets.find((f) => f.name === activeFleet); + if (fleet?.runtime === "k8s") { + note( + "info", + `fleet "${activeFleet}" is a k8s fleet — adding an instance to an existing k8s fleet isn't supported yet`, + ); + return; + } deployPanel?.open({ kind: "add-instance", fleetName: activeFleet }); return; }