fix(tui): tighten StatusModeSingle spacer threshold to cols<71
Previously the spacer kicked in at cols<68 (top of Logs border was covered at 68-70) then was widened to cols<72 (which added a gap at 71 where Yoga's flex-column placed the panel correctly without help). cols<71 is the precise boundary: 68-70 need the 1-row compensation spacer, 71+ does not. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -778,8 +778,8 @@ function StatusModeSingle({
|
||||
// entries than fit. Chrome accounting (chrome=6 base, +1 if narrow spacer):
|
||||
// header(1) + statusbar(1) +
|
||||
// panel border top(1) + panel title(1) + panel border bottom(1) +
|
||||
// filter row(1) = 6, plus 1 if cols<68 spacer is present.
|
||||
const logsAvailableRows = Math.max(1, rows - (cols < 68 ? 7 : 6));
|
||||
// filter row(1) = 6, plus 1 if cols<72 spacer is present.
|
||||
const logsAvailableRows = Math.max(1, rows - (cols < 71 ? 7 : 6));
|
||||
tuiDebug("StatusModeSingle", { cols, rows, logsAvailableRows, focused });
|
||||
|
||||
const activePanel = () => {
|
||||
@@ -792,12 +792,12 @@ function StatusModeSingle({
|
||||
}
|
||||
};
|
||||
|
||||
// Below cols=68 the layout shifts up by 1 (Yoga edge case at very narrow
|
||||
// Below cols=72 the layout shifts up by 1 (Yoga edge case at narrow
|
||||
// widths) and the panel's top line ends up under the header overlay. A
|
||||
// 1-row spacer compensates ONLY for those widths. From 68 onwards the
|
||||
// 1-row spacer compensates ONLY for those widths. From 72 onwards the
|
||||
// panel sits in the right place naturally and the spacer is just dead
|
||||
// space the user explicitly asked us to remove.
|
||||
const needsSpacer = cols < 68;
|
||||
// space.
|
||||
const needsSpacer = cols < 71;
|
||||
return (
|
||||
<Box flexDirection="column" flexGrow={1}>
|
||||
{needsSpacer && <Box height={1} flexShrink={0} />}
|
||||
|
||||
Reference in New Issue
Block a user