Compare commits

...
Author SHA1 Message Date
paseo-bot[bot] 94f48a76e1 fix(app): show the sidebar toggle on plugin screens
Plugin screens rendered only their icon and title on the left of the header,
so on wide web and Android layouts there was no way to collapse the sidebar
from them, or to reopen it after it was closed elsewhere.

Fixes #6315
2026-11-21 16:51:16 +00:00
2 changed files with 35 additions and 0 deletions
@@ -3,6 +3,7 @@ import type { Locator, Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { gotoWorkspace } from "../support/helpers/launcher";
import { gotoAppShell } from "../support/helpers/app";
import { openCommandCenterWithShortcut } from "../support/helpers/command-center";
import {
BOTS_PLUGIN_ID,
COMPACT,
@@ -372,6 +373,38 @@ test.describe("Plugin sidebar items", () => {
await expect(page.getByText("Plugin failed", { exact: false })).toHaveCount(0);
});
test("a plugin screen toggles the sidebar on a wide layout", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
const row = headerRow(page, SHOWCASE_PLUGIN_ID, "deploys");
const closeMenu = page.getByRole("button", { name: "Close menu", exact: true });
const openMenu = page.getByRole("button", { name: "Open menu", exact: true });
await test.step("close and reopen the sidebar from a plugin screen", async () => {
await row.click();
await expect(screenTitle(page)).toHaveText("Deploys");
await closeMenu.click();
await expect(row).not.toBeVisible();
await openMenu.click();
await expect(row).toBeVisible();
});
await test.step("reopen a sidebar that was closed from the workspace", async () => {
await closeScreen(page);
await closeMenu.click();
await expect(row).not.toBeVisible();
await openCommandCenterWithShortcut(page);
const commandCenter = page.getByTestId("command-center-panel");
await commandCenter
.getByPlaceholder("Search workspaces, files, and actions...")
.fill("Open deploys");
await commandCenter.getByRole("button", { name: "Open deploys", exact: true }).click();
await expect(screenTitle(page)).toHaveText("Deploys");
await openMenu.click();
await expect(row).toBeVisible();
});
});
test("a header row's shortcut hint presses the row", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
@@ -8,6 +8,7 @@ import { StyleSheet, withUnistyles } from "react-native-unistyles";
import { HeaderIconBadge } from "@/components/headers/header-icon-badge";
import { HeaderToggleButton } from "@/components/headers/header-toggle-button";
import { CompactHeader } from "@/components/headers/compact-header";
import { SidebarMenuToggle } from "@/components/headers/sidebar-menu-toggle";
import { ScreenHeader } from "@/components/headers/screen-header";
import { ScreenTitle } from "@/components/headers/screen-title";
import { HostFilter } from "@/components/hosts/host-filter";
@@ -199,6 +200,7 @@ export function PluginSurfaceScreen() {
const headerLeft = useMemo(
() => (
<>
<SidebarMenuToggle />
{icon ? (
<HeaderIconBadge>
<ThemedPluginHeaderIcon icon={icon} uniProps={mutedColorMapping} />