Commit Graph
76 Commits
Author SHA1 Message Date
hz 8c439c6294 Add question bank mastery paths and gap questions 2026-07-31 23:46:46 -05:00
hz 5488dec2c7 Lock submitted simulation answers 2026-07-30 16:54:12 -05:00
hz ae6b37eb7d Make simulation block submission idempotent 2026-07-30 15:30:54 -05:00
hzandClaude Sonnet 5 9f150baecc Simplify exam simulations and strip the slot machine down to just the machine
Simulations no longer color-code correct/incorrect choices, retry a
failed per-question autosave, or show the RZ coin/ELO badge - users
move on immediately after submitting a timed block, same as a real
exam. The slot machine panel now shows only the cabinet/reels/lever
and a status line (title, banner, controls row, rewards list, and
footer removed), the reels fill the cabinet window instead of
floating in a black border, the coin-burst animation no longer
starts oversized, and the toolbar button is UAT-only via
Brand.is_uat_environment().

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-30 14:50:12 -05:00
hz 1860e6ede6 Add an RZ Coin slot machine
Adds a spend-coins-for-a-random-reward mini-game reachable from the
shop. Backend mirrors the store's existing atomic/idempotent purchase
pattern (SpinAsync in CreditStore.cs) with a server-authoritative,
weighted reward roll and a rolling per-user spin-rate guard; odds are
served from GET /api/credits/spin-config so the client never hardcodes
numbers that could drift from the real payout table. The mockup's
"Streak Protector" reward was swapped for a real Exam Simulation Token
since streaks aren't currently a persisted, protectable concept.

Also fixes two latent bugs surfaced while building this:
- credits_service.gd's operation-id builder referenced a nonexistent
  AuthState.user_id (should be .username), throwing on every credit
  action.
- _post() silently no-op'd with no signal when signed out, which
  combined with a GDScript closure gotcha (lambdas capture outer
  locals by value, so reassigning inside one never reached the
  caller) meant a spin attempted while unauthenticated could hang
  forever instead of surfacing an error.
2026-07-30 00:29:49 -05:00
hz da641a8d1d Add Rz Coin utility store 2026-07-29 18:34:54 -05:00
hz 845907e825 Show rank tier and ELO alongside RZ points in the coins badge
Adds a server-computed tier/division (Bronze..Diamond, III-I) to the
ratings profile endpoint and surfaces it next to the numeric ELO in the
shared header badge, matching the coin balance display already there.
2026-07-29 00:25:26 -05:00
hzandClaude Sonnet 5 6f41906101 Gate Rz Coins on correct-first-try-within-time-limit; match coin-flight animation to it
Credits were previously awarded on any first attempt regardless of
correctness or timing. The award now requires the first-ever attempt
to be correct (record.Attempt.IsCorrect) and submitted before the
adaptive per-question timer expired (new MetTimeLimit request field,
computed client-side from the same elapsed/target comparison that
already drives the visible countdown bar). The coin-flight animation
in question_player.gd now only plays when both conditions are met
(BlockSessionService.submit_core_attempt's existing "mastered" flag
plus met_time_limit), so the effect never promises a coin that isn't
actually earned.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-28 20:17:07 -05:00
hzandClaude Sonnet 5 efae7e0b2b Add live RZ Points balance widget to question and shell headers
Wires the recently-merged question-completion-credits backend
(GET /api/credits) into the client for the first time: a new
CreditsService autoload fetches/caches the balance, and the embedded
credits field on first-answer responses updates it instantly with no
extra round trip. A shared CreditsBadge widget (star icon, balance,
decorative chevron per mockup) surfaces it in both the question
screen toolbar and the main shell header.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-28 19:33:33 -05:00
hz 118c215608 Add a setting to turn off follow-up questions
The optional "FOLLOW-UP QUESTIONS" reinforcement section shown during
answer review is now gated behind a Settings toggle (on by default),
persisted locally the same way as dark mode and interface sounds.
2026-07-24 23:01:06 -05:00
hz 50f54b1bec Polish question player header/toolbar and add configurable block size
- Fix the toolbar wrapping onto two rows: its minimum width was tuned
  for an older, narrower button set and never widened back out after
  reverting to bare icon buttons.
- Drop the "Time elapsed"/"Ctrl+Enter" readout next to Submit - it was
  clutter; the underlying timer logic keeps running unseen.
