From 6d24174dc6f9bef0dfd3e00d80b1d18fc125dfd5 Mon Sep 17 00:00:00 2001 From: altair823 Date: Mon, 4 May 2026 16:37:16 +0000 Subject: [PATCH] =?UTF-8?q?feat(kebab-tui):=20p9-fb-24=20task=201=20?= =?UTF-8?q?=E2=80=94=20pager=20module=20+=20PAGE=5FSTEP=20constant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/kebab-tui/src/lib.rs | 1 + crates/kebab-tui/src/pager.rs | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 crates/kebab-tui/src/pager.rs diff --git a/crates/kebab-tui/src/lib.rs b/crates/kebab-tui/src/lib.rs index 52932f6..a6991fa 100644 --- a/crates/kebab-tui/src/lib.rs +++ b/crates/kebab-tui/src/lib.rs @@ -22,6 +22,7 @@ mod input; mod inspect; mod library; mod markdown; +mod pager; mod run; mod search; mod terminal; diff --git a/crates/kebab-tui/src/pager.rs b/crates/kebab-tui/src/pager.rs new file mode 100644 index 0000000..bdeabb1 --- /dev/null +++ b/crates/kebab-tui/src/pager.rs @@ -0,0 +1,11 @@ +//! p9-fb-24: page-step constant shared by Ask + Inspect PgUp/PgDn. +//! +//! Fixed `10` rows per page (independent of viewport height). The +//! design doc considered viewport-aware paging but deliberately +//! deferred it — Inspect already shipped with `+/-10`, so unifying +//! on the same constant is the smallest path that closes the +//! "Ask has no PgUp/PgDn" feedback. A future viewport-aware upgrade +//! lives behind this single edit point. + +/// Rows scrolled per `PgUp` / `PgDn` keystroke. +pub(crate) const PAGE_STEP: u16 = 10;