Skip to content

Commit de832ef

Browse files
committed
fix: stabilize empty-workspace bootstrap flows
1 parent 5904926 commit de832ef

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

apps/web/src/shared/utils/workspace.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export const buildWorkbenchStateFromBootstrap = (
394394
layout: workbenchLayoutFromBackend(bootstrap.ui_state.layout),
395395
overlay: {
396396
...current.overlay,
397-
visible: false,
397+
visible: tabs.length === 0,
398398
input: tabs.length === 0 ? current.overlay.input : "",
399399
},
400400
};
@@ -515,7 +515,7 @@ export const applyWorkbenchUiState = (
515515
layout: workbenchLayoutFromBackend(uiState.layout),
516516
overlay: {
517517
...current.overlay,
518-
visible: false,
518+
visible: tabs.length === 0,
519519
},
520520
};
521521
};

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig({
1111
testDir: './tests/e2e',
1212
workers: 1,
1313
use: {
14-
baseURL: `http://localhost:${frontendPort}`
14+
baseURL: `http://127.0.0.1:${frontendPort}`
1515
},
1616
webServer: {
1717
command: 'node scripts/test/start-dev-stack.mjs',

tests/workspace-welcome-screen.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test("empty workbench state does not auto-open the launch overlay", () => {
2828
assert.deepEqual(normalized.overlay.target, { type: "wsl", distro: "Ubuntu" });
2929
});
3030

31-
test("bootstrap with zero open workspaces keeps the launch overlay hidden", () => {
31+
test("bootstrap with zero open workspaces keeps the launch overlay visible", () => {
3232
const next = buildWorkbenchStateFromBootstrap(
3333
{
3434
tabs: [],
@@ -66,13 +66,13 @@ test("bootstrap with zero open workspaces keeps the launch overlay hidden", () =
6666
);
6767

6868
assert.equal(next.tabs.length, 0);
69-
assert.equal(next.overlay.visible, false);
69+
assert.equal(next.overlay.visible, true);
7070
assert.equal(next.overlay.mode, "remote");
7171
assert.equal(next.overlay.input, "ssh://demo");
7272
assert.deepEqual(next.overlay.target, { type: "wsl", distro: "Ubuntu" });
7373
});
7474

75-
test("ui state with zero open workspaces keeps the launch overlay hidden", () => {
75+
test("ui state with zero open workspaces keeps the launch overlay visible", () => {
7676
const next = applyWorkbenchUiState(
7777
{
7878
tabs: [],
@@ -105,7 +105,7 @@ test("ui state with zero open workspaces keeps the launch overlay hidden", () =>
105105
);
106106

107107
assert.equal(next.tabs.length, 0);
108-
assert.equal(next.overlay.visible, false);
108+
assert.equal(next.overlay.visible, true);
109109
assert.equal(next.overlay.mode, "remote");
110110
assert.equal(next.overlay.input, "ssh://demo");
111111
assert.deepEqual(next.overlay.target, { type: "wsl", distro: "Ubuntu" });

0 commit comments

Comments
 (0)