Play the strongest Match on its own champion and report every followed game (#89)
CI / core (pull_request) Successful in 1m40s
CI / core (pull_request) Successful in 1m40s
From the review of PR #99: - Of several followed Matches waiting, the strongest plays on its own champion (tick, card and splash), the most recent among equals. The comet no longer flies to one champion's tick with another's splash. - A game the client gave no id for, or seen before any Match gave the platform, is reported when the sync stores it: the client's id when it has one, else the newest Match newer than every one stored. A first import without that id stays history. - What a Match brought comes from the Challenge's own Marks, with and without it, instead of a second set of rules in SQL; `fetch_and_store` is back to fetching and storing. `MatchEnd::Completed` takes the glossary's word, and its variants are documented again. - Only the count of the banner's title rolls in, from 10 px below, as in the prototype; the « Dernière Partie » line still fades in. - The Windows setting is checked where a Match is queued, and the tests now go through the follower round and the statistics; a test checks that the end state is what a reload shows. - The Match's state is one `MatchPlayback`, ended in one place; the durations are named; `MarkFill`, `Changing` and `RevealFrame` replace bare tuples; a splash that cannot be read ends its reveal. - `follow_client_with` takes the report itself, without a forwarding function. docs/performance.md describes the Match animation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
126912fd09
commit
44c2d10b3b
14 files changed
+711
-325
No files matched your search
@@ -49,6 +49,7 @@ The identity (ring, banner, animations; `docs/interface.md`) follows the same ru
|
||||
- **The foundation** (`crates/app/src/motion.rs`, with the page saying when « Défi » is visible, #86) decides whether the app animates, and when. The Windows setting reaches GPUI's `App::reduce_motion`: gpui-base reads it at start, and the window's own `WM_SETTINGCHANGE` for `SPI_SETCLIENTAREAANIMATION` reads it again, with no polling. When it is off, a tab switch shows its end state at once, and an animation asked for is not played; turning it off ends a transition running and drops the animation waiting, as soon as Windows says so (`AnimationSetting`). An animation asked for while « Défi » is not visible (window minimised or hidden in the notification area, « Statistiques », « Paramètres » or a champ select in front) waits in `Deferred`: only the strongest is kept, it plays once when « Défi » shows again, and a champ select that starts abandons it.
|
||||
- **Tab transitions lay a veil, never move the screen.** A cached view's cache key holds its bounds and its opacity, so fading or sliding the screen itself would draw the grid, the ring and the charts again at every frame and build the cards again. The veil, of the page's background, covers the screen leaving (130 ms) then lifts off the one arriving (280 ms). Each frame is asked for by the transition itself (`on_next_frame`), and none once the veil is lifted. A window hidden during a transition ends it at once. The champion table is a cached view too, laid out by the space the page gives it, so the veil's frames do not draw it. The screen arriving is prepared (its rows copied and sorted, its cards built) only when it is shown, so a switch undone under the veil prepares nothing. Structural tests check that a transition draws neither the grid, the ring nor the table again, builds no card, recomputes no statistics, and asks for no frame at rest. The charts arriving play gpui-kit's own short entry, as after any switch.
|
||||
- **A card hovered is drawn over its grid, which stays cached** (#88). The cards of a grid never change on hover or focus: the page draws the card under the pointer or the keyboard (and those settling back) lifted over the grid, in a deferred layer painted after the page, from where the grid last placed it (`card_lift.rs`). The grid records its visible cards' bounds and indices while it lays out its rows, so drawing them over it reads no layout, searches no card and copies none: the lifted card is the grid's card as it is at each frame. The layer covers each lifted card's place with the page's background, and in the hand lays the veil on the other cards. Each frame is asked for by the page's render while a card moves (`request_animation_frame`), and none once they are still. A wheel drops the grid's lifted cards at once, even at either end of the list, and so does a grid no longer shown (the home under a champ select, the hand after it) or a card filtered out, so no frame is asked for a card no longer drawn; a tab switch or « Paramètres » drops them all, and a hidden window or the setting turned off shows their end state at once. Structural tests check that hovering a card, through its whole animation, draws none of the grid, builds no card and computes no statistics, and that no frame is asked for at rest. A zoomed illustration overflows the card and is cut square by GPUI's rectangular clip: a frame of the page's background rounds its corners again, which nicks the gold glow by a few pixels at each corner.
|
||||
- **The end of a followed Match is drawn over the cached ring, the cached grid and the banner** (#89). The comet, the flaring tick and the bouncing crown are a function of the page's render in a layer over the ring (`ring::match_layer`): the ring is not drawn again, and these few shapes are built at each frame only while the animation runs, unlike the ring's own, built once per set of ticks. The card that changes is drawn over its grid like a lifted card at rest (`card_lift.rs`). The banner's counter rolls in painted over its place in the title, and the splash of the champion validé settles in with the banner's own decode. The animation is fixed when it starts (tick, duration) and reads no statistics at each frame; each frame is asked for by the page's render while it runs, and none after. Structural tests check that it draws neither the grid nor the ring again, builds no card, recomputes no statistics and asks for no frame at rest.
|
||||
- **Two splashes decoded at most**: the one shown and the one replacing it. All splashes are downloaded in the background, at low priority, after the card portraits, and kept on disk.
|
||||
- During champ select, the Anvil grid is cached at the height of its card rows. The capture replay checks that a splash fade builds no cards and that traversing the hand and « Autres champions » keeps at most two decoded splashes. The latest hovered card takes over when the current fade finishes.
|
||||
- **The ring is a cached view**, laid out from its style alone. A structural test guards it: hovering a card, scrolling the grid or an animation on another part does not render the ring; only a change of what it shows (the champions' state, their order, the selection) or its own animation does. Its gain is checked at the next release benchmark.
|
||||
Reference in new issue
Block a user