+
+
+
+
+
+ {isNotEnabled ? "Display is not enabled for this workspace." : "Display session is not ready."}
+
+
+ {isNotEnabled
+ ? "Recreate this workspace with display enabled to view and take over its desktop."
+ : "This workspace has display configuration, but the desktop session infrastructure is not configured yet."}
+
+ {!isNotEnabled && (
+
+ Mode
+ {status.mode || "unknown"}
+ Status
+ {status.status || "unknown"}
+
+ )}
+
+ );
+ }
+
+ return null;
+}
diff --git a/canvas/src/components/tabs/__tests__/DisplayTab.test.tsx b/canvas/src/components/tabs/__tests__/DisplayTab.test.tsx
new file mode 100644
index 000000000..ad34b421c
--- /dev/null
+++ b/canvas/src/components/tabs/__tests__/DisplayTab.test.tsx
@@ -0,0 +1,33 @@
+// @vitest-environment jsdom
+import { describe, it, expect, vi, beforeEach } from "vitest";
+import { render, screen, waitFor } from "@testing-library/react";
+
+const { mockGet } = vi.hoisted(() => ({ mockGet: vi.fn() }));
+
+vi.mock("@/lib/api", () => ({
+ api: {
+ get: mockGet,
+ },
+}));
+
+import { DisplayTab } from "../DisplayTab";
+
+describe("DisplayTab", () => {
+ beforeEach(() => {
+ mockGet.mockReset();
+ });
+
+ it("renders unavailable state for non-display workspaces", async () => {
+ mockGet.mockResolvedValueOnce({
+ available: false,
+ reason: "display_not_enabled",
+ });
+
+ render(