@@ -39,17 +39,17 @@ <h2 id="project-name">Loading...</h2>
3939 < p class ="text-sm text-muted " id ="convo-count "> </ p >
4040 </ div >
4141
42- < div id =" loading " class =" loading " >
43- < div class ="spinner " > </ div >
44- < p > Loading conversations... </ p >
45- </ div >
46-
47- <!-- Content grid -- >
48- < div id =" content-grid " class =" workspace-grid " style =" display:none " >
49- < div class ="sidebar " id ="sidebar " > </ div >
50- < div class ="main-content " id =" main-content ">
51- < div class ="card " style =" padding:2rem;text-align:center " >
52- < p class =" text-muted " > No conversation selected </ p >
42+ <!-- Content grid — always in layout so column widths never collapse -- >
43+ < div id =" content-grid " class ="workspace-grid " >
44+ < div class =" sidebar " id =" sidebar " >
45+ < div class =" sidebar-loading loading-center " >
46+ < div class =" spinner " style =" width:1.25rem;height:1.25rem;border-width:2px " > </ div >
47+ </ div >
48+ </ div >
49+ < div class ="main-content is-loading " id ="main-content " >
50+ < div class ="loading-center ">
51+ < div class ="spinner " > </ div >
52+ < p > Loading conversations… </ p >
5353 </ div >
5454 </ div >
5555 </ div >
@@ -78,8 +78,6 @@ <h2 id="project-name">Loading...</h2>
7878 document . getElementById ( 'project-hash' ) . textContent = WORKSPACE_ID ;
7979 }
8080
81- document . getElementById ( 'loading' ) . style . display = 'none' ;
82- document . getElementById ( 'content-grid' ) . style . display = 'grid' ;
8381 document . getElementById ( 'convo-count' ) . textContent = `${ allTabs . length } conversations` ;
8482
8583 renderSidebar ( ) ;
@@ -92,7 +90,11 @@ <h2 id="project-name">Loading...</h2>
9290 selectTab ( allTabs [ 0 ] . id ) ;
9391 }
9492 } catch ( e ) {
95- document . getElementById ( 'loading' ) . innerHTML = '<p class="text-danger">Failed to load workspace.</p>' ;
93+ const main = document . getElementById ( 'main-content' ) ;
94+ main . classList . remove ( 'is-loading' ) ;
95+ main . innerHTML =
96+ '<div class="card" style="padding:2rem;text-align:center"><p class="text-danger">Failed to load workspace.</p></div>' ;
97+ document . getElementById ( 'sidebar' ) . innerHTML = '' ;
9698 }
9799} ) ;
98100
@@ -143,8 +145,10 @@ <h2 id="project-name">Loading...</h2>
143145 selectedTab = summary ;
144146 tabCache [ id ] = summary ;
145147 } else {
146- document . getElementById ( 'main-content' ) . innerHTML =
147- '<div class="card" style="padding:2rem;text-align:center"><div class="spinner"></div><p>Loading conversation…</p></div>' ;
148+ const main = document . getElementById ( 'main-content' ) ;
149+ main . classList . add ( 'is-loading' ) ;
150+ main . innerHTML =
151+ '<div class="loading-center" style="min-height:60vh"><div class="spinner"></div><p>Loading conversation…</p></div>' ;
148152 try {
149153 const res = await fetch ( `/api/workspaces/${ WORKSPACE_ID } /tabs/${ id } ` ) ;
150154 if ( ! res . ok ) throw new Error ( `HTTP ${ res . status } ` ) ;
@@ -154,7 +158,9 @@ <h2 id="project-name">Loading...</h2>
154158 tabCache [ id ] = data . tab ;
155159 selectedTab = data . tab ;
156160 } catch ( e ) {
157- document . getElementById ( 'main-content' ) . innerHTML =
161+ const main = document . getElementById ( 'main-content' ) ;
162+ main . classList . remove ( 'is-loading' ) ;
163+ main . innerHTML =
158164 `<div class="card" style="padding:2rem;text-align:center"><p class="text-danger">Failed to load conversation: ${ escapeHtml ( e . message ) } </p></div>` ;
159165 return ;
160166 }
@@ -170,6 +176,7 @@ <h2 id="project-name">Loading...</h2>
170176
171177function renderChat ( tab ) {
172178 const main = document . getElementById ( 'main-content' ) ;
179+ main . classList . remove ( 'is-loading' ) ;
173180 const bubbles = ( tab . bubbles || [ ] ) . filter ( b => b . text && b . text . trim ( ) ) ;
174181
175182 let html = `<div class="card" style="padding:1.5rem">
0 commit comments