Let candidates inspect and edit saved cases

YA
14h ago
+1080-43

Candidates currently have to remove and re-enter a saved custom case to correct its input or expectation. Show saved expectations and let candidates edit a case in the existing form, preserving its position and slot. Save validates before replacing the case; Cancel restores the unfinished new-case draft. Omitted expectations remain distinct from explicit JSON null.

Block conflicting case mutations and test runs while editing, and refuse late saves after the interview ends. Successful edits and removals share the same result-clearing helper while preserving previous run history and the Practice/Strict storage policy.

Rejected saves focus the invalid input or expectation field. If judge loading fails, focus returns to Save changes so the candidate can retry. Supplied palindrome expectations must be strings, and rejected edits leave the original case and storage unchanged.

Validation:

  • Focused candidate-case suite: 37 passed, 0 failed, 0 skipped.
  • Without Chromium: 1 browser-independent test passed, 36 browser tests skipped, 0 failed.
  • Full Linux ./scripts/test.sh at commit 59d9513, rebased onto main 25a89e3: exit 0; browser suite 1955 passed, 0 failed, 0 skipped.
  • Pointer and keyboard checks passed at 1536x864, 1280x900, 820x740 and 390x844.
  • Credentialed checks and separately ignored Rust browser checks were not run.

Screenshots

Before

Saved custom cases show only their input and a Remove button.
image

After: Saved custom case

image

After: Editing a saved case

image

Closes #468