fix(app): seed changes tab in explorer pane even when setup tab occupies it

The explorer companion pane retention commit (de9e85862) auto-opens the
setup progress tab into the hidden explorer pane. toggleWorkspaceExplorerPane
only seeded the working_diff (Changes) tab when the pane was completely
empty, so once the setup tab landed there, clicking the explorer toggle
could never surface Changes/Files again via that pane's default tab.

Also fixes two e2e testid locators (workspace-new-tab-menu-trigger) and
one unit test assertion (browser automation handler) that assumed a bare
pane root, which predates that same explorer-pane-retention change: the
workspace root is now always a group with a hidden companion pane, so
unscoped locators/assertions must target the visible/named pane.
This commit is contained in:
Mohamed Boudra
2026-08-18 15:20:06 +02:00
parent c09be7efa2
commit bd3f3c7714
3 changed files with 26 additions and 8 deletions
@@ -56,7 +56,10 @@ async function readRenderedTerminalSize(page: Page): Promise<RenderedTerminalSiz
}
async function createTerminalViaMenu(page: Page): Promise<void> {
await page.getByTestId("workspace-new-tab-menu-trigger").click();
// Workspaces always render a hidden explorer companion pane alongside the
// main pane, so an unscoped testid locator matches both; scope to the
// visible one.
await page.getByTestId("workspace-new-tab-menu-trigger").filter({ visible: true }).click();
await page.getByTestId("workspace-new-tab-menu-terminal").click();
}
@@ -124,7 +127,9 @@ test.describe("terminal PTY size claim under lost window focus", () => {
await page.setViewportSize({ width: 1280, height: 900 });
await page.goto(buildHostWorkspaceRoute(getServerId(), harness.workspaceId));
await expect(page.getByTestId("workspace-new-tab-menu-trigger")).toBeVisible({
await expect(
page.getByTestId("workspace-new-tab-menu-trigger").filter({ visible: true }),
).toBeVisible({
timeout: 30_000,
});