- Move the RanaZe brand mark above the question-count row instead of
  sharing a line with it.
- Progress text drops the word "Question" everywhere ("1 of 10"), and
  core/dynamic sessions now cycle against a configurable block size
  (Settings > Question block size, default 10) instead of counting up
  forever.
2026-07-24 21:57:03 -05:00
hz 332da7c181 Fix stale-node crash in UI sound auto-wiring
node_added already fires once per node as it enters the tree (including
every descendant of a newly-added subtree), so the recursive call_deferred
in _on_node_added was redundant and held a raw Node reference across a
frame boundary. If that node got freed before the deferred call fired
(e.g. a container torn down and rebuilt the same frame), the engine's
message queue couldn't marshal the argument and threw "Cannot convert
argument 1 from Object to Object". Wiring synchronously removes the
window entirely.

Also silences the intentional integer division in _duration_text,
matching the same annotation already applied to _elapsed_simulated_text.
2026-07-23 15:13:56 -05:00
hz 48f404518f Fix GDScript editor warnings (shadowed vars, unused param, integer division)
Renames locals/params that shadowed base-class properties (Node.name,
Control.size, BoxContainer.alignment), prefixes an intentionally-unused
parameter, and annotates a deliberate integer division so the console
stays clean during development.
2026-07-23 14:30:48 -05:00
hz fcbc288a49 Add data-driven dynamic question mode 2026-07-23 12:33:23 -05:00
hz 8e216eac32 Rebuild CCS case workflow 2026-07-23 04:43:02 -05:00
hz 489b9c3d7c Fix text zoom not actually syncing, and expose it in Settings
Two real gaps meant the account-synced zoom (from the previous
"sync through the account" change) never reached the screen:
_load_cache() updated AccountProfileService.preferences but never
emitted profile_changed, so question_player.gd/ccs_service.gd (already
built and listening before login even happens) never found out a
cached value had loaded. And nothing forced a server refresh
right after login - it only fired if the user happened to open the
profile/progress screen, so a fresh device/session had no path to
the true synced value at all.

main.gd now calls AccountProfileService.refresh() once per login
(not on every silent token refresh) so the real preferences GET
always runs right after signing in, on any device.

Also added Question bank/CCS case text size steppers to the Settings
screen next to dark mode, per user request, reusing the same
AccountProfileService/CCSService plumbing as the in-screen A-/A+
buttons.
2026-07-23 04:37:45 -05:00
hz d69a1fd0e3 Sync text zoom preference through the account instead of local settings
Local user://settings.cfg meant zoom level didn't follow a student
across devices/browsers. Question bank and CCS text scale now live on
the user's study profile in Mongo (QuestionTextScale/CcsTextScale),
synced through a new PUT /api/profile/me/text-scale endpoint and the
existing preferences GET/cache already used for study preferences.

Both question_player.gd and ccs_service.gd read the synced value at
startup and react to AccountProfileService.profile_changed so a value
pulled down after login (or changed from another session) applies
without a restart. Backend validates the 0.85-1.35 range and updates
only the field(s) provided via a targeted $set, so it can't clobber
the other scale or the unrelated study-profile preferences.
2026-07-23 03:59:02 -05:00
hz b88f38f29b Persist text zoom level across sessions
Question bank and CCS case text-size (A-/A+) previously reset to 1.0
on every app launch. Both now load their saved scale from
user://settings.cfg at startup and save on every adjustment, mirroring
the existing pattern used for dark/light mode and sound preferences.
2026-07-23 03:42:17 -05:00
hz f17797becc Don't show the session-expiry warning to actively-used sessions
The warning was purely a token-expiry countdown with no concept of
user activity, so it interrupted people who had been clicking through
questions the whole time. AuthState now tracks real input activity
globally and silently refreshes the session in the background when
the user has interacted recently, only surfacing the "Stay logged in?"
dialog for sessions that are genuinely idle. A failed background
refresh still surfaces the dialog rather than silently logging the
user out.
2026-07-22 22:52:38 -05:00
hz 09b670d5d4 Close the gap between the flashcards study screen and the mockup
Add real session-history navigation (Previous/Next/Shuffle), compact
side panels, and a segmented progress row to match the mockup layout.
Flashcards now opens straight into Study, with library management
moved into the Options menu ("Manage Flashcards") and Export hidden
from the UI (Import stays). Shuffle is backed by a real, due-before-new
randomized pick on the backend, not a decorative toggle.
2026-07-22 00:43:52 -05:00
hz 15e9f9779e Fix flashcard study/next 400s from a malformed studyDayStartUtc
current_study_day_start_utc() passed use_space=true to
Time.get_datetime_string_from_unix_time(), producing "2026-07-21
00:00:00Z" (space separator) instead of ISO-8601. The server's
System.Text.Json DateTime converter rejects that with a 400, which
the client surfaces as a generic "could not be loaded" error -
blocking every study session. Confirmed against the live API: the
space-separated value 400s, the corrected T-separated value returns
a card.
2026-07-21 17:02:51 -05:00
hz 4dfbd811b9 Wire flashcard CSV/JSON import/export and fix theme/responsive gaps
Import and export were stubbed with status-text placeholders; wire them
to the existing backend endpoints with a real file picker (web JS
bridge or native FileDialog) and browser/desktop download, plus an
import preview with create/update/skip/error counts before commit.

