Repository navigation
Cards and captions: late art dissolves once per frame across glass walks; gliding captions fade at both edges - #854
Merged
Merged
Conversation
…rival history The seated Collections tile popped its late fan in one frame (FRAMES-4 a1-coll). card_motion keys a card's art history by its occurrence in the frame; app::run::draw walks the page as discovery, then one replay per stale glass source, then the visible walk. The dissolve that starts when the art lands makes the header glass's source stale, so a replay appears on the landing frame and the visible draw moves from occurrence 1 to 2, which has no sample the frame before and shows whole. This test reproduces that frame structure with the real backdrop walk scopes and fails today: the visible walk shows 1.0 on the landing frame. No fix in this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Root cause (DEBUG-5, the seated Collections tile popping its late art in one frame): card_motion::History keyed a card's art phase by the draw's place in the whole frame, the n-th call to Scope::card for one (owner, asset). The application draws the page several times a frame (the discovery walk, one replay per stale glass source, then the visible walk), so the visible draw was occurrence 1 on a still frame and occurrence 2 on a frame with a replay. When late art lands, the dissolve it starts makes the header glass's source stale, so a replay starts on the landing frame; the visible draw moved to an occurrence the previous frame never had, read as art that was there from the first draw, and showed whole in one frame while the discovery and replay draws dissolved underneath. Fix, in the shared layer only: the first walk of a frame that draws a card advances its history (verdict, art phase, how much of the art shows) and stores the answer in the frame's sample; every later walk of that frame reuses it and records nothing, so discovery, replay and visible draw the same alpha. A card's occurrence now counts its draws within the current walk, so two copies inside one walk (outgoing and incoming surfaces) stay distinct, and a card only a later walk draws still advances its own history there. gfx::backdrop gains walk_serial(), the id of the walk that is drawing; it lives in the Walk, so it comes back when a nested walk's scope drops (the visible walk is entered first and resumed after discovery and the replays). No caller changes: resolve_card_art is the only Scope::card site. Module docs of card_motion, backdrop and the ui guide describe the rule. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ow's leading edge Adds the leading-band field to the draw census (inert for now) and the card_row tests for the leading dissolve: a within_tile caption gliding with dx < 0 must record a leading band over the window's first LABEL_EDGE_FADE px, one at rest or parked must draw crisp, and the band must grow in with the travel. The gliding and growing-in tests fail on this tree: nothing draws the band yet. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…eading edge too The shared text-fade program gains a leading horizontal band (u_tlead, alpha 0 to 1, gated like the other bands so an unused one costs a uniform compare), threaded through draw_text_fade and draw_text_fade_tracked (re-anchored per cluster like the trailing band). Painter::text_fade_edges takes both bands; text_fade is now its trailing-only form, so existing callers are unchanged. card_row's block_text hands a within_tile run its window and dissolves the part that has glided past the left edge over the window's first LABEL_EDGE_FADE px, the trailing rule untouched. A run at rest draws crisp, and the band grows with the travel (none at zero, the full 24 px from 24 px of travel on) so the first glide frame, a fraction of a pixel past the edge, does not dim the head of the line in one step; a line parked at the end of its travel, which sits on the edge to within an ulp, is also treated as at rest. The fade program keeps its link-failure fallback to plain text. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… and the two-sided fade Comment-only. The doc of late_art_dissolves_in_the_visible_walk_when_a_glass_source_replay_starts_with_it described each walk's draw as its own occurrence in card_motion's history, which stopped being true with e3d8283 (occurrences count within the current walk; later walks reuse the first walk's sample); it now tells the defect in the past tense and says what holds. History::observe_in documents the invariant its reuse path relies on (no walk draws a card both before and after a nested walk that also draws it). text.rs no longer says the horizontal fade relies on a sentinel width (the shader gates on `to > from` for every band), and tracks_panel.rs no longer says fs_text_fade has no y-axis twin (it has u_vfadeT/u_vfadeB and Painter::text_fade_v). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #843. A frame-by-frame pass over #843's merged head in the simulator found two defects; this fixes both in the shared layer, each from a regression test that failed first.
What changes
card_motionkeyed a card's art-arrival history by how many times the card had been drawn earlier in the frame, and a non-player frame draws the page up to three times (the backdrop discovery walk, one replay per stale glass source, then the visible walk). The dissolve that starts when art lands stales the header glass, so a replay starts on that very frame and pushes the visible draw to an occurrence with no history, which reads as "art already shown". Now a card's history advances once per frame, by the first walk that draws it, and every later walk of that frame reuses the answer (gfx::backdrop::walk_serial()identifies the walk). Every card grid outside the player draws through the oneresolve_card_artsite, so all of them are covered; no screen code changes.u_tlead, GLSL ES 1.00, gated like the existing bands), plumbed throughdraw_text_fadeand a newPainter::text_fade_edges;card_row::block_textapplies it while the run is past the window's left edge, growing with the travel up to 24 px (so the first glide frame does not dim the line's head) and none at rest. Existingtext_fade/text_fade_vcallers are unchanged.card_motion/backdropmodule docs,ui/src/CLAUDE.md, the shader header and two older comments that had gone false.Verification
make checkexit 0 (cargo — ok,python — ok,rest — ok,103 steps — all ok,harness — ok; 29test result:lines, all0 failed, 18233 passed);make test-hostsimok. 926 passed; 0 failed;make check-nodefclean;make check-replay3 fixtures / 6 replays,0 failures(no re-record).late_art_dissolves_in_the_visible_walk_when_a_glass_source_replay_starts_with_itfailed with the visible walk at 1.0 on the landing frame; the within_tile leading-band census tests failed (a gliding run dissolves in over the window's first edge-fade px). Both pass now.make checkloaded the Mac, and 9 (PASS) on the re-run; its drawn-frame totals over the graded windows are 349-355 on this build, Library: Collections redesign (header row, Collections and Recommended pages, Under posters, scroll chrome) #843's head and the build before it, so the work is unchanged (see follow-ups). 136 s every-frame Library scroll: 75 of 8940 frames >= 22 ms (0.84%), the same as Library: Collections redesign (header row, Collections and Recommended pages, Under posters, scroll chrome) #843's merged head (75 of 8943); 91% of them wait in GL draw (the back-buffer wait the earlier profiling traced to GPU work outside the app), 2 are poster-upload frames.observe_in. A doc-claim audit found one stale test doc and two older false comments; all fixed.Follow-ups (not in this PR)
fps:library-switchgrades the median of 1 s draw-rate windows over a 14-step switch cycle in which several steps are idle with the two-library mock; since Library: Collections redesign (header row, Collections and Recommended pages, Under posters, scroll chrome) #843 that median sits 1-3 above its floor of 8 on every build, so a phase shift of the steps against the windows flips the verdict. Grade it on drawn frames per cycle, or skip the idle steps.🤖 Generated with Claude Code