Skip to content

fix(gui): make preferences a full-screen page instead of a click-through modal - #34

Open
williamdes wants to merge 2 commits into
mainfrom
claude/preferences-window-modal-issues-2abm0t
Open

fix(gui): make preferences a full-screen page instead of a click-through modal#34
williamdes wants to merge 2 commits into
mainfrom
claude/preferences-window-modal-issues-2abm0t

Conversation

@williamdes

Copy link
Copy Markdown
Member

The preferences dialog was an absolute overlay stacked on top of the live
terminal and tab bar. gpui dispatches mouse events to every element under
the cursor unless propagation is stopped, and the overlay's no-op
on_mouse_down handlers stopped nothing, so:

  • clicks inside the dialog fell through to the tab bar underneath and
    selected/dragged tabs (the "prefs moves my current tab" bug);
  • every click also hit the terminal's click-to-focus handler, which
    yanked focus out of the text inputs; the per-frame focus fallback then
    redirected typing into the API-address field (with its addr charset
    filter), so text never appeared in the box the user clicked.

Render preferences as a full-screen page that replaces the terminal area
and tab bar in the element tree instead. With nothing underneath, there
is nothing to mis-click or steal focus, so the inputs behave. The page
gets a fixed header, a scrollable settings column, and a pinned
Cancel/Save footer; Cancel and Save now return focus to the terminal.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Si1bi3EYUYZJxuQ7f59E3i

@williamdes
williamdes force-pushed the claude/preferences-window-modal-issues-2abm0t branch from d416c09 to b0da678 Compare July 27, 2026 11:04
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 239 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.33%. Comparing base (4564ec2) to head (3fbba6b).

Files with missing lines Patch % Lines
src/app.rs 0.00% 239 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
- Coverage   51.33%   51.33%   -0.01%     
==========================================
  Files          65       65              
  Lines       26081    26068      -13     
==========================================
- Hits        13389    13382       -7     
+ Misses      12692    12686       -6     
Flag Coverage Δ
rust 51.33% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

claude added 2 commits August 21, 2026 10:34
…ugh modal

The preferences dialog was an absolute overlay stacked on top of the live
terminal and tab bar. gpui dispatches mouse events to every element under
the cursor unless propagation is stopped, and the overlay's no-op
on_mouse_down handlers stopped nothing, so:

- clicks inside the dialog fell through to the tab bar underneath and
  selected/dragged tabs (the "prefs moves my current tab" bug);
- every click also hit the terminal's click-to-focus handler, which
  yanked focus out of the text inputs; the per-frame focus fallback then
  redirected typing into the API-address field (with its addr charset
  filter), so text never appeared in the box the user clicked.

Render preferences as a full-screen page that replaces the terminal area
and tab bar in the element tree instead. With nothing underneath, there
is nothing to mis-click or steal focus, so the inputs behave. The page
gets a fixed header, a scrollable settings column, and a pinned
Cancel/Save footer; Cancel and Save now return focus to the terminal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Si1bi3EYUYZJxuQ7f59E3i
…rtcuts

Two fall-through paths an adversarial review of the fullscreen-prefs
change turned up:

- The hotkey picker's dismiss overlay swallowed no propagation, so with
  the prefs page now filling the screen every dismiss click also fired
  the control underneath (Save, Cancel, a theme row, a hotkey remove).
  The picker box's no-op click handler had the inverse problem: clicks
  inside the box fell through to the overlay and dismissed the picker.
  Both now stop propagation.

- Root-level tab shortcuts (Ctrl+Shift+T, Alt+Tab) still fired while
  the preferences screen was up, mutating tabs invisibly behind it —
  the keyboard variant of the click-through bug. Early-return while
  preferences is open.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Si1bi3EYUYZJxuQ7f59E3i
@williamdes
williamdes force-pushed the claude/preferences-window-modal-issues-2abm0t branch from b0da678 to 3fbba6b Compare August 21, 2026 08:35
williamdes added a commit that referenced this pull request Aug 21, 2026
The hotkey-picker dismiss overlay swallowed no propagation, so a dismiss
click also fired whatever control sat underneath; the picker box's no-op
handler had the inverse problem — clicks inside it fell through to the
overlay and closed the picker. Both now cx.stop_propagation().

Cherry-picked from PR #34's audit follow-ups (the picker hunks only); the
prefs-page keyboard-shortcut guard stays with that PR since it's specific
to the full-screen preferences rework.

Verified: clippy --all-targets (GUI), cargo fmt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants