Preserve authored team-door animation transitions and lifecycle - #269
Merged
Conversation
Hona
force-pushed
the
work/tf2-team-door-animation
branch
3 times, most recently
from
September 1, 2026 02:25
d3b8d61 to
1cb34f7
Compare
Hona
marked this pull request as ready for review
September 1, 2026 02:25
There was a problem hiding this comment.
🟡 Changes recommended
Reopen initialization can leave disabled-door animations in an incorrect state because disabled-state tracking is not reset before tick-based updates.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR restores authored TF2 team-door animation playback semantics end-to-end (browser → web app scheduling → WASM pose requests → Rust studio-model blending), and adds dedicated profiling coverage for real-time door motion and lifecycle edge cases (disabled hover, focus enter/leave, reopen).
Changes:
- Introduce a Rust
SequenceTransitionerto preserve authored sequence cross-fades (fade timing, interruption ordering, parity reset behavior) and surface “transitioning” status back to the browser. - Add entity-model-panel pose-request wiring so team-door panels can transition independently from other model panels while keeping stable per-panel identities across visibility changes.
- Add targeted browser/web tests plus Playwright profiling configs and a new team-door profiling scenario.
File summaries
| File | Description |
|---|---|
| tools/playsrc/src/profile-runner.ts | Adds new team-door profile entries (enabled + disabled variants). |
| tools/playsrc/profile/team-door.profile.ts | New Playwright-driven profile capturing team-door motion, disabled lifecycle, focus navigation, and reopen behavior with CDP screencast artifacts. |
| playwright.team-door.config.ts | New headed profile config for team-door motion on jump_beef. |
| playwright.team-door-lifecycle.config.ts | New headed profile config for team-door lifecycle on pl_upward. |
| packages/formats/studio-model/rust/src/sequence_transition.rs | New authored sequence cross-fade/transition queue implementation for studio models. |
| packages/formats/studio-model/rust/src/presentation.rs | Adds Rust tests validating rotation-sign preservation, transition ordering, terminal-paint timing, and parity wrap behavior. |
| packages/formats/studio-model/rust/src/lib.rs | Exposes the new sequence_transition module publicly. |
| games/tf2/wasm/src/lib.rs | Adds entity-model-panel request kind and uses SequenceTransitioner to generate blend layers + “transitioning” output bit. |
| games/tf2/browser/tests/team-selection/runtime.test.ts | Extends team-selection runtime tests for reopen reset, disabled delayed hover, focus enter/leave, and stable panel IDs. |
| games/tf2/browser/tests/team-selection/pose-request.test.ts | New test verifying entity-panel pose-request encoding is distinct from other model panels. |
| games/tf2/browser/src/team-selection/runtime.ts | Adds stable panelId, animation/model revisions, disabled hover timing, and focus enter/leave sequencing. |
| games/tf2/browser/src/team-selection/model.ts | Adjusts focus/hover availability rules so disabled doors can still be hovered/focused while remaining unselectable. |
| games/tf2/browser/src/presentation.ts | Extends pose request encoding/decoding for entity-model-panel kind and adds “transitioning” timing flag to outputs. |
| apps/web/tf2/tests/team-model-playback.test.ts | New tests for terminal sampling, restart behavior, transition-owner completion, and template-pixel retention behavior. |
| apps/web/tf2/src/team-model-playback.ts | New scheduling + “template unchanged until deformation” tracking for team-door playback. |
| apps/web/tf2/src/runtime.ts | Integrates entity-model-panel requests for team doors, rejects superseded pose results, polls team rules while visible, and captures profiling frames. |
Review details
- Files reviewed: 16/16 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+290
to
+295
| if (state.visible && !previous.visible) { | ||
| this.#modelRevision += 1 | ||
| this.#entered.clear() | ||
| this.#hoverDeadlines.clear() | ||
| for (const name of MODEL_NAMES) this.#setAnimation(name, "idle_enabled") | ||
| } |
Hona
force-pushed
the
work/tf2-team-door-animation
branch
from
September 1, 2026 02:34
1cb34f7 to
95e86b3
Compare
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.
Changes
Verification
Integrated current main at
db3a0cac5c68f17a2ef5a3d35d901cf2adbf0f0afor the approved post-v0.1.0 draft closeout. Focused checks pass: 47 browser/UI/pose/skinning tests (330 assertions), 44 studio-model Rust tests, the TF2 WASM crate check, and 10 WASM model tests (3 configured unrelated cases ignored). After main's particle packet change, 26 shared packet/model/playback tests also passed (198 assertions). Required CI passed on final reviewed head95e86b33de901617cc6b45c7686cea95a65570fe. Team-state, playback/template retention and Rust transition-owner source files remain byte-identical to the verified motion candidate.The configured models author
hoveropenat 65 fps / 31 frames andhovercloseat 35 fps / 21 frames, with 0.2-second sequence fades. Their rotation direction is retained rather than inverted. Deterministic tests cover rotation sign through the bone hierarchy and entity transform, transition ordering, reset parity/wrap, terminal sampling, short-sequence fade completion, disabled hover and reopen.Actual headed RED, BLU and auto motion was captured, including interrupted RED enter/leave. Before: 9.034 seconds / 135 compositor captures. After: 9.136 seconds / 132 captures, with all three doors settling at cycle 1. Clips below use only reviewed application pixels; no desktop captures or generated media are committed.
Before:
before.mp4
After:
after.mp4
In the matched first five seconds, model-panel submissions were 163.0 → 164.8 per second; median submission cost 1.005 → 0.985 ms, p95 1.895 → 1.920 ms, maximum 11.955 → 4.415 ms. These are HUD submission timings, not gameplay or display FPS. Instrumented heap observations include retained diagnostic records and do not establish a retained-memory improvement.
Coverage follow-up
The approved closeout reuses the verified before/after motion rather than requiring a new Windows profiling campaign as a merge gate. Additional device coverage for disabled-door/focus/reopen/live-roster scenarios and retained-memory measurements remains a stated follow-up; deterministic lifecycle coverage passes. The previous pending remote preparation task and its unverified teardown are preserved, and no remote probe or relaunch was performed for this closeout. No production change, deployment or asset publication.