44 normalizeWorkbenchState ,
55} from "../apps/web/src/state/workbench-core.ts" ;
66import {
7+ applyWorkbenchUiState ,
78 buildWorkbenchStateFromBootstrap ,
89} from "../apps/web/src/shared/utils/workspace.ts" ;
910import {
@@ -15,13 +16,16 @@ test("empty workbench state does not auto-open the launch overlay", () => {
1516 tabs : [ ] ,
1617 overlay : {
1718 visible : true ,
18- mode : "local " ,
19- input : "" ,
20- target : { type : "native " } ,
19+ mode : "remote " ,
20+ input : "ssh://demo " ,
21+ target : { type : "wsl" , distro : "Ubuntu " } ,
2122 } ,
2223 } ) ;
2324
2425 assert . equal ( normalized . overlay . visible , false ) ;
26+ assert . equal ( normalized . overlay . mode , "remote" ) ;
27+ assert . equal ( normalized . overlay . input , "ssh://demo" ) ;
28+ assert . deepEqual ( normalized . overlay . target , { type : "wsl" , distro : "Ubuntu" } ) ;
2529} ) ;
2630
2731test ( "bootstrap with zero open workspaces keeps the launch overlay hidden" , ( ) => {
@@ -64,3 +68,42 @@ test("bootstrap with zero open workspaces keeps the launch overlay hidden", () =
6468 assert . equal ( next . tabs . length , 0 ) ;
6569 assert . equal ( next . overlay . visible , false ) ;
6670} ) ;
71+
72+ test ( "ui state with zero open workspaces keeps the launch overlay hidden" , ( ) => {
73+ const next = applyWorkbenchUiState (
74+ {
75+ tabs : [ ] ,
76+ activeTabId : "" ,
77+ layout : {
78+ leftWidth : 320 ,
79+ rightWidth : 320 ,
80+ rightSplit : 64 ,
81+ showCodePanel : true ,
82+ showTerminalPanel : true ,
83+ } ,
84+ overlay : {
85+ visible : false ,
86+ mode : "remote" ,
87+ input : "ssh://demo" ,
88+ target : { type : "wsl" , distro : "Ubuntu" } ,
89+ } ,
90+ } ,
91+ {
92+ open_workspace_ids : [ ] ,
93+ active_workspace_id : null ,
94+ layout : {
95+ left_width : 320 ,
96+ right_width : 320 ,
97+ right_split : 64 ,
98+ show_code_panel : true ,
99+ show_terminal_panel : true ,
100+ } ,
101+ } ,
102+ ) ;
103+
104+ assert . equal ( next . tabs . length , 0 ) ;
105+ assert . equal ( next . overlay . visible , false ) ;
106+ assert . equal ( next . overlay . mode , "remote" ) ;
107+ assert . equal ( next . overlay . input , "ssh://demo" ) ;
108+ assert . deepEqual ( next . overlay . target , { type : "wsl" , distro : "Ubuntu" } ) ;
109+ } ) ;
0 commit comments