Skip to content

Library: BACK from a Detail brings the focused card back lifted, so the row below stays put - #958

Merged
GLinnik21 merged 5 commits into
plxnative:mainfrom
tiper:fix/library-back-lift
Oct 29, 2026
Merged

GLinnik21 merged 5 commits into
plxnative:mainfrom
tiper:fix/library-back-lift

Conversation

@tiper

@tiper tiper commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

The stack lets the Library go while a Detail is over it, and BACK rebuilds the page from its memory and enters it. Since #843 that entry held the grid at rest under the dip's image: the focused card dropped its lift and shut its caption band, then grew both again, so the row under it moved 40 px and eased back (a bounce). A page restored from its memory is a return: the grid is not held, and the card comes back lifted with its caption open, as it was left. A page entered from Home still grows its first card in.

…he row below stays put

The stack lets the Library go while a Detail is over it, and BACK rebuilds the
page from its memory and enters it. Since plxnative#843 that entry held the grid at rest
under the dip's image: the focused card dropped its lift and shut its caption
band, then grew both again, so the row under it moved 40 px and eased back (a
bounce). A page restored from its memory is a return: the grid is not held, and
the card comes back lifted with its caption open, as it was left. A page entered
from Home still grows its first card in.

The grid also still slept from the dip that held the image over the Detail, so
the page's first frame (the one the dip captures as its image) drew the card at
rest and it selected when the image went. The restore wakes the grid, and the
page stays a return until the image has been held and let go.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@tiper
tiper force-pushed the fix/library-back-lift branch from d2b69c6 to 9743fae Compare October 24, 2026 20:48
GLinnik21 and others added 4 commits October 29, 2026 02:50
…s::Grid

The review of plxnative#958 found the screen-level `restored` / `restored_held` flags
wrong in three ways: a Restored that no image followed (a menu dismissed over
the Library) left `restored` set for good, so the next dissolve played the seat's
lift under the fade; a key pressed under the BACK dip's image played its pop and
band motion under the image and held it to the 600 ms bound; and the rule lived in
the screen while the shared Grid kept its own contrary one.

The rule is now the Grid's. A grid fed `Enter(Restored)` is RETURNING: it is not
put to sleep by `dormant`, so the seat the engine restored is drawn lifted with its
caption band open from the first frame, and the row under the band does not move.
The return ends on the first tick the owner reports awake or at the first
deliberate move (which is then slept through, as an entry's), so it leaves no mark.
A page ENTERED under an image is slept through as before; the Recommended page
(shelves) keeps its own rule. The Library only feeds the grid `Enter`.

Tests: Grid tier-1 cases for a covered and a fresh grid, a return with no image and
a move under the image; the Library's BACK cases now include the image release, a
key under the image and the next dissolve after a menu or a BACK. The page-image
loop four tests had copied is `DipImage` / `ImageHeld` in bridge_test_support.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6ZnFeGA7CweKvne8tknaa
…dings whole

An independent review of the return rule found three ways a returning grid still
played motion under the dip's image: Up from the first row (or any move that names
no card of the grid) left the caption band closing on its spring, because
`bands.focus(None, false)` returns early once the focus is already None, so the
sleeping grid could not shut it and the image was held to its bound (44 frames in
the World rig); a BACK that walks to the header is announced as a restore, which
did not end the return, so the adopted pop let go on its own spring; and a landing
that arrived while the page was covered was played, not adopted whole.

The return now also ends when focus lands anywhere but a card of the grid, the
sleeping grid shuts its bands with the new `GridBands::shut` (idempotent, drops a
closing slot), and a landing is adopted whole whenever the owner reports dormant.
Tests: Grid tier-1 cases for each, a World case for Up and BACK under the image
(it holds the image for 44 frames without the fix), and a Library-level case for a
rebuilt page in cards_harness. Stale prose the first commit missed is corrected
(Shelf::dormant, settle_band, GridPart's docs); the push-capture test's cleanup
uses ImageHeld.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6ZnFeGA7CweKvne8tknaa
…left stale

`settle_band` opens a returning grid's band before the first tick (the Library's
relayout runs on Enter(Restored) while the grid still reads the covering dip's
dormant flag) and leaves a sleeping grid's shut; a tier-1 case now fails if the gate
goes back to `dormant`. The `dormant` and `slept` field docs, the pop_in comment and
the Shelf test's "as a grid does" said a dormant grid always lifts nothing and always
regrows, which a returning grid no longer does.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6ZnFeGA7CweKvne8tknaa
@GLinnik21
GLinnik21 merged commit 2fca28f into plxnative:main Oct 29, 2026
13 checks passed
GLinnik21 added a commit that referenced this pull request Oct 30, 2026
…#1159)

* Shelf: a page that returns keeps its seat lifted under the BACK image

BACK from a Detail onto the Recommended page put the restored seat to
rest under the route dip's held image and grew it again once the image
went, so the shelf below it dropped by the caption band's height and came
back: the bounce #958 fixed for the Library's grid.

The cause is the same. The page reports its shelves dormant under the
image, and a dormant shelf resets its lift, band and heading and discards
the restored focus. The Grid already carried a `returning` state set by
`Enter(Restored)`; the Shelf gets the same: the shelf the focus is on keeps
its seat (card, caption band, heading lift) whole, the others are still put
to rest, because stepping a shelf mid-ease under the image would hold it
past its dissolve. The band and heading are settled on the restoring
`FocusMoved` itself, so the frame the dip captures is already laid out
with them (`CardRow::settle_band`). The return ends on the first awake
tick, at a deliberate move, and when focus lands off the shelf's cards;
landings are adopted whole while dormant.

`RecommendedScreen::step_event` now hands `Enter` to its shelves. Home's
shelves are dormant only while its hero is up, never for the image, so a
dived Home already returned lifted; a World test pins that against this
change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6ZnFeGA7CweKvne8tknaa

* Shelf: a returning seat settles its scroll glide too, so nothing plays under the BACK image

The seat's shelf is stepped under the held image, so a scroll glide the push
froze half played (an OK pressed before it ended) finished there: layout
motion, which holds the image past its dissolve and then jumps the row
sideways. CardRow::settle_band becomes settle_seat and jumps the scroll to the
target that brings the card into view before it opens the band and raises the
heading, on the restoring FocusMoved. The tier-1 test returns a shelf whose
glide was frozen at 1137 of 3842 px and fails without the jump.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6ZnFeGA7CweKvne8tknaa

* Shelf: pin the return's remaining rules with tests that fail when each is removed

A review of the two shelf-return commits found three behavioural lines no test
would miss: the return ending when focus leaves the shelf's cards by a restore,
the stale wake-from-rest flag cleared by Enter(Restored), and warm-ahead
continuing for a returning dormant seat. Each now has a test that goes red
when its line is removed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6ZnFeGA7CweKvne8tknaa

---------

Co-authored-by: Claude <[email protected]>
@tiper
tiper deleted the fix/library-back-lift branch November 2, 2026 23:06
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