Skip to content

fix: dispatch configurable page_up/page_down keybindings in all views - #51

Open
jones77 wants to merge 9 commits into
bahdotsh:mainfrom
jones77:main
Open

fix: dispatch configurable page_up/page_down keybindings in all views#51
jones77 wants to merge 9 commits into
bahdotsh:mainfrom
jones77:main

Conversation

@jones77

@jones77 jones77 commented Jul 27, 2026

Copy link
Copy Markdown

KeyAction::PageUp and KeyAction::PageDown were defined in the config system but never checked in any view's event handler, so user remappings (e.g. Space -> page_down) had zero effect.

Additionally, physical PageUp/PageDown keys in the detail view incorrectly required the Ctrl modifier.

  • Add key_matches() guards in Dashboard, FeedItems, FeedItemDetail, and Starred views so configurable bindings are dispatched
  • Split the combined Ctrl guard arm so physical PageUp/PageDown work without modifiers; Ctrl+u/Ctrl+d remain hardcoded for vim-style scrolling
  • Add tests for keybinding parsing, custom binding dispatch, physical key fix, and page navigation in Dashboard

KeyAction::PageUp and KeyAction::PageDown were defined in the config
system but never checked in any view's event handler, so user
remappings (e.g. Space -> page_down) had zero effect.

Additionally, physical PageUp/PageDown keys in the detail view
incorrectly required the Ctrl modifier.

- Add key_matches() guards in Dashboard, FeedItems, FeedItemDetail,
  and Starred views so configurable bindings are dispatched
- Split the combined Ctrl guard arm so physical PageUp/PageDown work
  without modifiers; Ctrl+u/Ctrl+d remain hardcoded for vim-style
  scrolling
- Add tests for keybinding parsing, custom binding dispatch, physical
  key fix, and page navigation in Dashboard
@jones77

jones77 commented Jul 27, 2026

Copy link
Copy Markdown
Author

hiya, I wrote this change using deepseek-v4-flash -- I'm not a Rust programmer

personal context: I use "space" to page down on the unix command line (eg like less, more, etc) so it's the first thing I change in an app because my muscle memory is too strong (eg I use "space" in Vim to page down too) so when I changed the config this bug popped up

And since I've recently been playing around with OpenCode and got a working fix almost immediately, lmk if there's any egregious slapdashery and I'll fix it

jones77 added 8 commits July 27, 2026 15:54
Render a proportional visual indicator on the right border of the
article content area that shows the user's current position within
the article. The indicator recolors a segment of the right border to
match colors.primary (cyan on dark theme, sage green on light),
with thumb height proportional to the visible-to-total content ratio.

The indicator is hidden when the article fits entirely in the
viewport. Minimum thumb height is 1 character.
Add a boolean config key under [ui] to control the scroll position
indicator in the article detail view. Defaults to true. Supports
get/set via 'feedr config' CLI.
Move 'h' from the Back default binding to the Home default binding,
so pressing 'h' navigates directly to the Dashboard from any view.
Back remains accessible via Esc and Backspace.

Add Home dispatch handlers in FeedList and Starred views so 'h'
works from every non-Dashboard view.
When pressing 'h' (Home) from the article detail view, look up the
current article's (feed_idx, item_idx) in the active dashboard items
and select it, so the user returns to the same article highlighted.
If the article is no longer listed (e.g. filtered out), fall back to
no selection.
…ed views

Dispatch configurable JumpTop/JumpBottom keybindings in Dashboard,
FeedItems, and Starred views for first/last item navigation.
Update help overlays for all three views.

Default bindings: 'g' = JumpTop, 'G' = JumpBottom (already existed).
…ome navigation

- Config: scroll_position defaults, back-compat, get/set
- Events: JumpTop/JumpBottom in Dashboard and FeedItems views
- Events: Home from FeedList, Starred, detail (with selection
  preserve and fallback)
- Fix stale comment about 'h' being Back
Restore 'h' to the Back action's default bindings (matching README
documentation). Home has no default letter binding — only the
physical Home key. The Home dispatch handlers (with selection
preserve from detail view) remain available for users who bind it
in config.
Replace the hardcoded KeyCode::Char('l') arm in the detail view
with a key_matches(KeyAction::ExtractLinks, &key) guard so user
remappings are respected (same fix as the PageDown/PageUp pattern).
Fix the page_down custom binding test which used Space (conflicted
with ToggleRead).
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