From 3aca9e5fa5909ba3fef3e6908eeb01a898316744 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Wed, 24 Dec 2025 05:22:21 -0600
Subject: fix(desktop): conditionally show review pane toggle

---
 packages/app/src/components/header.tsx | 60 ++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 29 deletions(-)

(limited to 'packages/app/src/components/header.tsx')

diff --git a/packages/app/src/components/header.tsx b/packages/app/src/components/header.tsx
index ec7cdfa25..3eae0e05d 100644
--- a/packages/app/src/components/header.tsx
+++ b/packages/app/src/components/header.tsx
@@ -109,35 +109,37 @@ export function Header(props: {
                   </Show>
                 </div>
                 <div class="flex items-center gap-4">
-                  <Tooltip
-                    class="hidden md:block shrink-0"
-                    value={
-                      <div class="flex items-center gap-2">
-                        <span>Toggle review</span>
-                        <span class="text-icon-base text-12-medium">{command.keybind("review.toggle")}</span>
-                      </div>
-                    }
-                  >
-                    <Button variant="ghost" class="group/review-toggle size-6 p-0" onClick={layout.review.toggle}>
-                      <div class="relative flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0">
-                        <Icon
-                          size="small"
-                          name={layout.review.opened() ? "layout-right-full" : "layout-right"}
-                          class="group-hover/review-toggle:hidden"
-                        />
-                        <Icon
-                          size="small"
-                          name="layout-right-partial"
-                          class="hidden group-hover/review-toggle:inline-block"
-                        />
-                        <Icon
-                          size="small"
-                          name={layout.review.opened() ? "layout-right" : "layout-right-full"}
-                          class="hidden group-active/review-toggle:inline-block"
-                        />
-                      </div>
-                    </Button>
-                  </Tooltip>
+                  <Show when={currentSession()?.summary?.files}>
+                    <Tooltip
+                      class="hidden md:block shrink-0"
+                      value={
+                        <div class="flex items-center gap-2">
+                          <span>Toggle review</span>
+                          <span class="text-icon-base text-12-medium">{command.keybind("review.toggle")}</span>
+                        </div>
+                      }
+                    >
+                      <Button variant="ghost" class="group/review-toggle size-6 p-0" onClick={layout.review.toggle}>
+                        <div class="relative flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0">
+                          <Icon
+                            name={layout.review.opened() ? "layout-right" : "layout-left"}
+                            size="small"
+                            class="group-hover/review-toggle:hidden"
+                          />
+                          <Icon
+                            name={layout.review.opened() ? "layout-right-partial" : "layout-left-partial"}
+                            size="small"
+                            class="hidden group-hover/review-toggle:inline-block"
+                          />
+                          <Icon
+                            name={layout.review.opened() ? "layout-right-full" : "layout-left-full"}
+                            size="small"
+                            class="hidden group-active/review-toggle:inline-block"
+                          />
+                        </div>
+                      </Button>
+                    </Tooltip>
+                  </Show>
                   <Tooltip
                     class="hidden md:block shrink-0"
                     value={
-- 
cgit v1.2.3

