diff --git a/ui/src/components/Sidebar.test.tsx b/ui/src/components/Sidebar.test.tsx
index f41ab5b40a0..01308192484 100644
--- a/ui/src/components/Sidebar.test.tsx
+++ b/ui/src/components/Sidebar.test.tsx
@@ -67,7 +67,9 @@ vi.mock("../hooks/useInboxBadge", () => ({
}));
vi.mock("@/plugins/slots", () => ({
- PluginSlotOutlet: () => null,
+ PluginSlotOutlet: ({ slotTypes }: { slotTypes: string[] }) => (
+
Plugin slot outlet
+ ),
}));
vi.mock("@/plugins/launchers", () => ({
@@ -162,6 +164,28 @@ describe("Sidebar", () => {
});
});
+ it("renders plugin sidebar slots in Work below Workspaces", async () => {
+ mockInstanceSettingsApi.getExperimental.mockResolvedValue({ enableIsolatedWorkspaces: true });
+ const root = await renderSidebar();
+
+ const sidebarSlot = [...container.querySelectorAll("nav [data-plugin-slot-types]")]
+ .find((node) => node.getAttribute("data-plugin-slot-types") === "sidebar");
+ expect(sidebarSlot?.textContent).toContain("Plugin slot outlet");
+ const workSectionContainer = sidebarSlot?.parentElement?.parentElement;
+ const workText = workSectionContainer?.textContent ?? "";
+ expect(workText).toContain("Work");
+ expect(workText).toContain("Workspaces");
+ expect(workText.indexOf("Workspaces")).toBeLessThan(workText.indexOf("Plugin slot outlet"));
+
+ const primaryNavText = container.querySelector("nav > div:first-child")?.textContent ?? "";
+ expect(primaryNavText).toContain("Inbox");
+ expect(primaryNavText).not.toContain("Plugin slot outlet");
+
+ await act(async () => {
+ root.unmount();
+ });
+ });
+
it("does not flash the Workspaces link while experimental settings are loading", async () => {
mockInstanceSettingsApi.getExperimental.mockImplementation(() => new Promise(() => {}));
const root = await renderSidebar();
diff --git a/ui/src/components/Sidebar.tsx b/ui/src/components/Sidebar.tsx
index 210976c531e..bce1f64aecf 100644
--- a/ui/src/components/Sidebar.tsx
+++ b/ui/src/components/Sidebar.tsx
@@ -91,6 +91,15 @@ export function Sidebar() {
badgeTone={inboxBadge.failedRuns > 0 ? "danger" : "default"}
alert={inboxBadge.failedRuns > 0}
/>
+
+
+
+
+
+
+ {showWorkspacesLink ? (
+
+ ) : null}
-
-
-
-
-
-
- {showWorkspacesLink ? (
-
- ) : null}