Browse Source

fix(tui): prevent home wordmark corruption in height-constrained terminals (#13069)

Kit Langton 2 weeks ago
parent
commit
93957da2c9
1 changed files with 10 additions and 5 deletions
  1. 10 5
      packages/opencode/src/cli/cmd/tui/routes/home.tsx

+ 10 - 5
packages/opencode/src/cli/cmd/tui/routes/home.tsx

@@ -93,10 +93,14 @@ export function Home() {
 
 
   return (
   return (
     <>
     <>
-      <box flexGrow={1} justifyContent="center" alignItems="center" paddingLeft={2} paddingRight={2} gap={1}>
-        <box height={3} />
-        <Logo />
-        <box width="100%" maxWidth={75} zIndex={1000} paddingTop={1}>
+      <box flexGrow={1} alignItems="center" paddingLeft={2} paddingRight={2}>
+        <box flexGrow={1} minHeight={0} />
+        <box height={4} minHeight={0} flexShrink={1} />
+        <box flexShrink={0}>
+          <Logo />
+        </box>
+        <box height={1} minHeight={0} flexShrink={1} />
+        <box width="100%" maxWidth={75} zIndex={1000} paddingTop={1} flexShrink={0}>
           <Prompt
           <Prompt
             ref={(r) => {
             ref={(r) => {
               prompt = r
               prompt = r
@@ -105,11 +109,12 @@ export function Home() {
             hint={Hint}
             hint={Hint}
           />
           />
         </box>
         </box>
-        <box height={3} width="100%" maxWidth={75} alignItems="center" paddingTop={2}>
+        <box height={4} minHeight={0} width="100%" maxWidth={75} alignItems="center" paddingTop={3} flexShrink={1}>
           <Show when={showTips()}>
           <Show when={showTips()}>
             <Tips />
             <Tips />
           </Show>
           </Show>
         </box>
         </box>
+        <box flexGrow={1} minHeight={0} />
         <Toast />
         <Toast />
       </box>
       </box>
       <box paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={2} flexDirection="row" flexShrink={0} gap={2}>
       <box paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={2} flexDirection="row" flexShrink={0} gap={2}>