Add general app feedback reporting

This commit is contained in:
hz
2026-07-15 20:55:13 -05:00
parent 98fa98b5b1
commit aec56f168e
17 changed files with 544 additions and 1 deletions
+20
View File
@@ -13,6 +13,8 @@ func _initialize() -> void:
_test_collapsed_followup_review_expands()
_test_question_failure_retry_classification()
_test_transient_question_failure_keeps_player_waiting()
_test_feedback_context_excludes_study_content()
_test_feedback_form_validation()
quit(1 if failures > 0 else 0)
@@ -169,6 +171,24 @@ func _test_transient_question_failure_keeps_player_waiting() -> void:
player.free()
func _test_feedback_context_excludes_study_content() -> void:
var feedback = root.get_node("FeedbackService")
var context: Dictionary = feedback.build_context("player", Vector2(1280, 720))
_assert(context.get("screen", "") == "player", "feedback context should identify the current screen")
_assert(context.get("viewportWidth", 0) == 1280, "feedback context should include viewport width")
_assert(context.get("viewportHeight", 0) == 720, "feedback context should include viewport height")
_assert(not context.has("question"), "feedback context must not include question content")
_assert(not context.has("answer"), "feedback context must not include answer content")
_assert(not context.has("accessToken"), "feedback context must not include authentication tokens")
func _test_feedback_form_validation() -> void:
var dialog_script = load("res://scripts/ui/app_feedback_dialog.gd")
_assert(dialog_script.is_valid_submission("bug", "The next button does not respond."), "valid feedback should be accepted")
_assert(not dialog_script.is_valid_submission("unknown", "The next button does not respond."), "unknown categories should be rejected")
_assert(not dialog_script.is_valid_submission("bug", "Too short"), "short feedback should be rejected")
func _assert(condition: bool, message: String) -> void:
if condition:
return