Add a Copy code button to the final report
Maintainers usually reply within 1 day
@yansawu is already working on this.
Since Oct 18, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css, html, javascript
- Domain
- frontend
Research direction
Start with the editor markup in web/interview.html, then find where web/interview.js sets up the editor and its event handlers. Add a button beside the editor that reads the full editor text and writes it with the Clipboard API, showing a brief "Copied!" message, disabling itself when the editor is empty, and catching permission errors. Style it in web/styles.css to match the existing controls. Done means pasting elsewhere gives the exact text, and the editor's content, cursor and selection are unchanged.
Written by the indexing model from the issue text.
Description
Who is affected
Candidates who want to review or reuse their submitted code after completing a coding interview.
The final report already displays the submitted code in the "Your final code" section, but candidates must manually select and copy the text. A one-click copy option would make this more convenient.
Desired outcome
Add a "Copy code" button next to the "Your final code" section in the final interview report.
Candidates can copy their complete submitted code to the clipboard with a single click, without modifying the report or the original code.
Present workaround
Candidates can expand the "Your final code" section, manually select the code, and copy it using Ctrl+C or the context menu.
Alternatively, they can download the Markdown report and copy the code from there.
Scope
- Add a "Copy code" button to the final report's "Your final code" section, generated by
finalCodeMarkup()inweb/render.js. - Handle the clipboard operation and display success or error feedback.
- Keep the existing report layout and download functionality unchanged.
- Do not add a copy button to the code editor during an active interview.
- Do not change how submitted code is stored or persisted.
Acceptance criteria
- The final report displays a "Copy code" button next to the "Your final code" section when code is available.
- Clicking the button copies the complete submitted code to the clipboard, preserving indentation, whitespace, and line breaks.
- After a successful copy, the interface displays brief feedback such as "Copied!".
- If clipboard access fails or is unavailable, the interface displays an appropriate error message without affecting the report.
- The button is disabled or hidden when no code is available.
- Copying code does not modify the displayed code, report content, or existing download functionality.
- Automated tests cover successful copying, clipboard errors, and empty or unavailable code.
Related work
PR #321 addresses preserving final code in local interview history. Until that change is available, reports reopened from Past attempts may display "(final code was not saved)", leaving no code to copy.
This issue focuses only on the copy interaction in the final report, not on code persistence.
Related: #221, #321.
- Dominant language
- Rust
- Stars
- 177
- Forks
- 100
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 138
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 68/100
Maintainers usually reply within 1 day
-
Audio output can be confirmed without playing a test soundPossibly taken @ChenYingHan1121 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
sysprog21/codetrial#359 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Let the candidate mark interviewer lines they did not understandPossibly taken @April-ying claimed this today. Open
sysprog21/codetrial#391 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in sysprog21/codetrial
Similar issues
-
area:cli bug good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aaif-goose/goose#13031 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
meta.json, text.txt and try JSON are written non-atomicallyPossibly taken @qwertymuzaffar claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
qwertymuzaffar/parrot#47 ·
Maintainers usually reply within 1 day
-
priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/photocraft#8041 · 1 comment ·
Maintainers usually reply within 1 day