Also fix the library and study screens' theme-refresh handlers, which
were no-op stubs so cards never restyled on a theme toggle, and add
responsive layout handling for narrow viewports.
2026-07-21 16:41:26 -05:00
hz 48a8c8361d Add flashcards feature with spaced repetition scheduling
Adds a full flashcards system: FSRS-based scheduling, cloze/basic
card types, CSV import/export, media storage, and study UI, wired
into navigation and the dashboard alongside existing question flows.
2026-07-21 15:08:52 -05:00
hz 72fd1e3e0f Add provider-neutral Google authentication 2026-07-20 21:42:56 -05:00
hz 48e19f138e Default local client endpoints to UAT 2026-07-20 21:13:20 -05:00
hz 5c406a271f Merge authentication into Questions API 2026-07-20 17:21:15 -05:00
hz 2dd4fa6420 Keep Stripe checkout in a popup 2026-07-20 16:42:17 -05:00
hz d142da2f78 Fix web redirects and loader rendering 2026-07-20 16:29:24 -05:00
hz 121e80b2ea Prefer high-performing distractors 2026-07-20 02:44:58 -05:00
hz dae3a31b71 Add legal consent and reliable external redirects 2026-07-20 02:16:20 -05:00
hz d176640cff Rebrand app as RanaZe Step 3 Trainer 2026-07-20 00:04:29 -05:00
hz df94247b3b Make Stripe checkout redirect resilient 2026-07-19 23:02:56 -05:00
hz a00dc81aa9 Fix Stripe checkout browser handoff 2026-07-19 22:56:11 -05:00
hz dec5e74aa7 Add Stripe donation flow 2026-07-19 22:26:33 -05:00
hz f12904bf73 Unify CCS case management flow 2026-07-19 21:29:24 -05:00
hz dacf2b89b2 Implement responsive profile and account data controls 2026-07-19 13:39:15 -05:00
hz 7508d4fe1d Implement persistent review queue 2026-07-19 12:51:24 -05:00
hz 2dcac51452 Add user progress dashboard 2026-07-18 23:45:38 -05:00
hz 2e52a7ea0a Add synced question bookmarks 2026-07-18 23:07:22 -05:00
hz 819a108451 Make note save status transient 2026-07-18 22:25:08 -05:00
hz d0bb271b14 Add synced user notes 2026-07-18 22:22:29 -05:00
hz a232e18c46 Add session expiry renewal flow 2026-07-18 15:53:11 -05:00
hz eb8747d48e Correct question toolbar controls 2026-07-18 15:29:21 -05:00
hz 102933db44 Count up question bank answer timer 2026-07-18 15:14:48 -05:00
hz a778a680e0 Redesign exam and CCS experiences 2026-07-16 22:42:03 -05:00
hz c8bfc26645 Implement nested question remediation and review content 2026-07-16 21:46:56 -05:00
hz 0f5a1122d4 Add branded web loading screen 2026-07-16 19:00:46 -05:00
hz aec56f168e Add general app feedback reporting 2026-07-15 20:55:13 -05:00
hz 98fa98b5b1 Make question loading resilient to network failures 2026-07-15 20:32:04 -05:00
hz 52d435fa2e Complete CCS results and rating flow 2026-07-15 11:08:13 -05:00