Chat: fix F1/F2 both landing on the tail

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 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Sonnet 5 committed 2026-08-02 02:29:05 -04:00
1 parent 2d2652005b
commit 53e52db94a
1 file changed
+10 -1
+10 -1
View File
@@ -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