Newly-added problems don't show up in the WTI-UI #1033
Labels
bug
Something isn't working
medium-high
Should be consider for next release
WTI-UI
This bug or feature request applies to the WTI-UI (browser-side).
Describe the issue:
If the Admin adds a problem to the contest, the new problem doesn't immediately appear in the WTI-UI "Select Problem" dropdown list (which is implemented by the TypeScript class
ProblemSelectorComponent
defined in fileproblem-selector.component.ts
).For example, on the
Runs
page there is a "Filters" pane which includes a dropdown list of the current problems. If a problem gets added by the Admin, that dropdown should immediately reflect the added problem -- but it doesn't.To Reproduce:
--load sumithello
.Expected behavior:
The new problem should appear in the list of selectable problems.
Actual behavior:
The new problem does not appear in the dropdown list.
Environment:
PC2 version 9.10.0-7065 (Dec 2024 Public Release)
Windows 11
Chrome Version 131.0.6778.109 (Official Build) (64-bit)
Additional context:
This issue can also be reproduced by clicking on the "Submit Problem" button (on the
Runs
page) and observing the "Select Problem" dropdown list on that pane before and after the new problem is added; it can also be reproduced by selecting the "Clarifications" menu and making similar before/after observations on the "Select Problem" dropdown on that page. (This makes sense; "Select Problem" is a [single] shared component; it has the same behavior everywhere).Important note: switching to another page (e.g. "Scoreboard") and back does cause the Select Problem dropdown to show the added problem; the issue is that the problem-selector component isn't being dynamically updated (but switching to another page and back causes a NEW INSTANCE of the problem-selector component to be constructed, and that new instance queries the server and gets the updated problem list).
It appears that the Select Problem component needs to be modified so that it gets notified when the problem set changes; such a change needs to invoke
loadProblems()
to get the (new) problem list.The text was updated successfully, but these errors were encountered: