Skip to content

fix(picker): confirm selections with Enter in every key preset - #240

Merged
thisisgm merged 1 commit into
thisisgm:mainfrom
GreyforgeLabs:fix/picker-enter-confirmation
Oct 6, 2026
Merged

thisisgm merged 1 commit into
thisisgm:mainfrom
GreyforgeLabs:fix/picker-enter-confirmation

Conversation

@GreyforgeLabs

@GreyforgeLabs GreyforgeLabs commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

With the Mac keyboard preset, Return and keypad Enter resolve to Rename in the portal file chooser and never confirm a checked selection. Give unmodified Enter chooser activation semantics before consulting the listing keymap. KeypadModifier is allowed; other modified bindings retain their existing behavior.

The regression suite executes the shipped key handler, generated preset table and activation function under Qt's JavaScript engine. It covers all four presets, checked-file activation, folder navigation, missing rows, Space, Escape, modified Enter, and Mac Ctrl+Down. The file manager's Mac Enter-to-Rename binding stays intact.

Validation: the new tests reproduce 12 failures before the fix; ./tests/js.sh picker passes all 209 checks afterward. The complete ./tests/js.sh battery passes (5,690 main checks plus 4 Edmonton and 13 DST checks), as does tools/flea-file-budget. This exercises dispatch and activation, not native input delivery or an end-to-end portal round trip.

Fixes #225.

Review note: CodeRabbit's Biome integration could not parse the repository's Qt-specific .import directives. The Qt JavaScript runner above validates these files; Biome did not provide a lint result.

Summary by CodeRabbit

  • Bug Fixes
    • Pressing Return or Enter now opens the selected item, including when using keypad Enter, across the available key presets. Other modifiers continue to follow the configured key bindings.
    • Directory navigation, marking items with Space, modified-Enter shortcuts, and Escape cancellation continue to follow their respective key bindings.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 788bd917-0977-4aa2-b13c-4204e80b8d9b

📥 Commits

Reviewing files that changed from the base of the PR and between 58fc89f and 3423347.

📒 Files selected for processing (3)
  • tests/js/picker.js
  • tests/js/pickerkeys.js
  • ui/PickerList.qml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

PickerList now treats unmodified Return and Enter as open actions, ignoring the keypad modifier for this check. JavaScript tests exercise the shipped picker key handler across four presets and verify key-dispatch and activation behavior.

Changes

Picker key handling

Layer / File(s) Summary
Enter handling and regression coverage
ui/PickerList.qml, tests/js/pickerkeys.js, tests/js/picker.js
PickerList maps Return and Enter to the open action when modifiers are absent apart from the keypad modifier. The tests cover key handling for the default, vim, mac, and windows presets. The existing test runner invokes the new checks.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: thisisgm

Merge Risk: ⚪ Minimal · up to 34233

The picker change has no identified merge-blocking issue. Native key delivery and portal round trips remain untested.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change addresses [#225]. ui/PickerList.qml treats unmodified Return and Enter as open before the listing keymap. It permits keypad-only modifiers and preserves other modified bindings. The pic…
Out of Scope Changes check ✅ Passed The changed files are limited to picker key handling and its regression-test integration. The test additions directly verify the behavior requested by [#225]. No unrelated product behavior or unrelate…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: unmodified Enter now confirms picker selections across all key presets.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thisisgm
thisisgm merged commit 286837a into thisisgm:main Oct 6, 2026
1 check passed
thisisgm added a commit that referenced this pull request Oct 6, 2026
PRs #239, #240 and #236 with GM corrections and the #244 side-column watch, advloop APPROVED r6.
Natives on 416c9c18: colwatch, watch, click and picker exit 0; suite lists merged as a union.
@thisisgm

thisisgm commented Oct 6, 2026

Copy link
Copy Markdown
Owner

merged as authored; the #225 fix already confirmed Enter in every preset, so its override was folded into that one path and its tests landed (3423347, v0.3.8). Thanks @GreyforgeLabs! https://github.com/thisisgm/flea/releases/tag/v0.3.8

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.

Mac keyboard preset prevents Enter from confirming checked files in portal picker

2 participants