Restrict progression features to UAT

This commit is contained in:
hz
2026-08-04 08:08:47 -05:00
parent c140b9a96c
commit 976cb70d4a
13 changed files with 216 additions and 37 deletions
+10 -3
View File
@@ -1,6 +1,7 @@
extends VBoxContainer
const Style := preload("res://scripts/ui/ui_style.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
var main: Control
var selected_system := "All Systems"
@@ -14,6 +15,7 @@ var targeted_setup := false
var goal_option: OptionButton
var target_label: Label
var pending_launch := false
var goal_row: HBoxContainer
func _ready() -> void:
set_anchors_preset(Control.PRESET_FULL_RECT)
@@ -32,7 +34,8 @@ func _ready() -> void:
Style.set_label(system_label, 22, Style.CYAN)
add_child(system_label)
var goal_row := HBoxContainer.new()
goal_row = HBoxContainer.new()
goal_row.visible = FeatureFlags.progression_enabled()
var goal_label := Label.new()
goal_label.text = "Finish line"
goal_row.add_child(goal_label)
@@ -88,7 +91,7 @@ func _ready() -> void:
func on_show(payload: Variant = null) -> void:
if typeof(payload) == TYPE_DICTIONARY:
if typeof(payload) == TYPE_DICTIONARY and FeatureFlags.progression_enabled():
targeted_setup = bool(payload.get("mastery_target", false))
selected_system = str(payload.get("step3_system", "All Systems"))
requested_count = int(payload.get("question_count", 10))
@@ -102,7 +105,7 @@ func on_show(payload: Variant = null) -> void:
else:
goal_option.set_meta("mastery_target", false)
targeted_setup = false
selected_system = str(payload) if payload != null else "All Systems"
selected_system = str(payload.get("step3_system", "All Systems")) if typeof(payload) == TYPE_DICTIONARY else (str(payload) if payload != null else "All Systems")
_refresh_setup()
@@ -130,6 +133,10 @@ func _start_block() -> void:
if not QuestionBankService.has_questions():
status_label.text = "Questions have not loaded from the API yet."
return
if not FeatureFlags.progression_enabled():
BlockSessionService.start_block(selected_system, int(size_spin.value), mode_option.get_item_text(mode_option.selected))
main.show_screen("player")
return
pending_launch = true
start_button.disabled = true
status_label.text = "Preparing your study goal..."
+32 -15
View File
@@ -6,6 +6,7 @@ const ActivityChart := preload("res://scripts/ui/dashboard_activity_chart.gd")
const DashboardSparkline := preload("res://scripts/ui/dashboard_sparkline.gd")
const DashboardSegmentBar := preload("res://scripts/ui/dashboard_segment_bar.gd")
const DashboardInfoBadge := preload("res://scripts/ui/dashboard_info_badge.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
var main: Control
var scroll: ScrollContainer
@@ -93,9 +94,11 @@ func _build() -> void:
stat_card_grid.add_theme_constant_override("h_separation", 12)
stat_card_grid.add_theme_constant_override("v_separation", 12)
content.add_child(stat_card_grid)
mission_content = VBoxContainer.new()
mission_content.add_theme_constant_override("separation", 10)
content.add_child(_card(mission_content, 16))
mission_content = null
if FeatureFlags.progression_enabled():
mission_content = VBoxContainer.new()
mission_content.add_theme_constant_override("separation", 10)
content.add_child(_card(mission_content, 16))
qbank_sparkline = DashboardSparkline.new()
qbank_sparkline.custom_minimum_size = Vector2(0, 34)
@@ -147,7 +150,7 @@ func _build() -> void:
performance.add_child(trend_chart)
performance.add_child(HSeparator.new())
var system_header := HBoxContainer.new()
system_header.add_child(_section_title("System mastery path"))
system_header.add_child(_section_title("System mastery path" if FeatureFlags.progression_enabled() else "Performance by system"))
var header_space := Control.new()
header_space.size_flags_horizontal = Control.SIZE_EXPAND_FILL
system_header.add_child(header_space)
@@ -166,9 +169,11 @@ func _build() -> void:
right_column.add_theme_constant_override("separation", 12)
right_column.size_flags_horizontal = Control.SIZE_EXPAND_FILL
analytics_grid.add_child(right_column)
rank_content = VBoxContainer.new()
rank_content.add_theme_constant_override("separation", 9)
right_column.add_child(_card(rank_content, 16))
rank_content = null
if FeatureFlags.progression_enabled():
rank_content = VBoxContainer.new()
rank_content.add_theme_constant_override("separation", 9)
right_column.add_child(_card(rank_content, 16))
focus_content = VBoxContainer.new()
focus_content.add_theme_constant_override("separation", 10)
right_column.add_child(_card(focus_content, 16))
@@ -196,9 +201,11 @@ func _build() -> void:
weekly_summary.add_theme_constant_override("separation", 10)
weekly_row.add_child(weekly_summary)
weekly.add_child(HSeparator.new())
weekly_goal_content = VBoxContainer.new()
weekly_goal_content.add_theme_constant_override("separation", 8)
weekly.add_child(weekly_goal_content)
weekly_goal_content = null
if FeatureFlags.progression_enabled():
weekly_goal_content = VBoxContainer.new()
weekly_goal_content.add_theme_constant_override("separation", 8)
weekly.add_child(weekly_goal_content)
lower_grid.add_child(_card(weekly, 16))
recent_list = VBoxContainer.new()
recent_list.add_theme_constant_override("separation", 6)
@@ -225,16 +232,22 @@ func _render() -> void:
_render_readiness_card(data)
_render_accuracy_card(data)
trend_chart.set_series(data.get("performanceTrend", []), trend_mode, UIThemeService.is_dark_mode())
_render_systems(data.get("systems", []))
_render_focus(data.get("systems", []))
if FeatureFlags.progression_enabled():
_render_systems(data.get("systems", []))
_render_focus(data.get("systems", []))
else:
_render_systems_legacy(data.get("systems", []))
_render_focus_legacy(data.get("systems", []))
_render_review(data)
_render_rank(data.get("progression", {}))
if FeatureFlags.progression_enabled():
_render_rank(data.get("progression", {}))
var weekly: Array = data.get("weeklyActivity", [])
activity_chart.set_days(weekly, UIThemeService.is_dark_mode())
_render_weekly(data, weekly)
_render_recent(data.get("recentActivity", []))
_render_missions()
_render_weekly_goal()
if FeatureFlags.progression_enabled():
_render_missions()
_render_weekly_goal()
func _render_rank(value: Variant) -> void:
@@ -845,6 +858,10 @@ func _start_review_queue(step3_system: String = "") -> void:
pending_review_launch = true
_show_loading_message("Preparing your review queue...")
set_meta("pending_review_system", step3_system)
if not FeatureFlags.progression_enabled():
review_queue_service.start_pass(step3_system)
_render_review(DashboardService.data)
return
if not StudySessionService.session_started.is_connected(_on_review_session_started):
StudySessionService.session_started.connect(_on_review_session_started)
if not StudySessionService.session_failed.is_connected(_on_review_session_failed):
+11 -6
View File
@@ -4,6 +4,7 @@ const Style := preload("res://scripts/ui/ui_style.gd")
const Brand := preload("res://scripts/ui/medmind_style.gd")
const NavigationRoutes := preload("res://scripts/ui/navigation_routes.gd")
const CreditsBadge := preload("res://scripts/ui/credits_badge.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
var screens := {}
var _account_profile_synced := false
@@ -39,7 +40,8 @@ func _ready() -> void:
Style.apply_app_theme(self)
_build_ui()
CreditsService.award_received.connect(_show_coin_award)
StudySessionService.session_completed.connect(_on_study_session_completed)
if FeatureFlags.progression_enabled():
StudySessionService.session_completed.connect(_on_study_session_completed)
theme_service.theme_changed.connect(_on_theme_changed)
resized.connect(_update_responsive_layout)
_update_responsive_layout()
@@ -47,6 +49,8 @@ func _ready() -> void:
func _on_study_session_completed(summary: Dictionary) -> void:
if not FeatureFlags.progression_enabled():
return
WeeklyGoalService.refresh()
call_deferred("show_screen", "session_summary", summary)
@@ -293,11 +297,12 @@ func _build_ui() -> void:
screens_container.add_child(review)
screens["review"] = review
var session_summary := preload("res://scripts/ui/session_summary.gd").new()
session_summary.name = "SessionSummary"
session_summary.main = self
screens_container.add_child(session_summary)
screens["session_summary"] = session_summary
if FeatureFlags.progression_enabled():
var session_summary := preload("res://scripts/ui/session_summary.gd").new()
session_summary.name = "SessionSummary"
session_summary.main = self
screens_container.add_child(session_summary)
screens["session_summary"] = session_summary
var review_queue_results := preload("res://scripts/ui/review_queue_results.gd").new()
review_queue_results.name = "ReviewQueueResults"
+6 -2
View File
@@ -1,6 +1,7 @@
extends Control
const Brand := preload("res://scripts/ui/medmind_style.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
var main: Control
var scroll: ScrollContainer
@@ -96,7 +97,9 @@ func _build() -> void:
right.add_theme_constant_override("separation", 14)
columns.add_child(right)
right.add_child(_outcome_card())
right.add_child(_progression_card())
progression_content = null
if FeatureFlags.progression_enabled():
right.add_child(_progression_card())
right.add_child(_connected_accounts_card())
right.add_child(_account_actions_card())
_refresh_back_to_session_visibility()
@@ -288,7 +291,8 @@ func _render() -> void:
_set_metric("cases", str(int(data.get("ccsCasesCompleted", 0))))
_set_metric("streak", "%d days" % int(data.get("currentStreak", 0)))
_render_systems(data.get("systems", []))
_render_progression(data.get("progression", {}))
if FeatureFlags.progression_enabled():
_render_progression(data.get("progression", {}))
_render_outcome()
+6 -5
View File
@@ -6,6 +6,7 @@ const FlashcardPrefillDialog := preload("res://scripts/ui/flashcard_prefill_dial
const CalculatorPanel := preload("res://scripts/ui/calculator_panel.gd")
const SlotMachinePanel := preload("res://scripts/ui/rz_slot_machine_screen.gd")
const CreditsBadge := preload("res://scripts/ui/credits_badge.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
const CLEAR_HIGHLIGHT_DARK_ICON := preload("res://assets/icons/medmind/clear-highlight-dark.svg")
const CLEAR_HIGHLIGHT_LIGHT_ICON := preload("res://assets/icons/medmind/clear-highlight-light.svg")
const LABS_DARK_ICON := preload("res://assets/icons/medmind/labs-dark.svg")
@@ -1224,7 +1225,7 @@ func _process(delta: float) -> void:
return
if visible and BlockSessionService.block_started and BlockSessionService.session_kind == "core":
_update_timer_bar()
var duration_goal := str(StudySessionService.progress.get("goalType", "")) == "duration"
var duration_goal := FeatureFlags.progression_enabled() and str(StudySessionService.progress.get("goalType", "")) == "duration"
if visible and BlockSessionService.block_started and (BlockSessionService.mode == "Timed" or duration_goal) and (report_overlay == null or not report_overlay.visible):
BlockSessionService.seconds_remaining = max(0.0, BlockSessionService.seconds_remaining - delta)
var shown_seconds := int(ceil(BlockSessionService.seconds_remaining))
@@ -2081,10 +2082,10 @@ func _open_reference_url(url: String) -> void:
func _advance_or_finish() -> void:
if not StudySessionService.summary.is_empty():
if FeatureFlags.progression_enabled() and not StudySessionService.summary.is_empty():
StudySessionService.emit_deferred_summary()
return
if str(StudySessionService.progress.get("goalType", "")) == "duration" and BlockSessionService.seconds_remaining <= 0:
if FeatureFlags.progression_enabled() and str(StudySessionService.progress.get("goalType", "")) == "duration" and BlockSessionService.seconds_remaining <= 0:
StudySessionService.check_completion()
return
if BlockSessionService.move_next():
@@ -2111,7 +2112,7 @@ func _finish() -> void:
func _exit_run() -> void:
if StudySessionService.is_active() and BlockSessionService.session_kind != "simulation":
if FeatureFlags.progression_enabled() and StudySessionService.is_active() and BlockSessionService.session_kind != "simulation":
StudySessionService.finish_early()
if BlockSessionService.session_kind == "bookmark":
BlockSessionService.finish_block()
@@ -2165,7 +2166,7 @@ func _set_timer_display(total_seconds: int) -> void:
func _is_session_timer_visible() -> bool:
if BlockSessionService.session_kind == "core" or BlockSessionService.session_kind == "simulation":
return true
if str(StudySessionService.progress.get("goalType", "")) == "duration":
if FeatureFlags.progression_enabled() and str(StudySessionService.progress.get("goalType", "")) == "duration":
return true
return BlockSessionService.mode == "Timed"
+4
View File
@@ -1,6 +1,7 @@
extends VBoxContainer
const Brand := preload("res://scripts/ui/medmind_style.gd")
const FeatureFlags := preload("res://scripts/config/feature_flags.gd")
var main: Control
var title_label: Label
@@ -84,6 +85,9 @@ func _start_another() -> void:
another_button.disabled = true
status_label.text = "Preparing another review pass..."
status_label.visible = true
if not FeatureFlags.progression_enabled():
ReviewQueueService.start_pass("", 20)
return
if not StudySessionService.session_started.is_connected(_on_review_session_started):
StudySessionService.session_started.connect(_on_review_session_started)
if not StudySessionService.session_failed.is_connected(_on_review_session_failed):