Commit Graph
173 Commits
Author SHA1 Message Date
hz c1a71b1192 Feature-gate Flashcards to UAT only
Same treatment as Dynamic Questions and CCS Cases: hide the nav
sidebar entry and the dashboard's "flashcards due" review card unless
step3/deployment_environment is "uat".
2026-07-25 00:30:06 -05:00
hz f3a2e65627 Skip UAT/PRD deploys for changes that don't touch the deployable
Docs, local release tooling (tools/), and the GDScript test suite
(never executed by this pipeline, and irrelevant to the API image,
the exported web build, or k8s manifests) don't need a full deploy.
workflow_dispatch still allows a manual run for any of these if ever
needed.
2026-07-24 23:36:09 -05:00
hz bca31bd142 Add a Steam release export script pointed at production
project.godot stays checked in against UAT (us3q.ranaze.com) so the
Godot editor/debugger keeps testing against UAT. This script patches a
local copy to prd/s3q.ranaze.com just for the Windows Desktop export -
the same swap web/Dockerfile already does for UAT vs PRD web builds -
runs the export, then always restores the original file.

Verified: after a run, `git diff project.godot` is clean and the
exported .pck contains s3q.ranaze.com with no trace of us3q.ranaze.com.
2026-07-24 23:32:48 -05:00
hz 0e473343d0 Fix stale web_responsive_test icon assertion
It checked for a "DynamicQuestionsIcon" mode card that no longer
exists in study_selector.gd (that mode moved to its own nav item and
screen a while back), so it always failed. CCS Cases is now also
UAT-gated and won't be present in the default test environment either,
so point the check at Question Bank, the one mode card that's always
rendered.
2026-07-24 23:17:59 -05:00
hz 6df0a88fd4 Feature-gate Dynamic Questions and CCS Cases to UAT only
Both are still in progress and shouldn't be reachable in production
(or local dev) yet - hide every entry point (nav sidebar, the
dashboard's "dynamic concepts due" review card, and the CCS Cases
mode card on the study selector) unless step3/deployment_environment
is "uat", the same setting that already drives the UAT badge. Added
Brand.is_uat_environment() as the shared check.
2026-07-24 23:12:47 -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 cd1648fe38 Shorten "Skip question" button to "Skip" 2026-07-24 22:14:24 -05:00
hz f1b290aa73 Dock the question toolbar in line with the brand row
The toolbar had followed the progress group down into the row below
the branding after it moved there - readers expect actions docked to
the top brand row, not hanging off the question count.
2026-07-24 22:10:49 -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 62e65fd22c Add Windows Desktop export with RanaZe branding
Replace the default Godot boot splash and exe icon with the RanaZe
mark so a Windows build reads as RanaZe from first launch, not the
engine it's built on.
2026-07-24 21:56:53 -05:00
hz 5197234210 Drop toolbar text labels in favor of hover tooltips
Varying label widths (especially when a button hides itself, e.g.
"Labs" on a question with no lab results) broke even spacing between
icons. Every toolbar button already has a tooltip_text carrying the
same label as hover text, so drop the labels/wrapper containers
entirely and go back to plain, uniformly-spaced 44x44 icon buttons.
2026-07-24 21:05:34 -05:00
hz 576b48d581 Fix toolbar gaps and theme toggle shape
- A toolbar icon that hides itself at runtime (labs, notes,
  flashcard, bookmark) left its text label behind, showing as an
  orphaned label floating in a gap. The label's wrapper now tracks
  the button's own visibility.
- The theme toggle used a distinct circular pill shape; changed it
  to match the same rounded-square box every other toolbar icon uses.
2026-07-24 19:55:49 -05:00
hz d073f82a76 Fit the toolbar on a single row
The 11 labeled groups are wider than the old bare-icon buttons, so
the toolbar's allotted minimum width (tuned for the old layout) was
too narrow and forced a wrap onto two rows. Widened it and raised
the compact-mode breakpoint to match.
2026-07-24 03:23:14 -05:00
hz a94cc5188f Fix bottom-bar time caption for core sessions
Core sessions show a per-question stopwatch that counts up (no fixed
deadline, just a pacing signal), not a countdown - it was incorrectly
labeled "Time remaining" like the simulation/Timed countdown; now
reads "Time elapsed" to match what the number actually does.
2026-07-24 03:16:30 -05:00
hz 0902cc238a Un-collapse the question toolbar - show every action directly
The 6-item + "More" overflow popup made the toolbar feel sparse and
hid frequently-used actions (flag, report, flashcard, theme) behind
an extra click. Reverting to a flat toolbar where every action is
directly visible and labeled, including text size (grouped A-/A+
under one "Text size" caption instead of behind a popup).
2026-07-24 03:03:40 -05:00
hz 974de67032 Redesign question bank screen to match new mockup
Adapts the quiz screen's header, toolbar, choice cards, and bottom bar
to the designer's new layout:

