Skip to content

Copy the visible test results - #698

Open
seallllllllll wants to merge 1 commit into
sysprog21:mainfrom
seallllllllll:submit-copy-test-results
Open

seallllllllll wants to merge 1 commit into
sysprog21:mainfrom
seallllllllll:submit-copy-test-results

Conversation

@seallllllllll

@seallllllllll seallllllllll commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Candidates can copy the currently displayed test results and compiler diagnostics as plain text. The action follows the existing filter, excludes runner and navigation notices, and is unavailable before results exist, while tests run, or after invalidation. Both copy actions share pending-write protection, accessible feedback and clipboard failure handling.

Before a run, the Copy results action is hidden.

截圖 2026-11-22 晚上9 47 50

After a run, Copy results copies the displayed results as plain text and briefly shows "Copied!". This local preview uses the unfinished Python starter, so all five cases fail.

截圖 2026-11-22 晚上9 48 07
Excerpt of the copied plain text
0/5 test cases passed

FAIL nums=[2,7,11,15], target=9 0ms
input [[2,7,11,15],9]
expected [0,1]
got null
FAIL nums=[3,2,4], target=6 0ms
input [[3,2,4],6]
expected [1,2]
got null
FAIL duplicates: nums=[3,3], target=6 0ms
input [[3,3],6]
expected [0,1]
got null
FAIL negatives: nums=[-3,4,3,90], target=0 0ms
input [[-3,4,3,90],0]
expected [0,2]
got null
FAIL zero pair: nums=[0,5,-5,1], target=0 0ms
input [[0,5,-5,1],0]
expected [1,2]
got null

Validation: make indent, make indent-check and Clippy pass. The Linux Rust lane passes with Rust 1.100.0 (2,991 passed, 29 ignored), and the portable lane passes with its reported skips. The focused browser suites pass, and isolated mutations verify pending-write and feedback-timer coverage. Full browser validation remains non-green: Linux reports a Jim scrolling timeout also reproduced on upstream/main; macOS reports five failures, one cancellation and one skip. The two restore-starter failures pass when run alone. Windows clipboard behavior and credentialed integrations have not been run.

Close #598

jserv

This comment was marked as resolved.

jserv

This comment was marked as resolved.

@EricHuang0302 EricHuang0302 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prepared with Codex; checkout, tests and mutation checks were performed by the agent at 29613ec.

node --test tests/browser/results-copy.test.js tests/browser/compiler-diagnostic-navigation.test.js tests/browser/candidate-cases.test.js
43 passed, 0 failed, 0 skipped

Two additional local probes pass on this revision. Each catches its corresponding mutation while the existing tests remain green. The inline comments suggest coverage improvements; no current behavior failure was reproduced.

Comment thread tests/browser/results-copy.test.js Resolved
Comment thread tests/browser/results-copy.test.js Resolved
jserv

This comment was marked as resolved.

@HALA1028 HALA1028 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out 29613ec on Windows 10 and ran the two test files this PR adds copy coverage to. Both have one test that fails there on CRLF line breaks; details and a verified fix are inline.

Comment thread tests/browser/results-copy.test.js Resolved
Comment thread web/render.js Resolved
yangyangyhl

This comment was marked as resolved.

Let candidates reuse compiler diagnostics and visible test results
without selecting panel text manually. Copy only result content so
runner and navigation notices do not pollute diagnostic text. Reuse
the existing copy feedback and keep stale writes from announcing a
newer run.

Close sysprog21#598

Change-Id: I710ec6db2f909943cba3635e79694ea63037de12
@seallllllllll
seallllllllll force-pushed the submit-copy-test-results branch from 29613ec to 68bfbd2 Compare November 22, 2026 06:57
@seallllllllll
seallllllllll marked this pull request as ready for review November 22, 2026 07:17
cubic-dev-ai[bot]

This comment was marked as resolved.

@jserv

jserv commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Add screenshots to the pull request description to illustrate your work, as @ColtenOuO suggests. Example: #349

Comment thread web/styles.css
toggle) keeps it without being listed here. */
:where(
.pill-button:not(:disabled),
.pill-button:not(:disabled):not([aria-disabled="true"]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This selector applies to every .pill-button, not only Copy results. #mic sets aria-disabled="true" while it connects and #audio-heard sets it while playback is pending, so both lose their hover and active styles with this change. That is probably correct, but the description only talks about the copy actions. Mention the wider effect there, and cover one of those controls so the line is not later reverted as unrelated.

@jserv

jserv commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Some review comments on this pull request are not settled yet. Please refine the change per the review comments listed below, reply on each thread with what you changed or why you did not, and mark each thread resolved yourself once it is settled (Resolve conversation, at the bottom of the thread). The pull request stays blocked while review threads are open.

Not addressed at the current head:

Checked at 68bfbd2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Copy results action to the coding test panel

5 participants