Repository navigation
Releases
Releases · jsdrews/tui-builder
v0.10.0
v0.9.0
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.3.0-rc.3
Retarget the action menu on right-click Step 6. Right-click a row and the menu opens against that row, even when another pane had focus — one gesture, not click-then-press-`a`. The shell already did its half: it forwards the press to the screen and then opens the menu, so the pane sees the click before the menu asks what to offer. The half missing here was that our focus index moved a frame too late. A component's focus.RequestMsg comes back as a command, and the shell forwards-and-opens within one Update — so Actions() ran against the pane that was focused BEFORE the click, and offered its verbs. Precisely the question the gesture was asking, answered about the wrong row. Focus now applies during the press. It cannot be read off the components: a list sets its own focus flag on press while a table only emits the request, so "who thinks it is focused" is not a reliable answer. The request itself is, so the fan-out's commands are run there and their messages re-wrapped — each command still runs exactly once and every message is still delivered, only one Update earlier, inside the press that caused it. Left clicks take the same path. They had a frame to spare and were already fine, but one rule beats two. TestRightClickRetargetsTheMenu drives it through the app: a verb scoped to the right pane reads "focus detail" while the left pane has focus, and is live immediately after a right-press lands on the right pane. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RWJePc1jaEzLWSyGFe78ZP