Skip to content

Magic Remote: scroll by the screen's edges and glide rows sideways; a hover never moves the page - #986

Merged
GLinnik21 merged 7 commits into
plxnative:mainfrom
danzig666:claude/pointer-edge-scroll
Oct 30, 2026
Merged

GLinnik21 merged 7 commits into
plxnative:mainfrom
danzig666:claude/pointer-edge-scroll

Conversation

@danzig666

Copy link
Copy Markdown
Contributor

Summary

Magic Remote scrolling, reworked: the pointer scrolls by resting at an edge of the screen, the way LG's own lists scroll, instead of by hovering cards. At the top or bottom edge the page glides; at the left or right edge the row under the pointer glides sideways. Hovering a card now only moves focus; a click scrolls the page to what it clicked; the arrow keys still move whole rows.

Please try it on a set before deciding. This is my personal preference: I have been using it on my LG C2 and C3 and like it much more this way. But it changes how the pointer feels on every card page. If it is not the direction you want for the app, no problem at all: close this, or take whichever parts you find useful.

Why

Today the pointer scrolls a page only by parking focus on a card (Hover::Focus) and letting the page reveal it. A page rests its focused row or section at the top of the screen, which makes the two directions very different:

  • Down works, roughly. The row below the focused one stands almost whole, so hovering it scrolls on. But each hover moves the page by up to a screenful, which feels jumpy.
  • Up almost never works. Above the focused row at most a sliver of the previous row is left to point at.
    • In the Library the grid's stops are clipped at the content top, so with the chrome tucked about 56 px of the hidden row stay hoverable.
    • On Detail I measured with a probe that 0 to 80 px of the section above stay hoverable. Often nothing is left but the focused section's heading and air.
  • Home's top: the first shelf peeks under the hero, but nothing there can be clicked until the page is scrolled. The shelves register no stops while the hero is up.
  • Sideways: a row wider than the screen only moves when focus walks along it, so with the pointer the posters past the edge are hard to reach.

What it does

  • Edge glide (app::input::EdgeScroll):
    • A pointer resting in the top or bottom 80 px band glides the page (120 px started it too readily while the pointer was only on its way to the top or bottom row).
    • After a 150 ms dwell, every frame hands the page a fractional InputKind::Wheel. It eases in over 350 ms to at most 2.6 rows/s, faster nearer the edge.
    • It glides over cards too. Only the top bar's buttons stop it (the profile chip and the tabs, elem >= STRIP_BASE); it goes on once the pointer is off them.
    • While it runs, the pointer's moves inside the band are not hover, so cards sliding under the pointer do not take focus.
    • It times its own frames, because it runs in playback_tick, before the loop has worked out Frame::dt.
  • Screen::glides (default false): the pages that move themselves by a wheel are offered the glide.
    • The Library, Recommended and Search already scrolled by a wheel.
    • Home now does too, out of the hero into the shelves and back.
    • So does Detail, in ROW_PITCH rows up to the last section's reveal.
    • So does every cards::Stack page that reveals by tick (Watchlist, Collection, Person).
    • Home and a Stack page stay where the wheel put them until focus moves by a key (HomeScreen::free, Stack::wheeled).
  • A hover moves focus, never the page. A FocusMoved by the pointer reveals nothing on Home, the Library, Detail and the Stack pages. A click brings the page to what it clicked, the way a key does. Keys are unchanged.
  • Detail: a landing no longer pulls a page the pointer moved back to the focused section. That covers a season's episodes, a shelf's next page as the glide reaches it, the cast and the ratings. Without this a series page jumped around under the glide. A landing now only clamps the scroll to the page's new end (DetailScreen::free, max_scroll).
  • Sideways glide (InputKind::Pan { dx, x, y }, second commit):
    • A pointer resting in the left or right 120 px band glides the row under it sideways. It uses the same dwell and ease-in, faster nearer the edge, up to 1000 px/s. The top and bottom bands keep the corners.
    • The page moves whatever scrolls sideways at (x, y). That is a shelf on Home, Recommended and every cards::Stack page (Search, Person, Collection). On Detail it is Related, a collection, Extras, Cast and the episode strip.
    • CardRow::glide / Shelf::glide move the row directly and leave it free. It stops steering to its focused card until a key moves along it or a click lands on one of its cards (CardRow::unfree). The episode strip has its own episode_free.
    • Unlike the vertical glide it does not hold the pointer's hover. The side bands hold controls of their own (the Library's alphabet rail, Detail's Play), and a glided row no longer follows its focus, so a card the pointer rests on cannot pull it back.
    • Pan joins the input canon (tag 8), the replay vocabulary (pan, ALPHABET.json) and the owned-input codec.
  • Search (third commit): Search's wheel moved by a 60 px table row (table::ROW_H), so the edge glide, which hands the page a fraction of a row every frame, crawled at about a seventh of every other page's speed. A fractional step (the glide) now moves by ROW_PITCH, the unit the other pages glide by. A notch of the remote's wheel (a whole step) still moves one table row.
  • Home, the shelf peeking under the hero:
    • Its cards are now stops. They are OnlyIfFocused, so a hover takes no focus from the hero.
    • A click on a card the screen shows only part of scrolls the page to it and does not open it (reveal_press, dropped at its commit).
    • Once the card is in view, a click opens it as before.
    • The same applies to a shelf cut by the bottom edge.

HomeScreen::free / reveal_press, DetailScreen::free / episode_free and CardRow::free are hand-offs to the next Tick and are not in the canon. What they decide, the scroll targets, is. So SCREEN_SHAPES_PIN is unchanged.

Testing

  • make check on the first commit, at the committed tree, in a Linux container. On the second commit I reran clippy, the plx_machine, plx_ui, plx_screens and application suites, the hostsim edge tests and check-nodef, all with the same results. On the third, the Search tests (87) and check-nodef; on the fourth (the 80 px bands), the edge_scroll and hostsim edge tests and check-nodef. After merging main of 2026-10-24 into the branch: plx_ui 1388, plx_screens 1707, the hostsim edge tests and check-nodef. The replay-fixture harness (tests/test_harness.py, which reads ALPHABET.json) passes.
    • clippy, the Python gates (check-python) and every crate this touches pass, and the application's default and hostsim passes apart from the tests below.
    • The only failures are tests that need a write to be refused or a network connect to hang, which a root container cannot provide. They fail identically on untouched main there: route::decision::prefs_* (14), plex::session::persistence_tests (19), telemetry::persistence (2), app::adapters::session / session_erase_retry_tests (3) and curlio::abort_during_connect….
    • Unrelated to this PR, a heads-up: on main (591362f) home_retention_tests::home_worker_results_cross_the_addressed_dispatcher_ingest_once fails whenever it runs alone (in a full run it depends on test order). Its tap panics on any result that is not a HubsResult, and since Session cache: peek is a pure read; the session owner refills it #973 Home's first frame also delivers an AppMsg::Session (the session owner's cache refill). Letting the tap skip other owners' results (let AppMsg::HubsResult(result) = msg else { return };) fixes it; this branch leaves that test as main has it.
  • New regression tests. The two real-loop tests, the Library and Detail hover tests, the Home peek test and the Detail landing test were each observed failing against the old behaviour:
    • app::run::lifecycle_regression_tests::a_pointer_resting_at_the_top_edge_sends_the_page_a_glide_through_the_real_loop (hostsim) drives a real SDL motion and frames begun as the loop begins them (dt 0).
    • …::the_edge_glide_stops_on_a_bar_button_and_goes_on_off_it_through_the_real_loop (hostsim) runs with Home's bar presented in the hit map.
    • app::input::edge_scroll_tests::* cover the dwell, the ease-in, speed by depth, the bar, the band and the hidden pointer.
    • home::tests::the_edge_glide_moves_home_a_hover_does_not_and_a_click_rests_its_card and a_card_peeking_under_the_hero_is_clickable_and_its_click_brings_it_into_view.
    • library::tests::a_hover_moves_no_grid_and_a_click_brings_it_to_its_card.
    • detail::tests::a_wheel_glides_the_detail_page_within_its_range, a_hover_moves_no_detail_page_and_a_click_brings_it_to_its_element and a_landing_does_not_pull_a_glided_detail_page_back.
    • cards::tests::stack::a_wheel_glides_the_page_and_it_stays_until_focus_moves.
    • Search: search::tests::the_edge_glide_moves_the_results_by_poster_rows_and_a_wheel_notch_by_a_table_row.
    • Sideways: card_row::tests::a_glided_row_stays_where_the_glide_put_it_until_it_is_released, cards::tests::stack::a_sideways_glide_moves_the_shelf_under_the_pointer, home::tests::the_sideways_glide_moves_the_shelf_under_the_pointer_and_a_click_brings_it_back, detail::tests::the_sideways_glide_moves_the_related_shelf_and_the_episode_strip, edge_scroll_tests::the_pointer_resting_at_a_side_edge_pans_the_row_under_it and lifecycle_regression_tests::a_pointer_resting_at_the_right_edge_sends_a_sideways_glide_through_the_real_loop (hostsim).
  • Two existing tests that pinned the old "a hover scrolls to the shelf" contract were updated to the new one:
    • home_chrome_route_tests::a_pointer_user_reaches_the_shelves_either_side_of_a_resting_shelf: a hover takes focus without moving the page, and a click brings the shelf to the rest line.
    • home_retention_tests::hero_edge_keys_page_without_seating_a_pager_or_leaving_the_control: its "only the hero's controls are stops" check now excludes the peeking shelf's cards.
  • On a television: used on an LG C2 and an LG C3 (webOS 22/23) for the Home, Library, Collections and series and movie Detail pages, from a fork build.
  • Not run:
    • make check-replay (macOS simulator). The committed recordings that hover cards may now grade differently, since a hover no longer scrolls. Those would need re-recording if this is taken.
    • The make ARM cross-build. I don't have the webOS NDK here; the fork's CI cross-build of the same code is green.
    • The FPS scenes.

