Repository navigation
Copy the show command from Command details - #1187
Merged
Merged
Conversation
Command details now has a Copy CLI button beside its thirdshift show command. When the clipboard is refused, the command is selected so it can be copied with the keyboard.
A live Command refreshes Command details on each change, which cleared the by-hand selection a refused clipboard leaves. The refresh now keeps the copy status and selection. The copy handler keys on data-copy-cli.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Command details has a Copy CLI button beside its
thirdshift show '<command>' --jsonline. It sits in the Peek on the Inbox, history, Security, Logs and Waterfall pages.Seams under test: the Console page in a browser (Playwright,
console/tests/inbox.test.cjs).Evidence
node --test --test-name-pattern "Command details" tests/inbox.test.cjs: 2 failing (waiting for getByRole('button', { name: 'Copy CLI' })timed out).After: 3/3 pass:
thirdshift show '<selector>' --jsonon the clipboard.Command details keeps its fallback selection across a live refreshfailed,actual: ''.After: passes in 3/3 runs. The test now requires the refresh to happen.
npm testinconsole/: 67/67 pass on the final head.cargo test --test console: 72 passed.scripts/affected-tests origin/mainselected the full Rust suite:cargo test --no-fail-faston f561ecf: 2421 passed, 0 failed.tag.gpgsign=falseset in the environment. The machine's globaltag.gpgsign=truemakes threeworktree::synchronization_testsfail withno tag message?, which is unrelated to this change.Merge Danger
Door: two-way
Blast Radius: Peek
The change is client-side only, with no new server action (ADR-0016). Live refresh of Command details now also restores the copy line's status and selection.
Review coverage
origin/main(2b4f35e) as the fixed point, because the localmainref was stale.console/tests/inbox.test.cjs,src/console/assets/console.js,src/console/peek.htmlandconsole/README.md(lines 224–230).Unaddressed findings
Standards
src/console/assets/spans.js:235-239builds the string only for the button), so its fallback prints the line into#span-status.<code>(src/console/peek.html:8), so selecting it is the by-hand path.console.jsowns a widget's clipboard behaviour.console.jsalready owns#peek-contentloading (loadPeek).keepCopy) has to run insideloadPeek, around itsreplaceChildren.data-copy-cliduplicates the<code>text. It is the hook Standards finding 2 asked the handler to key on, and it mirrorsspans.js:239.console/tests/inbox.test.cjs, as the reviewer noted.Spec
None.
Security
None.
Closes #1112
Built with claude · claude-opus-5-5 · high
Security review outcome
No unaddressed introduced findings.