Skip to content

fix(keys): bind Ctrl+Plus as larger text - #302

Closed
root1945 wants to merge 1 commit into
thisisgm:mainfrom
root1945:fix/ctrl-text-size
Closed

root1945 wants to merge 1 commit into
thisisgm:mainfrom
root1945:fix/ctrl-text-size

Conversation

@root1945

@root1945 root1945 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Context

Listing text size in Flea is bound to Ctrl+Shift+Plus and Ctrl+Shift+Equal. On a US keyboard and on ABNT2, Ctrl++ without the extra Shift arrives as Ctrl+Equal. Qt also delivers Key_Plus with Control alone when Shift was already consumed to type "+". Neither press was in the map, so the key did nothing. The Shift chords stay.

What changed

keys.toml gained four [[ctrl]] rows. Plus and Equal call textSizeUp, Minus calls textSizeDown, and 0 calls textSizeReset. The issue 9 [[ctrlshift]] rows stayed where they were. ui/js/Keymap.js was regenerated by tools/flea-keymap-gen.

The sheet card still shows ctrl-shift-plus, ctrl-shift-minus, and ctrl-shift-0. ctrl-plus is 9 characters and ctrl-shift-plus is 15, and the two together exceed SHEET_CAP_BUDGET (16). The textSizeUp / textSizeDown pair gains a second spelling only when both fit. The action's first row remains the Shift chord, which is what KeyName and the settings panel announce, including the line that says Ctrl+Shift+0.

Image and PDF zoom stays on bare + and -. With a preview or a PDF open, Ctrl++ does nothing to zoom or to text size: the shared map answers only in the listing and on the rail. Bare 0 on an image stays zoomFit.

Ceilings, recounted with wc -l: tests/js/keymap.js 356 to 372, tests/js/focus.js 843 to 857, ui/js/Keymap.js 365 to 369. src/tui/keymap_tests.rs is 163, under the soft budget of 250. The bytes line in tests/startup-units.txt moved from 1673140 to 1674169.

How it was validated

Before the new map:

  • ./tests/js.sh keymap: 762 checks, 16 failed
  • ./tests/js.sh focus: 219 checks, 4 failed
  • cargo test --locked --bin flea ctrl_equal_grows_listing_text: 1 failed, left: "" right: "textSizeUp"

After:

  • ./tests/js.sh keymap: 762 checks, 0 failed
  • ./tests/js.sh focus: 219 checks, 0 failed
  • ./tests/js.sh previewkeys: 97 checks, 0 failed
  • ./tests/js.sh settings: 627 checks, 0 failed
  • ./tests/keymap-gen.sh: ok, ui/js/Keymap.js matches keys.toml
  • ./tools/flea-file-budget: exit 0
  • cargo test --locked --bin flea tui::keymap::tests: 9 passed, 0 failed

1674169 is the sum of wc -c over the units listed in tests/startup-units.txt, the same sum tests/startup-objects.sh takes. The windowed probe was not run.

Impacts and risks

Ctrl+1, Ctrl+2, and Ctrl+3 still switch view. Ctrl+D and Ctrl+U still page. Bare + and - are still zoom, and Focus still discards both while the listing has focus.

The local shortcut in ~/.config/hypr/bindings.lua and ~/.local/bin/flea-text-size is not in this PR. It covers the installed flea until this change is in a release.

Limitations and pending validation

Ctrl++ with Quick Look or a PDF open still has no effect. The card still leaves out ctrl-equal.

Both batteries now ran on commit a190cbf6, twice, on a box that carries the fixture root.

cargo test --locked --all-targets: 2542 passed, 0 failed, 1 ignored, exit 0, in 25.98s. The earlier report of a backend::thumbworker failure was the launching shell, not the tree: the probe asserts fds=[0, 1, 2, 3, 4], the shell held descriptor 3 open, and a run from a shell that closes every descriptor above 2 passes.

./tests/run-all.sh: 265 suites, 6 failed, exit 6. The earlier 204 were the missing fixture root: /home/flea-sandbox now exists and strace is installed, and tools/flea-media-fixture built the 2,000-file media fixture, after which thumbs, thumbs-exec and media pass. protocol failed once under the full battery and passes 4 times out of 4 since, with an output identical to the one upstream/main produces, so that one was noise.

