@@ -79,6 +79,21 @@ class ClaudePane {
7979 this . hadOutput = true ;
8080 this . hideStartOverlay ( ) ;
8181 }
82+ } else if ( msg . type === 'session_joined' ) {
83+ // Replay recent buffer so existing sessions show content immediately
84+ if ( Array . isArray ( msg . outputBuffer ) && msg . outputBuffer . length ) {
85+ const joined = msg . outputBuffer . join ( '' ) ;
86+ const filtered = joined . replace ( / \x1b \[ \[ ? [ I O ] / g, '' ) ;
87+ this . terminal . write ( filtered ) ;
88+ if ( filtered ) {
89+ this . hadOutput = true ;
90+ this . hideStartOverlay ( ) ;
91+ }
92+ }
93+ } else if ( msg . type === 'error' ) {
94+ // Show errors in terminal UI for visibility
95+ const text = ( msg . message || 'Error' ) . toString ( ) ;
96+ this . terminal . write ( `\r\n\x1b[31m${ text } \x1b[0m\r\n` ) ;
8297 }
8398 } ;
8499 this . socket . onclose = ( ) => { } ;
@@ -267,11 +282,7 @@ class PaneManager {
267282 const active = this . app ?. currentClaudeSessionId ;
268283 if ( active ) this . assignSession ( 0 , active ) ;
269284 this . focusPane ( this . activeIndex || 0 ) ;
270- // Hide global tabs in tiled mode
271- const tabsSection = document . querySelector ( '.tabs-section' ) ;
272- if ( tabsSection ) tabsSection . style . display = 'none' ;
273- const overflow = document . getElementById ( 'tabOverflowWrapper' ) ;
274- if ( overflow ) overflow . style . display = 'none' ;
285+ // Keep global tabs visible; they target the active pane (VS Code-style)
275286 this . persist ( ) ;
276287 }
277288 disable ( ) {
@@ -283,11 +294,7 @@ class PaneManager {
283294 const tw = tc . querySelector ( '.terminal-wrapper' ) ;
284295 if ( tw ) tw . style . display = '' ;
285296 }
286- // Show global tabs again
287- const tabsSection = document . querySelector ( '.tabs-section' ) ;
288- if ( tabsSection ) tabsSection . style . display = '' ;
289- const overflow = document . getElementById ( 'tabOverflowWrapper' ) ;
290- if ( overflow ) overflow . style . display = '' ;
297+ // Global tabs remain visible in both modes
291298 this . persist ( ) ;
292299 }
293300
@@ -739,7 +746,12 @@ class PaneManager {
739746 this . grid . querySelectorAll ( '.pane-add' ) . forEach ( btn => btn . addEventListener ( 'click' , ( e ) => {
740747 const idx = parseInt ( btn . dataset . index , 10 ) ;
741748 this . focusPane ( idx ) ;
742- this . app ?. showFolderBrowser ?. ( ) ;
749+ // Shift-click to create a new session directly; normal click opens session picker
750+ if ( e . shiftKey ) {
751+ this . app ?. showFolderBrowser ?. ( ) ;
752+ } else {
753+ this . openAddMenu ( idx , btn ) ;
754+ }
743755 e . stopPropagation ( ) ;
744756 } ) ) ;
745757 this . refreshSessionSelects ( ) ;
0 commit comments