Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add a Copy code button to the final report

Open Beginner friendly
#318 5 comments 2 reactions 1 assignee View on GitHub

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() in web/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

  1. The final report displays a "Copy code" button next to the "Your final code" section when code is available.
  2. Clicking the button copies the complete submitted code to the clipboard, preserving indentation, whitespace, and line breaks.
  3. After a successful copy, the interface displays brief feedback such as "Copied!".
  4. If clipboard access fails or is unavailable, the interface displays an appropriate error message without affecting the report.
  5. The button is disabled or hidden when no code is available.
  6. Copying code does not modify the displayed code, report content, or existing download functionality.
  7. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sysprog21/codetrial

All issues in sysprog21/codetrial

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.