Summary
In the Add Project file picker, the visible Add as project and Cancel buttons do not respond to mouse clicks at their rendered positions for some longer paths/window layouts.
Folder navigation works, and the selected directory is a valid Git repository. The action buttons work only when clicking a terminal row above their visible location (or by using a keyboard/manual registry workaround).
Environment
- amux:
0.0.19 (Homebrew formula andyrewlee/amux/amux)
- macOS:
26.5.1 (25F80)
- tmux:
3.7b
- theme:
catppuccin
Steps to reproduce
- Run
amux.
- Open Add Project.
- Navigate to a repository with a sufficiently long path, for example:
/Users/ivanshumkov/Projects/shumkov/umi-store-theme
- Click the visible Add as project button.
- Click the visible Cancel button.
Expected behavior
Each button responds when clicked at its rendered position.
Actual behavior
Neither visible button responds. The dialog stays open and no dialog result is logged for those clicks. Clicking approximately one terminal row above the rendered button can activate it.
The current path visibly wraps in the dialog, which appears to shift the displayed buttons down without shifting their mouse hit regions.
Likely cause
This looks like a mismatch between rendered height and hit-test coordinates in the file picker:
renderLines() records button hit regions using logical slice indexes and sets lastContentHeight = len(lines).
dialogBounds() and Update(tea.MouseClickMsg) use that logical height/index for hit testing.
- Lipgloss can render/wrap a logical line to more than one terminal row at the final dialog width.
- The visible controls then move down, but
buttonHits retain their pre-wrap Y positions.
The screenshot reproduction showed the current path split across two terminal rows immediately above the input/list.
The existing button tests derive click coordinates from buttonHits and dialogBounds(lastContentHeight), so they verify the internal coordinate model but may not catch a mismatch with the final rendered output. A regression test using the final rendered row positions at a narrow width/long path may expose it.
Relevant files:
internal/ui/common/filepicker_render.go
internal/ui/common/filepicker.go
internal/ui/common/filepicker_button_test.go
Summary
In the Add Project file picker, the visible Add as project and Cancel buttons do not respond to mouse clicks at their rendered positions for some longer paths/window layouts.
Folder navigation works, and the selected directory is a valid Git repository. The action buttons work only when clicking a terminal row above their visible location (or by using a keyboard/manual registry workaround).
Environment
0.0.19(Homebrew formulaandyrewlee/amux/amux)26.5.1(25F80)3.7bcatppuccinSteps to reproduce
amux./Users/ivanshumkov/Projects/shumkov/umi-store-themeExpected behavior
Each button responds when clicked at its rendered position.
Actual behavior
Neither visible button responds. The dialog stays open and no dialog result is logged for those clicks. Clicking approximately one terminal row above the rendered button can activate it.
The current path visibly wraps in the dialog, which appears to shift the displayed buttons down without shifting their mouse hit regions.
Likely cause
This looks like a mismatch between rendered height and hit-test coordinates in the file picker:
renderLines()records button hit regions using logical slice indexes and setslastContentHeight = len(lines).dialogBounds()andUpdate(tea.MouseClickMsg)use that logical height/index for hit testing.buttonHitsretain their pre-wrapYpositions.The screenshot reproduction showed the current path split across two terminal rows immediately above the input/list.
The existing button tests derive click coordinates from
buttonHitsanddialogBounds(lastContentHeight), so they verify the internal coordinate model but may not catch a mismatch with the final rendered output. A regression test using the final rendered row positions at a narrow width/long path may expose it.Relevant files:
internal/ui/common/filepicker_render.gointernal/ui/common/filepicker.gointernal/ui/common/filepicker_button_test.go