Repository navigation
fix: Enable clipboard copy/paste in dashboard terminals - #44
Merged
Merged
Conversation
Fixes GitHub issue #42. Root cause: ttyd terminals embedded in iframes lacked clipboard permissions. Changes: 1. Add allow="clipboard-read; clipboard-write" to all iframe elements in the dashboard templates to grant clipboard access via Permissions Policy 2. Add rightClickSelectsWord=true option to ttyd for better UX - this is standard behavior in macOS applications Files changed: - codev/templates/dashboard-split.html (iframe permissions) - codev-skeleton/templates/dashboard-split.html (iframe permissions) - agent-farm/src/commands/start.ts (ttyd option) - agent-farm/src/commands/util.ts (ttyd option) - agent-farm/src/servers/dashboard-server.ts (ttyd option) Resolves: #42
- Add clipboard permissions to non-split dashboard.html (codev + skeleton) - Add rightClickSelectsWord to spawn.ts builder/shell/worktree functions Addresses review feedback on PR #43
- Test that all dashboard HTML templates include clipboard permissions - Test that all ttyd spawn locations include rightClickSelectsWord - Prevents regression of issue #42 fix 9 new tests added, all passing (44 total)
Contributor
Author
3-Way Review Synthesis (Claude + Codex + Gemini)Verdict: ✅ APPROVEAll three reviewers approve this PR. What's good:
Recommendation before merge:
Ready to merge once manual testing confirms functionality. 🤖 Synthesized from Claude Code, Codex, and Gemini reviews |
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
Fixes GitHub issue #42: Cannot cut and paste from terminals.
Root cause: ttyd terminals embedded in iframes lacked clipboard permissions. The browser's Permissions Policy blocks clipboard access for cross-origin iframes by default.
Changes
1. Dashboard templates - Added clipboard permissions to iframes
codev/templates/dashboard-split.html(lines 784, 898)codev/templates/dashboard.html(lines 91, 122)codev-skeleton/templates/dashboard-split.html(lines 784, 898)codev-skeleton/templates/dashboard.html(lines 91, 122)2. ttyd configurations - Added
rightClickSelectsWord=trueagent-farm/src/commands/start.ts:120agent-farm/src/commands/util.ts:95agent-farm/src/commands/spawn.ts:254,301,616agent-farm/src/servers/dashboard-server.ts:3463. Regression tests
Added
agent-farm/src/__tests__/clipboard.test.tswith 9 tests:Test plan
Resolves: #42