From 29b89dc40477fae9907ec6b1ae87b7e7c8170e6d Mon Sep 17 00:00:00 2001 From: hz Date: Mon, 20 Jul 2026 23:59:07 -0500 Subject: [PATCH] Remove redundant follow-up retry action --- scripts/ui/question_player.gd | 38 ----------------------------------- tests/smoke/.gdignore | 1 + 2 files changed, 1 insertion(+), 38 deletions(-) create mode 100644 tests/smoke/.gdignore diff --git a/scripts/ui/question_player.gd b/scripts/ui/question_player.gd index 721c7e9..b376ded 100644 --- a/scripts/ui/question_player.gd +++ b/scripts/ui/question_player.gd @@ -3215,17 +3215,6 @@ func _build_resolved_followup(index: int, state: Dictionary) -> void: _set_scaled_label(explanation, 14, Brand.text_color(_followup_is_dark())) body_content.add_child(explanation) - if not is_main_correct and bool(state.get("has_authored_choices", false)): - var similar_button := Button.new() - similar_button.text = "Ask similar question" - similar_button.custom_minimum_size = Vector2(172, 38) - similar_button.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN - Style.style_chip(similar_button, Color("fb5f6d")) - _set_scaled_button_font(similar_button, 14) - similar_button.pressed.connect(_restart_followup.bind(str(state.get("choice_id", "")))) - body_content.add_child(similar_button) - - func _build_followup_header(content: VBoxContainer, state: Dictionary, expanded: bool, interactive: bool) -> void: var dark := _followup_is_dark() var is_main_correct := bool(state.get("is_main_correct", false)) @@ -3348,33 +3337,6 @@ func _choice_review_explanation(choice_id: String, state: Dictionary) -> String: return "Review the stem finding that makes this option less appropriate." -func _restart_followup(choice_id: String) -> void: - if followup_required or not followup_states.has(choice_id): - return - var state: Dictionary = followup_states[choice_id] - if not bool(state.get("has_authored_choices", false)): - return - var options: Array = state.get("choices", []).duplicate(true) - options.shuffle() - state["choices"] = options - state["selected_option_id"] = "" - state["selected_option_text"] = "" - state["was_correct"] = false - state["resolved"] = false - state["collapsed"] = false - followup_states[choice_id] = state - active_followup_choice_id = choice_id - followup_required = true - followup_answered = false - next_button.disabled = true - if skip_button != null: - skip_button.disabled = true - _render_followup_state(choice_id) - var index := _choice_index_for_id(choice_id) - if index >= 0 and question_scroll != null: - question_scroll.call_deferred("ensure_control_visible", choice_followup_panels[index]) - - func _ensure_answer_review_followups() -> void: for attempted_id in followup_states.keys(): var attempted_state: Dictionary = followup_states[attempted_id] diff --git a/tests/smoke/.gdignore b/tests/smoke/.gdignore new file mode 100644 index 0000000..2bb0422 --- /dev/null +++ b/tests/smoke/.gdignore @@ -0,0 +1 @@ +# Playwright sources and generated reports are not Godot project resources.