DRAW SEA async-transition FT: reload fallback for non-felt-save sky confirm — TDD
Running the corequisite channels FTs surfaced a real gap the cascade introduced: a sky confirm that did NOT come through the felt's own save (a direct POST, or another browser of the same seat) left _lastChartData null, so _onSkyConfirmed's _activateSavedState returned early → no transition at all (the old code reloaded). - _sky_overlay.html: _onSkyConfirmed now reloads when _lastChartData is absent (the pre-cascade behaviour, preserved for non-felt-save confirm paths); the felt-save path still eases to DRAW SEA via the cascade (no reload). - test_game_room_select_sea.py: the async-transition assertion updated for the phase-stack — CAST SKY is now present-but-`--out` (hidden in the shared grid cell), not removed from the DOM, so assert the `hex-phase-btn--out` class on CAST SKY + its ABSENCE on DRAW SEA rather than `find_elements(...) == []`. Corequisite FTs run green: select_sea async-transition (3) + deal (9) channels; dash my_sky async-save + aperture-snap (3) — the shared body.sky-saved apparatus is untouched by the room-scoped felt SCSS. select_sky FTs already green. The sig SRG7 reveal FT is unaffected (it waits for the SIG_SELECT hidden CAST SKY, which that branch still renders; it never clicks, so the _reload change isn't reached). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -542,14 +542,19 @@
|
||||
}
|
||||
|
||||
// ── Sky confirmed (self-targeted WS) ──────────────────────────────────────
|
||||
// The acting gamer's own SAVE .then() already revealed the wheel; the WS
|
||||
// event just re-asserts the saved state (idempotent). No reload — the gamer
|
||||
// lingers on the saved wheel; the gear NVM does the navigation back to the
|
||||
// hex (now DRAW SEA). A second browser of the same seat with no captured
|
||||
// chart no-ops here (rare) and reconciles on its next load.
|
||||
|
||||
// Two cases:
|
||||
// • This browser captured the chart (the gamer saved via the felt) → the
|
||||
// save .then() already ran the cascade; this WS re-fire is idempotent
|
||||
// (re-asserts the saved state, no second cascade, no reload).
|
||||
// • No captured chart (a direct POST confirm, or another browser of the same
|
||||
// seat) → the cascade can't run, so reload to land on the server-rendered
|
||||
// DRAW SEA hex (the pre-cascade behaviour, preserved for these paths).
|
||||
function _onSkyConfirmed() {
|
||||
_activateSavedState();
|
||||
if (_lastChartData) {
|
||||
_activateSavedState();
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
// ── DEL btn — JS-injected after the wheel paints; absent on a blank modal
|
||||
|
||||
Reference in New Issue
Block a user