From 53e52db94a94612f87430280a9cfb9a451129a09 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Sun, 2 Aug 2026 02:29:05 -0400 Subject: [PATCH] Chat: fix F1/F2 both landing on the tail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DEFAULT_LANE's F1/F2 dispatch the plain "home"/"end" actions. On the chat screen those are already claimed by the compose line's cursor (Home/End move within the message you're typing, tested behavior) — handle() has no case for them, so both fell through to the same "clear the pick, stick to the tail" edit fallthrough, making F1 and F2 indistinguishable. ChatScreen.fkey_lane now overrides F1/F2 to dispatch ctrl_home/ ctrl_end instead — the actions that actually walk the transcript — so "Top" jumps to the first message and "End" returns to the tail, matching their labels. Co-Authored-By: Claude Sonnet 5 --- meshterm/ui/chat.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshterm/ui/chat.py b/meshterm/ui/chat.py index dd03c88..5652df1 100644 --- a/meshterm/ui/chat.py +++ b/meshterm/ui/chat.py @@ -79,10 +79,19 @@ class ChatScreen(Screen): @property def fkey_lane(self): - """The PicoCalc lane: message paths and delivery retry on F3/F8.""" + """The PicoCalc lane: jump-to-ends on F1/F2, message paths/retry on F3/F8. + + The default lane's F1/F2 dispatch the plain ``home``/``end`` actions, but here + those are already claimed by the compose line's cursor (see :meth:`handle`) — so + without an override, both keys land on the same "clear the pick, stick to the + tail" fallthrough and read as if either one scrolls to the bottom. F1/F2 dispatch + ``ctrl_home``/``ctrl_end`` instead, the actions that actually walk the transcript. + """ from .tui.fkeys import DEFAULT_LANE, FPair lane = list(DEFAULT_LANE) + lane[0] = FPair("Top", "ctrl_home") + lane[1] = FPair("End", "ctrl_end") lane[2] = FPair("Paths", "paths", "Retry", "retry") return lane