The 6 that remain fail identically on upstream/main at 9b2486f8, in a separate worktree, so none of them is this diff:

  • permissions-skips: PERMSKIP DONE failures=1
  • ring-bounds: RINGBOUNDS DONE checks=5596 failed=12
  • rename-frame: RENAMEFRAME DONE checks=5419 failed=1
  • dialog-board: the run passed 120 checks by name, not 134
  • framegap: checks=4684 failed=0 controls=96, where the suite wants 4660
  • archive-threat: FAILURES above

framegap and dialog-board fail on a check count alone, with no failed check, on both trees.

The runner left 17 suites unstarted: display, uinput, root, node, live credentials, or a library that judges nothing. tests/startup-objects.sh is in the headless list and ran.

Summary by CodeRabbit

  • New Features
    • Added Ctrl+= and Ctrl++ shortcuts to increase listing text size, Ctrl+- to decrease it, and Ctrl+0 to reset it.
    • Kept these shortcuts separate from PDF zoom and preview image-fitting actions.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-13T03:58:18.145412Z f147d61 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4b545aeb-f4f5-4d94-b73e-8d4e6c450485
📥 Commits

Reviewing files that changed from the base of the PR and between 9b2486f and f147d61.

📒 Files selected for processing (8)
  • AGENTS.md
  • keys.toml
  • src/tui/keymap_tests.rs
  • tests/js/focus.js
  • tests/js/keymap.js
  • tests/startup-units.txt
  • tools/flea-file-budget
  • ui/js/Keymap.js

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

📝 Walkthrough

Control shortcuts now increase, decrease, or reset listing text size. Tests check these bindings and their interaction with zoom shortcuts in PDF and preview contexts.

Changes: Control text-size shortcuts

Layer / File(s) Summary
Add Control text-size bindings
keys.toml, ui/js/Keymap.js
The shared key table adds Control shortcuts to increase text size with Plus or Equal, decrease it with Minus, and reset it with 0.
Check key and context behavior
src/tui/keymap_tests.rs, tests/js/keymap.js, tests/js/focus.js, tools/flea-file-budget, tests/startup-units.txt, AGENTS.md
Tests check the text-size bindings, shifted key variants, and interactions with PDF and preview zoom shortcuts. Recorded file ceilings and startup-unit size are updated. Documentation records these changes.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: thisisgm

Merge Risk: ⚪ Minimal · up to f147d

The new shortcuts reach the existing text-size action, and the retained Ctrl+Shift+Plus binding covers a Shift-produced plus event. Layout-specific delivery of Ctrl-only Plus remains unverified, but no actionable merge-blocking risk is established.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (4 skipped: 4… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: adding a Ctrl+Plus shortcut for larger text. It is concise and related to the pull request objectives.
Full details: Docstring Coverage

Explanation

Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Ctrl++ without Shift is Ctrl+Equal on US and ABNT2, and Qt can
report Plus with Control alone. The table only bound the Ctrl+Shift
chords, so that press did nothing. The shift chords stay, and bare
plus and minus still zoom a preview.
@thisisgm

thisisgm commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Ctrl+Plus did not reach the larger-text action. The text size keys work with Ctrl alone as well as Ctrl+Shift (f218ed93f7, v0.4.0). Thanks @root1945! Release.

@thisisgm thisisgm closed this Nov 3, 2026
Jarmoco pushed a commit to Jarmoco/flea that referenced this pull request Nov 6, 2026
Brings the contributor head a190cbf onto the integration base; the
startup byte pin and three file budget ceilings are re-derived here.

Co-authored-by: root1945 <[email protected]>
Jarmoco pushed a commit to Jarmoco/flea that referenced this pull request Nov 6, 2026
Failed transfer paths are selected for retry once the folder is idle,
the Columns limit applies live, the update check polls from the
production window, and PR thisisgm#302 keys regenerate the Rust key table.
Jarmoco pushed a commit to Jarmoco/flea that referenced this pull request Nov 6, 2026
PR thisisgm#302 lands its keys.toml rows and TUI test only; the QML key table,
its JS tests and their pins stay as v0.3.12 shipped them.
Jarmoco pushed a commit to Jarmoco/flea that referenced this pull request Nov 6, 2026
ui/js/Keymap.js is generated from keys.toml, so the PR thisisgm#302 rows appear
there too; its JS tests and pins return with it.
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