File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ export function EditorView() {
189189 < Icon icon = "lucide:chevron-right" width = { 14 } height = { 14 } />
190190 </ button >
191191 ) }
192- { ! treeVisible && isMobile && (
192+ { ! treeVisible && isMobile && hasFiles && (
193193 < button
194194 onClick = { ( ) => layout . show ( 'tree' ) }
195195 className = "absolute left-2 top-2 z-30 h-9 w-9 flex items-center justify-center rounded-xl bg-[var(--bg-elevated)] border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-subtle)] cursor-pointer"
@@ -199,13 +199,20 @@ export function EditorView() {
199199 </ button >
200200 ) }
201201
202- < MainEditorPane
203- hasFiles = { hasFiles }
204- isDesktop = { isDesktop }
205- isNarrow = { isNarrow }
206- branchName = { branchName }
207- onBrowse = { ( ) => layout . show ( 'tree' ) }
208- />
202+ { /* Mobile: show file explorer full-width when no files are open */ }
203+ { isMobile && ! hasFiles ? (
204+ < div className = "flex-1 overflow-y-auto" >
205+ < FileExplorer />
206+ </ div >
207+ ) : (
208+ < MainEditorPane
209+ hasFiles = { hasFiles }
210+ isDesktop = { isDesktop }
211+ isNarrow = { isNarrow }
212+ branchName = { branchName }
213+ onBrowse = { ( ) => layout . show ( 'tree' ) }
214+ />
215+ ) }
209216 </ div >
210217
211218 { chatPanelVisible && ! isMobile && ! chatFloating && (
You can’t perform that action at this time.
0 commit comments