Generated by Claude Code

With the Magic Remote the pointer scrolled a page only by parking focus on a card (Hover::Focus)
and letting the page reveal it. A page rests its focused row or section at the TOP of the screen,
so the next row below stands nearly whole and the pointer near the bottom scrolled on, but above
it at most a sliver of the previous row is left: the Library clips its grid's stops at the content
top (about 56 px of the hidden row stay hoverable with the chrome tucked), and Detail leaves 0..80
px of the section above, often nothing but the focused section's heading. Near the top the
pointer almost never scrolled. And every hover that did scroll moved the page by up to a screenful.

The pointer now scrolls the way LG's own lists do:

- Edge glide (app::input::EdgeScroll). A pointer resting in the top or bottom 120 px band glides
  the page: after 150 ms every frame hands the page a fractional InputKind::Wheel, easing in over
  350 ms to up to 2.6 rows/s, faster nearer the edge. It glides over cards too; only the top bar's
  buttons (the strip, elem >= STRIP_BASE, run::pointer_on_bar) stop it, and it goes on once the
  pointer is off them. While it runs, the pointer's moves in the band are not hover. It times its
  own frames: it runs in playback_tick, before the loop has worked out Frame::dt.
- Screen::glides: the pages that move themselves by a wheel are offered the glide. Library,
  Recommended and Search already did; Home (out of the hero into the shelves and back), Detail
  (ROW_PITCH rows up to the last section's reveal) and every cards::Stack page that reveals by tick
  (Watchlist, Collection, Person) now do. A Stack page and Home stay where the wheel put them
  until focus moves by a key (Stack::wheeled, HomeScreen::free).
- A hover moves focus, never the page: a FocusMoved by the pointer reveals nothing on Home, the
  Library, Detail and the Stack pages. A click brings the page to what it clicked, the way a key
  does. Keys still move by whole rows.
- Detail: a landing (a season's episodes, a shelf's next page as the glide reaches it, the cast,
  the ratings) no longer pulls a page the pointer moved back to the focused section; it only
  clamps to the page's new end (DetailScreen::free, max_scroll).
- Home: the shelf peeking under the hero registers its stops (OnlyIfFocused, so a hover takes no
  focus from the hero). A click on a card the screen shows only part of scrolls the page to it
  and does not open it (reveal_press, dropped at commit); once in view a click opens it.

HomeScreen::free/reveal_press and DetailScreen::free are hand-offs to the next Tick and are not
in the canon (what they decide, the scroll targets, is), so the screen-shape pin is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
…nd right edges

A pointer resting in the left or right 120 px band (outside the top and bottom
bands, which keep the corners) glides the row under it sideways: after the same
150 ms dwell and 350 ms ease-in as the vertical glide, every frame sends a new
InputKind::Pan { dx, x, y } (up to 1000 px/s, faster nearer the edge), and the
page moves whatever scrolls sideways at (x, y):

- CardRow::glide / Shelf::glide move the row directly and leave it 'free': it
  stops steering to its focused cell until a key's move along it or a click on
  one of its cards (CardRow::unfree). Not in the canon (what it decides,
  scroll_x, is).
- Home (the shelf under the pointer), Recommended, every cards::Stack page
  (Search, Person, Collection) and Detail (Related, Collection, Extras, Cast,
  and the episode strip, with its own episode_free) answer Pan.

Unlike the vertical glide it does not hold the pointer's hover: the side bands
hold controls of their own (the Library's alphabet rail, Detail's Play), and a
glided row no longer follows its focus, so a card the pointer comes to rest on
cannot pull it back. Pan joins the input canon (tag 8), the replay vocabulary
('pan', ALPHABET.json) and the owned-input codec.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
Search scrolls by the 60 px table row on a wheel step, and the edge glide hands
the page a fraction of a row every frame, so on Search the results crawled at
about a seventh of every other page's speed. A fractional step (the glide) now
moves by ROW_PITCH, the unit the other pages glide by; a notch of the remote's
wheel (a whole step) still moves one table row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
…20 px

At 120 px the vertical glide started too readily while the pointer was only on
its way to the top or bottom row (tried on an LG C2 and C3). The
sideways bands (EDGE_SIDE_BAND) keep 120 px.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
danzig666 pushed a commit to danzig666/plx-native that referenced this pull request Oct 24, 2026
A session with the fork attached cannot attach GLinnik21/plx-native (same
repository name) and its GitHub access refuses upstream, which reads as
'impossible'. It is not: start a helper session on upstream with the
create_session tool and let it open the PR from the fork's branch, as PR plxnative#986
was opened.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
…-scroll

# Conflicts:
#	rust-modules/screens/src/detail/tests.rs
@GLinnik21
GLinnik21 enabled auto-merge (squash) October 30, 2026 01:21
@GLinnik21

Copy link
Copy Markdown
Collaborator

Thanks

run.rs: the three edge-glide regression tests of plxnative#986 and main's new tests both
land in lifecycle_regression_tests; every other hunk of plxnative#986 merged cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 36e5ffe into plxnative:main Oct 30, 2026
13 checks passed
danzig666 pushed a commit to danzig666/plx-native that referenced this pull request Nov 4, 2026
Upstream rebuilt the player HUD as packages (appkit/player_hud.rs is now
a directory), merged this fork's plxnative#986 (edge scrolling) and plxnative#1085 (H.264
recovery-point keyframes), and added its own automatic intro/credits
skipping (plxnative#1227). Conflicts take upstream's side throughout; the fork's
own Skip intros / Skip credits settings, notices and strings are dropped
in favour of plxnative#1227. The fork's player additions (clock, media line,
subtitle-tone dim, BACK-hide jitter gate) and its fork.18 pointer changes
are re-applied on top in their own commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
danzig666 pushed a commit to danzig666/plx-native that referenced this pull request Nov 4, 2026
…lick, even hero glide)

The fork.18 change (63c7ed1) onto the merged plxnative#986: a click opens what it
clicked where it stands on every edge-glide page and in a glided row,
Home's wheel moves through the hero dive at ROW_PITCH pixels a row
(`wheel_page`), and a pointer's move across Home's hero/grid door no
longer leaves the hero control as what OK acts on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KBgjCe8KH6Nnp3K51Fybrv
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.

3 participants