bug(challenge): silent no-op when all challenges are completed #72

Closed
opened 2026-05-28 21:19:07 +00:00 by funman300 · 1 comment
Owner

Summary

When challenge_index >= challenge_count() (player has beaten every challenge), pressing X or the Challenge button does nothing — no toast, no modal, no feedback.

Location

solitaire_engine/src/challenge_plugin.rs lines 95–97:

let Some(seed) = challenge_seed_for(progress.0.challenge_index) else {
    warn!("challenge seed list is empty");  // dev-only console log
    return;  // player sees nothing
};

Steps to reproduce

  1. Complete every challenge in the list
  2. Press X or tap Challenge in the Modes menu
  3. Nothing happens — game does not start, no explanation given

Expected behaviour

An InfoToast explains the player has completed all challenges.

Severity

Medium — bad UX, player thinks the feature is broken.

## Summary When `challenge_index >= challenge_count()` (player has beaten every challenge), pressing X or the Challenge button does nothing — no toast, no modal, no feedback. ## Location `solitaire_engine/src/challenge_plugin.rs` lines 95–97: ```rust let Some(seed) = challenge_seed_for(progress.0.challenge_index) else { warn!("challenge seed list is empty"); // dev-only console log return; // player sees nothing }; ``` ## Steps to reproduce 1. Complete every challenge in the list 2. Press X or tap Challenge in the Modes menu 3. Nothing happens — game does not start, no explanation given ## Expected behaviour An `InfoToast` explains the player has completed all challenges. ## Severity Medium — bad UX, player thinks the feature is broken.
Author
Owner

Fix (commit f444378)

Replaced the silent warn! + return with an InfoToastEvent so the player receives clear feedback when all challenges have been completed:

// Before
let Some(seed) = challenge_seed_for(progress.0.challenge_index) else {
    warn!("challenge seed list is empty");
    return;
};

// After
let Some(seed) = challenge_seed_for(progress.0.challenge_index) else {
    info_toast.write(InfoToastEvent(
        "You've completed all challenges! More coming soon.".into(),
    ));
    return;
};

The toast fires immediately when the player presses X or taps the Challenge button and their challenge_index has reached the end of the seed list. No game state changes are made — the button simply explains why nothing happened.

## Fix (commit `f444378`) Replaced the silent `warn!` + `return` with an `InfoToastEvent` so the player receives clear feedback when all challenges have been completed: ```rust // Before let Some(seed) = challenge_seed_for(progress.0.challenge_index) else { warn!("challenge seed list is empty"); return; }; // After let Some(seed) = challenge_seed_for(progress.0.challenge_index) else { info_toast.write(InfoToastEvent( "You've completed all challenges! More coming soon.".into(), )); return; }; ``` The toast fires immediately when the player presses X or taps the Challenge button and their `challenge_index` has reached the end of the seed list. No game state changes are made — the button simply explains why nothing happened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#72