[Bug]: Right-click URL opens wrong URL from clipboard instead of clicked URL
Current Behavior
When right-clicking on a URL in the terminal:
- The clicked URL gets copied to clipboard (same as other text)
- Context menu shows "Open Clipboard URL {URL}"
- The URL shown in the menu is from the previous clipboard content, not the clicked URL
- Clicking the option opens the wrong URL
This creates confusion because users expect to open the URL they clicked on.
Expected Behavior
When right-clicking on a URL in the terminal, should show option to open that specific URL.
Expected: Menu shows "Open https://github.com" when right-clicking on https://github.com
Steps To Reproduce
- Copy non-URL text to clipboard (e.g., "example")
- Display URL1 in terminal:
echo "https://example.com" - Right-click URL1 → No "Open Clipboard URL" option appears (user confused)
- Display URL2 in terminal:
echo "https://github.com" - Right-click URL2 → Shows "Open Clipboard URL https://example.com" (wrong URL)
Wave Version
v0.11.6 (202509221832)
Platform
macOS
OS Version/Distribution
macOS Sequoia
Architecture
arm64
Anything else?
This affects workflows where users expect to quickly open URLs from terminal output (logs, API responses, etc.).
Questionnaire
- [ ] I'm interested in fixing this myself but don't know where to start
- [ ] I would like to fix and I have a solution
- [ ] I don't have time to fix this right now, but maybe later
Ah, maybe we're caching the URL somehow when the menu is created? That's weird... will try to reproduce it and fix. Thanks for posting.
just reviewing bugs and came across this again. was able to repro it. the "problem" is that we do copy-on-select in the terminal w/ a debounce. so the second time you right click an URL you get the "Open Clipboard URL", but it is always the last one you selected.
Thanks for the detailed explanation! I understand the timing issue now. Looking forward to the fix whenever you have time. Great work on Wave Terminal! 👍