GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(app): no flash of home page on start · prashanthpai/opencode@04e60f2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/app/src/pages
    • layout.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/app/src/pages/layout.tsx‎

Copy file name to clipboardExpand all lines: packages/app/src/pages/layout.tsx
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,17 @@ export default function Layout(props: ParentProps) {
120120
})
121121
const editorRef = { current: undefined as HTMLInputElement | undefined }
122122

123+
const autoselecting = createMemo(() => {
124+
if (params.dir) return false
125+
if (initialDir) return false
126+
if (!autoselect()) return false
127+
if (!pageReady()) return true
128+
if (!layoutReady()) return true
129+
const list = layout.projects.list()
130+
if (list.length === 0) return false
131+
return true
132+
})
133+
123134
const editorOpen = (id: string) => editor.active === id
124135
const editorValue = () => editor.value
125136

@@ -2194,7 +2205,9 @@ export default function Layout(props: ParentProps) {
21942205
"xl:border-l xl:rounded-tl-sm": !layout.sidebar.opened(),
21952206
}}
21962207
>
2197-
{props.children}
2208+
<Show when={!autoselecting()} fallback={<div class="size-full" />}>
2209+
{props.children}
2210+
</Show>
21982211
</main>
21992212
</div>
22002213
<Toast.Region />

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.