diff options
| author | Adam <[email protected]> | 2026-01-20 06:10:35 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-20 06:10:53 -0600 |
| commit | 04e60f2b3dcdd96890b72f04f1c08230186cdcd8 (patch) | |
| tree | 8b49661bdbd36d0361a0d80f0667b18b8f4850ab /packages | |
| parent | 23d71e125c622e52e9f2734b47dfc2b2e1253fa4 (diff) | |
| download | opencode-04e60f2b3dcdd96890b72f04f1c08230186cdcd8.tar.gz opencode-04e60f2b3dcdd96890b72f04f1c08230186cdcd8.zip | |
fix(app): no flash of home page on start
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/app/src/pages/layout.tsx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx index 816793753..5f5954c90 100644 --- a/packages/app/src/pages/layout.tsx +++ b/packages/app/src/pages/layout.tsx @@ -120,6 +120,17 @@ export default function Layout(props: ParentProps) { }) const editorRef = { current: undefined as HTMLInputElement | undefined } + const autoselecting = createMemo(() => { + if (params.dir) return false + if (initialDir) return false + if (!autoselect()) return false + if (!pageReady()) return true + if (!layoutReady()) return true + const list = layout.projects.list() + if (list.length === 0) return false + return true + }) + const editorOpen = (id: string) => editor.active === id const editorValue = () => editor.value @@ -2194,7 +2205,9 @@ export default function Layout(props: ParentProps) { "xl:border-l xl:rounded-tl-sm": !layout.sidebar.opened(), }} > - {props.children} + <Show when={!autoselecting()} fallback={<div class="size-full" />}> + {props.children} + </Show> </main> </div> <Toast.Region /> |
