Skip to content

Draw problems from a saved practice list - #401

Merged
jserv merged 1 commit into
sysprog21:mainfrom
Quinton1230:saved-practice-list
Oct 22, 2026
Merged

jserv merged 1 commit into
sysprog21:mainfrom
Quinton1230:saved-practice-list

Conversation

@Quinton1230

@Quinton1230 Quinton1230 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Candidates can mark problems in the lobby and use "Pick from my list" to draw uniformly from that saved set, avoiding the current problem when another marked problem is available. The draw button and list status remain visible while the specific-problem picker is collapsed. The list is stored in this browser, without account or device synchronization.

Drawing from the list leaves difficulty and topic filters and a manually chosen duration unchanged. Later explicit filter changes follow the existing manual-selection rules: keep the selected problem when it still matches, or recommend another matching problem when it is excluded. Neither path edits the saved list. Returning through the browser's back/forward cache keeps any explicit problem choice visible, including a card selection, a list draw, and a history "Try again" selection.

Problem cards have separate selection buttons and labeled list checkboxes. Stored IDs are validated against the current bank, and changes synchronize between lobby tabs. Failed writes preserve unsaved changes for the current visit. An empty list disables the draw action with an explanation; if another tab empties the list while the draw button has keyboard focus, focus moves to the status before the button is disabled. The existing recommendation and general random-selection pools are unchanged.

Validation:

  • 40 selected Chromium and unit regressions pass without skips, covering collapsed-picker access, cross-tab focus, subsequent filter changes, persistence, storage failures, retries, and interview navigation.
  • The full local gate was run and did not pass. Its static browser suite reports 1,358 passed, 11 failed, and 16 skipped. Failures include unsupported C++20, Windows process tests, and the existing system-font height assertion (802px versus 800px). Other gates report missing Rust tools and Windows script/path failures; C/Java and several tooling checks are skipped. Live interviews remain unverified locally.
  • ESLint, Prettier, generated-card drift checks, and Git hooks pass.
  • Inspected 1280px, 375px, and 320px layouts with a saved list and the picker collapsed; there is no horizontal overflow. At 1280px the lobby height remains 802px with this Windows system font and 800px with Arial.

Closes #368


Summary by cubic

Adds a saved practice list to the lobby so candidates can mark problems with an "In my list" checkbox and draw the next one uniformly from that set, avoiding the current problem when another marked problem is available. The list persists in localStorage without account or device sync and stays in sync between lobby tabs; recommendation and general random selection keep their own pools and ignore the practice list.

The draw button and list status remain visible with the problem picker collapsed. A drawn problem can fall outside the difficulty or topic filters; draws keep a manually chosen duration and otherwise apply the drawn problem's suggested one, without rewriting filters or editing the saved list. Later filter changes follow the existing manual-selection rules, and back/forward restore keeps an explicit choice visible, whether picked by card, practice draw, or history's Try again.

Stored IDs are validated against the current problem bank; empty, malformed, or retired lists disable the draw, moving focus to the status when another tab empties the list while the button is focused. Failed or blocked localStorage keeps the list usable for the current visit with a "Kept for this visit only" note. Problem cards get separate selection buttons and labeled checkboxes.

Closes #368.

Written for commit 040c5cf. Summary will update on new commits.

View guided diff

Comment thread scripts/gen-problem-cards.py Outdated
Comment thread web/app.js
@Quinton1230
Quinton1230 marked this pull request as ready for review October 21, 2026 05:28
cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

@jserv
jserv requested review from ColtenOuO and alanhc October 21, 2026 08:42
Comment thread web/app.js
jserv

This comment was marked as resolved.

Comment thread web/app.js
Comment thread web/app.js Outdated
cubic-dev-ai[bot]

This comment was marked as resolved.

Let candidates rehearse a chosen set of exercises without selecting
each next problem by hand. Keep this list in browser storage and draw
from its valid IDs independently of recommendation filters, while
preserving direct selection and a manually chosen interview length.

Closes sysprog21#368
@jserv
jserv merged commit fd7c23c into sysprog21:main Oct 22, 2026
10 checks passed
@jserv

jserv commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Thank @Quinton1230 for contributing!

jserv added a commit that referenced this pull request Oct 22, 2026
Since #401 each card sits in an entry that filtering hides along with
it, but #410's layout test toggled only the card and counted cards by
their attribute, so cards inside hidden entries measured as one row of
57. The test now hides and restores whole entries and counts what is
rendered, and the outline measures the entries the grid lays out.
AchlysChang pushed a commit to AchlysChang/codetrial that referenced this pull request Oct 22, 2026
AchlysChang pushed a commit to AchlysChang/codetrial that referenced this pull request Oct 22, 2026
AchlysChang pushed a commit to AchlysChang/codetrial that referenced this pull request Oct 22, 2026
AchlysChang pushed a commit to AchlysChang/codetrial that referenced this pull request Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let candidates pick a random problem from a saved practice list

2 participants