From 2a191b10893d017b36b52c4e921b04f7573685a7 Mon Sep 17 00:00:00 2001 From: Callum Alpass Date: Tue, 3 Nov 2026 21:53:39 +1100 Subject: [PATCH] Hide the drawer while the message editor is zoomed --- src/ui/App.tsx | 4 ++-- test/app/pane.test.tsx | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ui/App.tsx b/src/ui/App.tsx index 4852e46..7e594c4 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -1539,7 +1539,7 @@ export function App(props: { readonly session: T3Session; readonly config: T3tui {drawer ? ( <> - {drawerInPlace ? null : ( + {drawerInPlace || zoom === "message" ? null : ( )} - + {terminalPane} diff --git a/test/app/pane.test.tsx b/test/app/pane.test.tsx index 62e452d..cb2e538 100644 --- a/test/app/pane.test.tsx +++ b/test/app/pane.test.tsx @@ -334,7 +334,7 @@ describe("terminal drawer", () => { test("ctrl+g writes the message in $EDITOR in the composer's place, and what's saved comes back", async () => { // This one waits a moment, overwrites the file and exits. - setEditor("sleep 0.5; printf 'from the editor' >"); + setEditor("sleep 0.8; printf 'from the editor' >"); const app = await open(); await app.press("i"); await app.type("draft"); @@ -344,6 +344,11 @@ describe("terminal drawer", () => { expect(app.frame()).not.toContain("draft"); expect(app.find("Message · save and quit").x).toBeLessThan(composer.x); expect(app.hints()).toBe(keysOn("message")); + // Zoomed, it takes the conversation's place too. + const top = app.find("Message · save and quit").y; + await prefix(app, "z"); + expect(app.find("Message · save and quit").y).toBeLessThan(top); + expect(app.frame()).not.toContain("Do the thing"); await waitFor(() => !app.frame().includes("Message · save and quit")); expect(app.frame()).not.toContain("Message · save and quit"); expect(app.frame()).toContain("from the editor");