- Header: adds the RanaZe logo/wordmark and a question-progress bar +
  percentage alongside the existing "Question N of M" text.
- Toolbar: consolidates 12 icon-only/chip buttons into 6 labeled items
  (Text size, Calculator, Clear highlight, Notes, Bookmark, More), with
  a new "More" popup holding the rest (labs, flag, report, flashcard,
  theme toggle, feedback). The underlying buttons are reparented, not
  duplicated, so every existing theming/visibility/state call site
  keeps working unmodified.
- Category tag: shows the question's discipline (falling back to
  system) above the stem.
- Choice cards: every choice now renders as a subtly-bordered rounded
  card even before answering, not just a flat divider row; the
  currently-selected pre-submit choice shows a checkmark.
- Bottom bar: merges the Skip/Submit row and the timer row into one -
  Skip as a plain link, a centered "X of Y" progress bar, and a
  time slot that shows the existing countdown when a limit applies or
  a new count-up stopwatch ("Time elapsed") otherwise, plus a
  Ctrl+Enter/Cmd+Enter submit shortcut with a visible hint.
2026-07-24 02:28:22 -05:00
hz edcc0def5d Fix CCS category order search 2026-07-23 23:14:38 -05:00
hz b9d4687b1b Fix dynamic Elo clamp updates 2026-07-23 23:01:52 -05:00
hz 0ec486f132 Stabilize UAT API pod selection 2026-07-23 17:03:02 -05:00
hz 32c455bba0 Improve dynamic question learning loop 2026-07-23 16:50:53 -05:00
hz c91e70deb5 Update app branding to the new shield "RZ" logo
Replaces the OS/window icon with the new dark-background logo design,
and derives a transparent shield-mark cutout (via chroma-key against
the flat background) for the in-app login/sidebar mark and the web
loading-screen logo. Brand.ranaze_mark_texture() no longer needs the
AtlasTexture crop since the new source asset is already tightly
cropped to the mark.
2026-07-23 16:24:49 -05:00
hz fae38d2ded Adapt dynamic question difficulty to learner Elo 2026-07-23 16:18:44 -05:00
hz 5b5741de37 Show selection percentages on unselected distractors during review
Previously only the correct choice and any choice the student actually
selected got a percentage badge once reviewing; never-selected
distractors were left blank. Now every choice shows its selection
percentage as soon as the question is answered, matching the earlier
change that made unselected distractors render red like the rest of
the review UI.
2026-07-23 15:54:39 -05:00
hz b1b83dae05 Fix dynamic mastery first-attempt upsert 2026-07-23 15:25:06 -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 4a4bed2ac5 Add missing lucide/link.svg icon
The connected-accounts "Connect" button in progress_profile.gd
referenced res://assets/icons/lucide/link.svg, which didn't exist,
causing a resource-load error whenever the Steam/Google linking row
rendered.
2026-07-23 14:26:26 -05:00
hz 88688d3eb0 Add Steam and Google brand icons to login OAuth buttons
Steam uses a theme-aware monochrome glyph (light/dark variants) since
the button background flips between navy and white; Google keeps its
official 4-color mark, which reads fine on either background.
2026-07-23 14:19:17 -05:00
hz 92c5688b55 Upgrade dynamic questions to authored parity 2026-07-23 14:11:18 -05:00
hz e174b5db15 Return dynamic question runs to dashboard 2026-07-23 13:52:24 -05:00
hz 403944b249 Assign IDs when promoting dynamic blueprints 2026-07-23 13:40:53 -05:00
hz 8390d795e5 Publish dynamic questions during UAT deploy 2026-07-23 13:30:22 -05:00
hz 6a6e703aa4 Fix dynamic questions sidebar icon 2026-07-23 13:19:32 -05:00
hz fcbc288a49 Add data-driven dynamic question mode 2026-07-23 12:33:23 -05:00
hz 50f07a77a5 Add exam-style question calculator 2026-07-23 05:19:12 -05:00
hz ba155fd38a Fix distractor explanations rendering on unanswered questions
Guarded the answer-review render path (teaching cards, review
follow-ups, distractor explanations) on current_answer/pending_correct_advance
directly rather than solely on correct_review_panel.visible, and added
the same guard inside _render_unselected_distractor_explanations
itself. This closes a path where a fresh, never-answered question
could show wrong-answer explanations immediately, before any
selection or submission.

Also: unselected distractors now render in the same red "wrong" card
style as selected/locked-wrong choices once a question is being
reviewed, instead of staying in the plain default row style. And
removed the redundant percentage badge that was floating above the
in-progress follow-up quiz prompt, since the choice button above it
already shows the same percentage.
2026-07-23 05:07:27 -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 b3a8dec379 Simplify resolved wrong-answer explanation cards per design feedback
Drop the redundant header row (duplicate percentage badge + collapse
chevron), the "Why this is appropriate/less appropriate:"/"Why this
is incorrect:" heading labels, and the nested sub-box - now that
these cards live inside their own choice's colored border, all of
that was repeating what the color and position already say. Both the
selected-wrong-choice resolved follow-up and the never-selected
distractor cards now just show the plain explanation sentence, with
the leading "Correct."/"Incorrect." verdict word stripped too.

Removing the toggle chevron removes the only way to reach the
collapse/expand behavior, so that machinery (_collapse_resolved_followups,
_toggle_followup_state, the "collapsed" state field) comes out too
rather than linger unreachable.
2026-07-23 04:19:10 -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 c62eff8846 Auto-flag questions with media at write time, not just via one-time sweep
The flag-media-questions CLI command only caught questions that
existed in the DB when it ran once. Any question created, imported,
or edited afterward could add media without ever being flagged for
review, since nothing gated new writes going forward. CreateAsync,
UpdateAsync, and UpsertManyByExternalIdAsync now all run new/updated
questions through ApplyMediaReviewGate, which flags any question that
has media and isn't already flagged.
2026-07-23 03:29:57 -05:00
hz 59ffaf4376 Move distractor explanations inline instead of a repeated bottom section
The "WHY OTHER OPTIONS ARE INCORRECT" aggregate section duplicated
explanations that selected wrong choices already showed inside their
own resolved follow-up quiz. Removed that section entirely; choices
the user never picked now get their "why incorrect" explanation
docked directly inside their own card (reusing the same followup
panel/attached-card styling), so every distractor's explanation lives
with its choice instead of in a separate list at the bottom.
2026-07-23 02:01:29 -05:00
hz 4db5b9d374 Drop the redundant status icon and "Review: B..." label from follow-up panels
The choice button above the panel already shows the letter badge,
choice text, and percentage, so repeating them in the panel header
was redundant now that the panel is docked inside the choice's card.
Keeps the collapse toggle, now named FollowupToggle since the old
FollowupSummary button it lived on is gone.
2026-07-23 01:47:11 -05:00
hz 2a2ff29389 Remove redundant "Correct Answer: X" heading from the review panel
Now that the explanation panel is docked inside the correct choice's
own green card, the heading was redundant with the badge/border color
already conveying it's the correct answer.
2026-07-23 01:42:31 -05:00
hz 5ba7af9d3e Redesign flag/report icons as vector assets and dock review panels inside their choice card
Flag question now uses a clean vector flag (dark/light SVG variants,
replacing a hand-drawn pixel-art icon that got muddied by the shared
toolbar icon-tint override). Report question is now a megaphone
instead of a second flag glyph, since both toolbar buttons looked
identical before.

The correct-answer explanation and the wrong-answer follow-up quiz
previously rendered as separate bordered boxes sitting below the
entire choice list. Both now dock inside their own choice's card:
the explanation panel reparents onto the correct choice's row, the
follow-up panel was already there but visually detached. A shared
_attached_panel_box style drops the shared border/corner between the
choice button and its panel so they read as one continuous card.
2026-07-23 01:23:53 -05:00
hz b822fe5314 Redesign clear-highlight icon as an eraser with sparkles
Also drop a stale custom_minimum_size(0, 54) reset left over in
_set_choice_button_text from before the answer row redesign - it was
silently overriding the button's real 68px minimum height on every
question load and on every elimination/strikethrough toggle, which is
why choice rows never actually got taller and why striking a choice
through visibly shrank its card.
2026-07-23 00:42:50 -05:00
hz 5f3289bb8e Vertically center the question+choices block before an answer is submitted
Fixes the large empty gap below the answer choices reported after the
answer-row redesign - the stem+choices VBox was pinned to the top of an
expand-filled scroll panel with all the leftover height sitting unused
below choice E. Now centers that block when unanswered and reverts to
top alignment once the explanation/review content grows underneath it.
2026-07-23 00:33:52 -05:00
hz 9d18704ad0 Render answer-choice badges as SVGs and give rows more breathing room
StyleBoxFlat-drawn circles kept looking rough at this size even after
tuning corner detail/antialiasing, so the badges are now two small SVG
assets (outline and filled) tinted per-state via modulate instead -
crisp regardless of size. Also increased row height, badge size, and
margins across the board; the previous pass's padding bump was too
timid and the rows still read as cramped.
2026-07-23 00:14:49 -05:00
hz aef287ac26 Fix pixelated circle badges with a seam through the center
icon_circle_box's perfectly-circular StyleBoxFlat (corner radius equal
to half the box size, no straight edges between corners) is a known
Godot degenerate case that draws a faint seam through the middle when
antialiasing is on and looks faceted at low corner_detail. Bumping
corner_detail and disabling antialiasing renders a clean circle at
these small badge/icon sizes instead - affects every icon_circle_box
call site (answer badges, stat tiles, avatars, etc.), not just the
question player.
2026-07-22 23:48:00 -05:00