Repository navigation
Test the code card's copy action without the system clipboard - #286
Merged
Merged
Conversation
shortCodeCardHasTightGeometryAndCopiesExactOriginal wrote to NSPasteboard.general and read it back. On the sidequery/mono runners the read has returned nil since 2026-10-26, on every runner and with the same pinned code that passed there the day before, so the Memex runtime integration job has been red since then. The test also overwrote and then restored whatever the developer had last copied. CodeContentView now sends the copied code through a replaceable copyToClipboard closure that defaults to the general pasteboard, and the test substitutes it.
Clippy in Rust 1.100 extends needless_bool to an `if` that returns true followed by a trailing false, so CI's `cargo clippy -- -D warnings` fails on this closure. Behaviour is unchanged.
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.
shortCodeCardHasTightGeometryAndCopiesExactOriginalwrote toNSPasteboard.generaland read it back. In sidequery/mono's "Memex runtime integration" job that read has returned nil since 2026-10-26: the job passed on every runner through 2026-10-25 and has failed on every runner since, with the same pinned Memex revision, and this is the only test that fails in the recent runs. So the runners stopped giving tests a usable clipboard, and that job has been red for every change to the agent packages.The test also overwrote and then restored whatever the developer had last copied.
CodeContentViewnow sends the copied code through acopyToClipboardclosure that defaults to the general pasteboard, and the test replaces it. The other two clipboard call sites are untouched.Checked locally: with
MEMEX_HISTORY_ONLY=1, the changed test andcodeDisplayRemovesOnlyOneTerminalNewlinepass;cargo fmt --checkandcargo clippy -- -D warningspass. Not checked here: the runtime-enabled build and the full suite. The real check is the mono job with its pin on this commit, which is being run from a draft pin bump in sidequery/mono.This targets
native-conversation-workspacesbecause that is the branch sidequery/mono pins.