Show "Exercise N/3" so repeated content doesn't look like a freeze

Manual report: after "Bravo!", clicking Continue seemed to do
nothing. An automated test proved the mission does advance (a new
exercise instance loads, completed_count increments) -- but
mission_02_pont_des_phrases has exactly one sentence_correction
exercise in the data right now, so the "next" exercise is the
identical sentence the child just solved. Nothing was broken; there
was just no visible signal that progress happened.

Added a persistent progress label at the top of exercise_host,
updated on every exercise load. Doesn't address the underlying
content-volume gap (still tracked in decisions.md point 14), but
makes the repetition legible instead of indistinguishable from a
stall.

Rebuilt both exports.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Denis Defolie
2026-10-11 18:18:40 +02:00
parent 91dcd7e07a
commit ffb3cd5afa
5 changed files with 57 additions and 1 deletions
+11
View File
@@ -26,6 +26,7 @@ var _last_exercise_id := ""
@onready var _exercise_container: Control = %ExerciseContainer
@onready var _overlay_container: Control = %OverlayContainer
@onready var _progress_label: Label = %ProgressLabel
## Accesseurs reserves aux tests d'integration (scenes/exercises/
@@ -67,6 +68,7 @@ func _load_next_exercise() -> void:
_mission, _last_exercise_id, _current_difficulty
)
_attempt_number = 1
_update_progress_label()
if _current_exercise_scene != null:
_current_exercise_scene.queue_free()
@@ -78,6 +80,15 @@ func _load_next_exercise() -> void:
_connect_answer_signal()
## Un contenu encore peu nombreux (voir docs/specs/decisions.md, point 14)
## peut faire redonner le meme exercice d'une mission a l'autre tentative :
## sans ce repere, ca ressemble a un blocage plutot qu'a une progression.
func _update_progress_label() -> void:
_progress_label.text = "%s %d/%d" % [
UIText.get_text("exercise_host.progress_label"), _completed_count + 1, MISSION_LENGTH
]
func _connect_answer_signal() -> void:
match _mission["exercise_type"]:
"multiple_choice":
+16 -1
View File
@@ -11,12 +11,27 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1")
[node name="HeaderBar" type="MarginContainer" parent="."]
layout_mode = 1
anchor_right = 1.0
offset_bottom = 40.0
grow_horizontal = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 8
[node name="ProgressLabel" type="Label" parent="HeaderBar"]
unique_name_in_owner = true
layout_mode = 2
horizontal_alignment = 2
[node name="ExerciseContainer" type="Control" parent="."]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 40.0
grow_horizontal = 2
grow_vertical = 2