fix: leave a row of slack below the results panel (#30)

Move the results panel height into a tested resultsPanelOuter helper so the view stays one row short of the overflow:hidden body, matching Downloads and Seeding. Fixes #21.
This commit is contained in:
Anand Hegde
2026-07-01 02:36:28 -04:00
committed by GitHub
parent 17a06fa37a
commit 1b53ef3094
3 changed files with 45 additions and 3 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import { Panel } from "./Panel";
import { Rule } from "./Rule";
import { useConcurrentSearch } from "../hooks/useConcurrentSearch";
import { getSource, SOURCES } from "../../sources/registry";
import { wrapStep, windowStart } from "../move";
import { wrapStep, windowStart, resultsPanelOuter } from "../move";
import { sortResults, nextSort, sortLabel, sortArrow, type Sort, type SortField } from "../sort";
import { COLOR, GUTTER, ICON, SOURCE_STYLE } from "../theme";
import { cleanText, formatBytes, formatRelative, truncate } from "../../util/format";
@@ -155,7 +155,7 @@ export function Results() {
const clamped = Math.min(cursor, Math.max(0, results.length - 1));
const searchH = 3;
const panelOuter = Math.max(5, listRows - searchH - 1);
const panelOuter = resultsPanelOuter(listRows, searchH);
const listHeight = Math.max(3, panelOuter - 4);
const pageJump = Math.max(1, listHeight - 1);