diff --git a/ui/src/components/WorkspaceRuntimeControls.test.tsx b/ui/src/components/WorkspaceRuntimeControls.test.tsx
index 7f8b0929799..3cbf327bf59 100644
--- a/ui/src/components/WorkspaceRuntimeControls.test.tsx
+++ b/ui/src/components/WorkspaceRuntimeControls.test.tsx
@@ -237,6 +237,42 @@ describe("WorkspaceRuntimeControls", () => {
act(() => root.unmount());
});
+ it("can render square plain surfaces for embedded configuration pages", () => {
+ const sections = buildWorkspaceRuntimeControlSections({
+ runtimeConfig: {
+ commands: [
+ { id: "web", name: "web", kind: "service", command: "pnpm dev" },
+ ],
+ },
+ runtimeServices: [],
+ canStartServices: true,
+ });
+
+ const root = createRoot(container);
+ act(() => {
+ root.render(
+ ,
+ );
+ });
+
+ const summaryPanel = container.querySelector(".border.border-border\\/70");
+ const servicePanel = Array.from(container.querySelectorAll(".border.border-border\\/80"))
+ .find((element) => element.textContent?.includes("web"));
+ const startButton = Array.from(container.querySelectorAll("button"))
+ .find((button) => button.textContent?.trim() === "Start");
+
+ expect(summaryPanel?.className).toContain("rounded-none");
+ expect(summaryPanel?.className).not.toContain("bg-background/60");
+ expect(servicePanel?.className).toContain("rounded-none");
+ expect(startButton?.className).toContain("rounded-none");
+
+ act(() => root.unmount());
+ });
+
it("accepts the legacy items prop without crashing", () => {
const items = buildWorkspaceRuntimeControlItems({
runtimeConfig: {
diff --git a/ui/src/components/WorkspaceRuntimeControls.tsx b/ui/src/components/WorkspaceRuntimeControls.tsx
index ef75181fe80..4d5cde881f9 100644
--- a/ui/src/components/WorkspaceRuntimeControls.tsx
+++ b/ui/src/components/WorkspaceRuntimeControls.tsx
@@ -57,6 +57,7 @@ type WorkspaceRuntimeControlsProps = {
disabledHint?: string | null;
onAction: (request: WorkspaceRuntimeControlRequest) => void;
className?: string;
+ square?: boolean;
} | {
sections?: never;
items: LegacyWorkspaceRuntimeControlItem[];
@@ -68,6 +69,7 @@ type WorkspaceRuntimeControlsProps = {
disabledHint?: string | null;
onAction: (request: WorkspaceRuntimeControlRequest) => void;
className?: string;
+ square?: boolean;
};
export function hasRunningRuntimeServices(
@@ -212,11 +214,13 @@ function CommandActionButtons({
isPending,
pendingRequest,
onAction,
+ square,
}: {
item: WorkspaceRuntimeControlItem;
isPending: boolean;
pendingRequest: WorkspaceRuntimeControlRequest | null | undefined;
onAction: (request: WorkspaceRuntimeControlRequest) => void;
+ square?: boolean;
}) {
const actions: WorkspaceRuntimeAction[] =
item.kind === "job"
@@ -249,7 +253,8 @@ function CommandActionButtons({
variant={action === "stop" ? "destructive" : action === "restart" ? "outline" : "default"}
size="sm"
className={cn(
- "h-9 w-full justify-start rounded-xl px-3 shadow-none sm:w-auto",
+ "h-9 w-full justify-start px-3 shadow-none sm:w-auto",
+ square ? "rounded-none" : "rounded-xl",
action === "restart" ? "bg-background" : null,
)}
disabled={disabled}
@@ -273,6 +278,7 @@ function CommandSection({
isPending,
pendingRequest,
onAction,
+ square,
}: {
title: string;
description: string;
@@ -282,6 +288,7 @@ function CommandSection({
isPending: boolean;
pendingRequest: WorkspaceRuntimeControlRequest | null | undefined;
onAction: (request: WorkspaceRuntimeControlRequest) => void;
+ square?: boolean;
}) {
return (
@@ -290,14 +297,14 @@ function CommandSection({
{description}
{items.length === 0 ? (
-
+
{emptyMessage}
{disabledHint ?
{disabledHint}
: null}
) : (
{items.map((item) => (
-
+
@@ -312,6 +319,7 @@ function CommandSection({
isPending={isPending}
pendingRequest={pendingRequest}
onAction={onAction}
+ square={square}
/>
@@ -360,6 +368,7 @@ export function WorkspaceRuntimeControls({
disabledHint = null,
onAction,
className,
+ square,
}: WorkspaceRuntimeControlsProps) {
const resolvedSections = sections ?? {
services: (items ?? []).map((item) => ({
@@ -377,7 +386,7 @@ export function WorkspaceRuntimeControls({
return (
-
+
Workspace commands
@@ -411,6 +420,7 @@ export function WorkspaceRuntimeControls({
isPending={isPending}
pendingRequest={pendingRequest}
onAction={onAction}
+ square={square}
/>
{resolvedSections.otherServices.length > 0 ? (
@@ -432,6 +443,7 @@ export function WorkspaceRuntimeControls({
isPending={isPending}
pendingRequest={pendingRequest}
onAction={onAction}
+ square={square}
/>
) : null}
diff --git a/ui/src/pages/ExecutionWorkspaceDetail.tsx b/ui/src/pages/ExecutionWorkspaceDetail.tsx
index 2d47c9e4467..17d19ac494c 100644
--- a/ui/src/pages/ExecutionWorkspaceDetail.tsx
+++ b/ui/src/pages/ExecutionWorkspaceDetail.tsx
@@ -532,7 +532,7 @@ export function ExecutionWorkspaceDetail() {
-
+
Workspace commands
@@ -548,6 +548,7 @@ export function ExecutionWorkspaceDetail() {
-
+
@@ -595,8 +596,8 @@ export function ExecutionWorkspaceDetail() {