refactor(engine): ambiguity burn-down batch 4 — zero ambiguities, gate enforced
Test / test (pull_request) Failing after 17m5s
Test / test (pull_request) Failing after 17m5s
Clears the final 47 pairs and turns the ratchet into a hard gate (AMBIGUITY_BASELINE = 0, assert_eq): - HudButtons: the 14 HUD button/popover handlers run as one chain, before ui_focus::FocusKeys — Esc/keyboard consumption order is now defined (restore prompt → buttons/popovers → focus navigation → settings toggle) instead of scheduler-dependent. - HUD text updaters (update_hud, update_selection_hud, update_won_previously) chained, in UiTextFx, after the new AutoComplete set (update_hud reads AutoCompleteState). - restore_hud_on_modal → apply_hud_visibility chained before UpdateOnResize: HudVisibility writes, application, and the layout read happen in a fixed order. - New writer sets UndoRequestWriters / InfoToastWriters (same self-ambiguous pattern as NewGameRequestWriters). - Logic-before-paint: check_no_moves and the AutoComplete chain order before BoardVisuals; SettingsMutation after UpdateOnResize. - MarkerVisuals set wraps the table painter chain; chrome fx declare disjointness from it. - update_hud_typography after BoardVisuals; avatar/settings-toggle interaction handlers declared disjoint from HudButtons. 302 → 198 → 171 → 47 → 0 in four batches, one day. New systems now fail CI unless they declare their ordering or their disjointness. Closes #143 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,11 @@ pub struct AutoCompleteState {
|
||||
/// Plugin that drives the auto-complete sequence.
|
||||
pub struct AutoCompletePlugin;
|
||||
|
||||
/// Set wrapping the auto-complete detect/drive chain; HUD readers of
|
||||
/// [`AutoCompleteState`] order themselves after it (#143).
|
||||
#[derive(bevy::ecs::schedule::SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct AutoComplete;
|
||||
|
||||
impl Plugin for AutoCompletePlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.init_resource::<AutoCompleteState>()
|
||||
@@ -58,7 +63,9 @@ impl Plugin for AutoCompletePlugin {
|
||||
drive_auto_complete,
|
||||
)
|
||||
.chain()
|
||||
.after(GameMutation),
|
||||
.in_set(AutoComplete)
|
||||
.after(GameMutation)
|
||||
.before(crate::card_plugin::BoardVisuals),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user