From fdc2b5be2694a5a35f44d752e67970a29f7daea1 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 15 Nov 2026 16:31:13 +0100 Subject: [PATCH] Add a test for portrait mode with the main view split side by side If the main view is split side by side, the side panels get only a sixth of the space so that the two panes have more room. In portrait mode the side panels are above the main view, so this makes them lower rather than narrower, and the main view gains no width. Co-Authored-By: Claude Opus 5.5 --- .../helpers/window_arrangement_helper_test.go | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/pkg/gui/controllers/helpers/window_arrangement_helper_test.go b/pkg/gui/controllers/helpers/window_arrangement_helper_test.go index 2235d7fb4..7356d47e0 100644 --- a/pkg/gui/controllers/helpers/window_arrangement_helper_test.go +++ b/pkg/gui/controllers/helpers/window_arrangement_helper_test.go @@ -536,6 +536,66 @@ func TestGetWindowDimensions(t *testing.T) { B: information `, }, + { + name: "portrait mode, main view split side by side", + mutateArgs: func(args *WindowArrangementArgs) { + args.Width = 50 + args.Height = 20 + args.UserConfig.Gui.PortraitMode = "always" + args.UserConfig.Gui.MainPanelSplitMode = "horizontal" + args.MainPanes = types.BothMainPanes + }, + /* EXPECTED: + expected: ` + + ╭files───────────────────────────────────────────╮ + │ │ + ╰────────────────────────────────────────────────╯ + + + + ╭main───────────────────╮╭secondary──────────────╮ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + ╰───────────────────────╯╰───────────────────────╯ + A + A: statusSpacer1 + B: information + `, + ACTUAL: */ + expected: ` + + + + + ╭main───────────────────╮╭secondary──────────────╮ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + │ ││ │ + ╰───────────────────────╯╰───────────────────────╯ + A + A: statusSpacer1 + B: information + `, + }, { name: "portrait auto mode, disabled because width is too large", mutateArgs: func(args *WindowArrangementArgs) {