Skip to content

Keep a drawn problem the new filter still shows - #227

Merged
jserv merged 1 commit into
sysprog21:mainfrom
ColtenOuO:fix/keep-pick-on-difficulty-change
Oct 3, 2026
Merged

jserv merged 1 commit into
sysprog21:mainfrom
ColtenOuO:fix/keep-pick-on-difficulty-change

Conversation

@ColtenOuO

@ColtenOuO ColtenOuO commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Checking or unchecking a difficulty in the lobby redrew the recommended problem even when that problem's level was still checked. For example, adding Hard to look at it replaced the Medium problem already on screen. Only a problem picked by hand was kept. Now any problem whose level is still checked is kept, and the lobby redraws only when the change hides it.


Summary by cubic

Fixes the lobby redrawing a recommended problem when a difficulty filter change still includes it. Previously only a problem picked by hand survived a filter change; a drawn problem was replaced even when its level stayed checked. Any problem whose level is still selected is now kept, and the lobby re-picks only when the change hides it. A kept drawn problem is held like a hand pick, except while the history is still loading, when the refreshed reports get to decide again.

Written for commit b7c541c. Summary will update on new commits.

Review in cubic

cubic-dev-ai[bot]

This comment was marked as resolved.

@ColtenOuO
ColtenOuO force-pushed the fix/keep-pick-on-difficulty-change branch from a5b7279 to 36eb1b7 Compare October 2, 2026 21:27
Comment thread tests/browser/lobby.test.js Outdated
Comment thread web/app.js Outdated
Ticking or unticking a difficulty redrew the recommended problem even
when its own level stayed checked, so widening the filter to look at
Hard threw away the Medium problem already on screen. Only a problem
picked by hand survived that. Now any problem whose level is still
checked stays, and a redraw happens only when the change hides it.

A kept draw is not turned into a hand pick, which would stand for good.
It is held against the reports it was drawn from, since the roll no
longer draws it and returning from the preflight would otherwise swap
it. Once refreshed reports differ, as when the interview just passed
it, the lobby draws again.
@ColtenOuO
ColtenOuO force-pushed the fix/keep-pick-on-difficulty-change branch from 36eb1b7 to b7c541c Compare October 3, 2026 10:30
@ColtenOuO
ColtenOuO requested a review from jserv October 3, 2026 10:34
@jserv
jserv merged commit 11ccd01 into sysprog21:main Oct 3, 2026
6 checks passed
@jserv

jserv commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thank @ColtenOuO for contributing!

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.

2 participants