pollen v1.7.4
A single fix for a regression v1.7.1 introduced when it
added Ctrl+P as the Settings overlay binding.
The Settings overlay deliberately makes it hard to close
by accident while you are editing a field: q types into
the field and Esc only exits the editor back to
navigation, so closing always takes two deliberate steps.
Ctrl+P bypassed all of that. handleKey intercepts the
Settings binding while the overlay is open and calls
Close() before the keystroke ever reaches the panel, and
that interception never checked whether a field editor was
active. So pressing Ctrl+P (or the Ctrl+, alias) mid-edit
closed the whole overlay and silently discarded whatever
you had typed.
This is the mirror image of the v1.7.2 fix. That release
guarded the overlay-OPEN path so Ctrl+P wouldn't steal
bubbles' textarea LinePrevious / textinput PrevSuggestion
bindings while you were typing in the main UI. The
overlay-CLOSE path needed the same guard and didn't have
it. The close shortcut now consults a new
SettingsPanel.IsEditing(): while a field editor is active,
Ctrl+P falls through to the editor (a no-op for the plain
textinput) and the edit is preserved; from navigation mode
Ctrl+P still toggles the overlay closed as before.
The bug survived because the app's key-routing layer had
no key-driven tests at all. v1.7.4 adds the first one
(internal/app/update_settings_keys_test.go), which fails
on the pre-fix routing and passes after.
Fixed:
- Ctrl+P (and the Ctrl+, alias) no longer closes the
Settings overlay while a field editor is active; it
falls through to the editor and the in-progress edit is
preserved. From navigation mode it still toggles the
overlay closed - Added SettingsPanel.IsEditing() so the app routing can
honor the panel's existing "no accidental close while
editing" protection
Notes:
- v1.x SemVer-frozen surface unchanged. The Settings
binding's reach is narrowed (no longer fires while a
field editor is active), not extended - First app-layer test that drives Model.Update with key
messages; the routing layer had no key-driven coverage
before, which is why the regression slipped through - The applySettings httpx package-globals data race
flagged in v1.7.2 / v1.7.3 is unchanged and its deferred
fix plan still stands
See CHANGELOG.md for the full list.