Repository navigation
fix: report tool-card clipboard failures and stale copy feedback - #73
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <[email protected]>
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.
Tool-card input and output Copy buttons now report pending operations and clipboard failures, with a retry message that stays visible when the section is closed. New streamed text clears previous feedback, and delayed responses from superseded copy attempts cannot overwrite feedback for the current text.
Part of #2.
Closes #72.
Verification
bun install --frozen-lockfilepassed.mise exec -- bun run lintpassed.mise exec -- bun run typecheckpassed.mise exec -- bun run test:unitpassed, 94 tests across 10 files.mise exec -- bun run test:integrationpassed, 99 tests across 13 files.mise run buildpassed, including the production bundle.git diff --checkpassed.Proof
Local app launch and screenshot capture are blocked by the incomplete Electron runtime installation. Hosted macOS Playwright capture succeeded on commit
fcbcff2, with every Electron test passing.The artefact contains four new PNGs under
Users/runner/work/pidex/pidex/test-results/tool-preview/.tool-copy-input-failed.pngshows the input retry message below a closed Input section at the native desktop size.tool-copy-output-failed.pngshows the output retry message with both sections closed.tool-copy-input-failed-narrow.pngandtool-copy-output-failed-narrow.pngshow those messages at the native 900 by 600 minimum window size.All four screenshots were downloaded, visually reviewed and copied to local
.tmp/proof/. The messages and Copy buttons remain readable at both window sizes. No scratch captures are committed. Inline image upload is blocked because the browser access host is unavailable; the screenshots are uploaded through the existing CI artefact workflow and linked above.New component coverage
reports a failed %s copy while collapsed and allows retrying the complete text, for input and output, including diff input and long output.explains a missing clipboard API and keeps input feedback independent of output.announces pending copying and prevents repeated writes until it settles.ignores a superseded clipboard %s after streamed output changes, for success and rejection.clears previous feedback on text changes and cancels the previous success timeout.The new Electron cases deny input and output clipboard writes, activate Copy using the keyboard, capture desktop and native minimum-window failure states, then restore the real clipboard and verify the exact complete text on retry. A failed clipboard write is simulated only inside the test, without a production flag or API change.
Copy feedback is transient and resets when a transcript row is recycled. A pending clipboard write cannot be cancelled, so changing output invalidates its feedback rather than claiming the newer text was copied. This slice leaves the parent open for remaining tool-card work.