diff --git a/ui/src/components/WorkspaceRuntimeControls.test.tsx b/ui/src/components/WorkspaceRuntimeControls.test.tsx index 8944c56b622..717a6c7e3f9 100644 --- a/ui/src/components/WorkspaceRuntimeControls.test.tsx +++ b/ui/src/components/WorkspaceRuntimeControls.test.tsx @@ -104,10 +104,40 @@ describe("buildWorkspaceRuntimeControlSections", () => { runtimeServiceId: null, }), ]); - expect(sections.otherServices).toEqual([ + expect(sections.otherServices).toEqual([]); + }); + + it("surfaces running stale runtime services separately from updated commands", () => { + const sections = buildWorkspaceRuntimeControlSections({ + runtimeConfig: { + commands: [ + { id: "web", name: "web", kind: "service", command: "pnpm dev:once --tailscale-auth" }, + ], + }, + runtimeServices: [ + createRuntimeService({ + id: "service-web", + serviceName: "web", + status: "running", + command: "pnpm dev", + }), + ], + canStartServices: true, + canRunJobs: true, + }); + + expect(sections.services).toEqual([ expect.objectContaining({ title: "web", statusLabel: "stopped", + command: "pnpm dev:once --tailscale-auth", + runtimeServiceId: null, + }), + ]); + expect(sections.otherServices).toEqual([ + expect.objectContaining({ + title: "web", + statusLabel: "running", command: "pnpm dev", runtimeServiceId: "service-web", disabledReason: "This runtime service no longer matches a configured workspace command.",