Candidate test cases persist across interviews for the same problem in the same tab
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Observed behavior
When a candidate adds custom test cases during an interview and ends the interview, entering the same problem again within the same browser tab restores the custom test cases from the previous session. Because custom cases are persisted under codetrial.candidateCases.${problem.page} in sessionStorage and are never removed upon concluding an interview, previous test cases unexpectedly bleed into subsequent interview sessions.
Expected behavior
Custom test cases should be scoped to a single interview session. When an interview ends or when the candidate leaves the room, any persisted custom test cases for that problem should be cleared from sessionStorage so that a new interview starts with an empty test case list. Active in-session reloads should continue to preserve candidate test cases.
Reproduction
- From the lobby, select any coding problem (e.g.,
chargeback-pair-matchorTwo Sum) and enter the interview. - Expand the "Add a cases" panel, enter valid inputs (e.g., Input:
[[-3,4,3,90],0], Excepted:[[0,2]]), and click "Add case". - Click "End interview" to conclude the interview.
- Navigate back to the lobby and start another interview on the same problem without closing the tab or restarting the browser.
- Expand "Add a cases" and observe that the case added in step 2 is still displayed.
CodeTrial version
Automated build of https://github.com/sysprog21/codetrial/commit/b491026dd2d779c4e8d82adcfb01ce49c6421a98.
Environment
OS: Windows 10
Broswer: Chrome
Sanitized evidence
Inspecting sessionStorage via the browser developer console after clicking "End interview" reveals that the key is retained:
// In browser console after clicking End interview:
window.sessionStorage.getItem("codetrial.candidateCases.chargeback-pair-match");
// Output: "[{"input":[[-3,4,3,90],0],"expected":[[0,2]]}]"
Public data confirmation
- I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
- Dominant language
- Rust
- Stars
- 160
- Forks
- 64
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 132
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sysprog21/codetrial
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Add a Copy code button to the final reportPossibly taken @yansawu claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
sysprog21/codetrial#318 · 5 comments · 2 reactions · 1 assignee ·
Maintainers usually reply within 1 day
-
Show problem difficulty in past attempt labelsPossibly taken @yuen0428 claimed this today. Open
sysprog21/codetrial#357 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Add keyboard undo and redo to whiteboard interviewsPossibly taken @xuntla claimed this today. Open
sysprog21/codetrial#352 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Let the candidate restore the starter codePossibly taken @RWong04 claimed this 1 day ago. Open
sysprog21/codetrial#348 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in sysprog21/codetrial
Similar issues
-
Make major, minor, and makedev safe on solarish targetsPossibly taken @xtqqczze claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Proxy ignores l5d-retry-http and l5d-retry-grpc conditions that follow a comma and spacePossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 3 days
-
sncast panics when decoding a `u384` valuePossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
foundry-rs/starknet-foundry#4635 ·
Maintainers usually reply within 3 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
crmne/omastats#31 · 1 reaction ·
Maintainers usually reply within 1 day
-
area:desktop priority:p2 type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day