Skip to content

fix: enlarge close button hit area to fix unreliable click#82

Merged
quiet-node merged 1 commit intomainfrom
worktree-hazy-pondering-island
Apr 12, 2026
Merged

fix: enlarge close button hit area to fix unreliable click#82
quiet-node merged 1 commit intomainfrom
worktree-hazy-pondering-island

Conversation

@quiet-node
Copy link
Copy Markdown
Owner

Summary

  • Close button was only 12x12px, causing near-misses to trigger startDragging() on the adjacent non-interactive area
  • Near-misses either moved the window (shifting the button away) or caused macOS to consume the subsequent click event
  • Fix: expand hit area to ~24x24px via p-1.5 -m-1.5 on the button wrapper; visual dot stays 12x12px via inner div; negative margin preserves flex spacing

Test Plan

  • Open Thuki overlay, send a message to enter chat mode
  • Click the red close dot once — overlay should hide reliably on first click
  • Verify visual appearance is unchanged (12px red dot, × icon on hover)
  • Verify hover scale and active press animations still work
  • bun run test passes (462 tests)
  • bun run validate-build passes with zero warnings/errors

The close button was 12x12px. Near-misses triggered startDragging()
on adjacent non-interactive area, either moving the window (shifting
the button) or causing macOS to consume the subsequent click event,
requiring 2-3 clicks to close.

Fix: expand hit area to ~24x24px via p-1.5 -m-1.5 on the button
wrapper. Visual dot stays 12x12px on an inner div. Negative margin
preserves flex spacing. Named Tailwind group (group/close-btn) drives
hover/active states on the inner div.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node quiet-node merged commit a829858 into main Apr 12, 2026
3 checks passed
@quiet-node quiet-node deleted the worktree-hazy-pondering-island branch April 12, 2026 20:20
This was referenced Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant