Peekaboo/tests/unit/tools
Peter Steinberger dd680eb638 feat: Improve window title matching and error messages for URLs with ports
When users search for windows with URLs containing ports (e.g., 'http://example.com:8080'),
the system now provides much better debugging information when the window isn't found.

Key improvements:
- Enhanced window not found errors now list all available window titles
- Added specific guidance for URL-based searches (try without protocol)
- New CaptureError.windowTitleNotFound with detailed debugging info
- Comprehensive test coverage for colon parsing in app targets
- Better error messages help users understand why matching failed

Example improved error:
"Window with title containing 'http://example.com:8080' not found in Google Chrome.
Available windows: 'example.com:8080 - Google Chrome', 'New Tab - Google Chrome'.
Note: For URLs, try without the protocol (e.g., 'example.com:8080' instead of 'http://example.com:8080')."

This addresses the common issue where browsers display simplified URLs in window titles
without the protocol, making it easier for users to find the correct matching pattern.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 08:09:47 +01:00
..
analyze-edge-cases.test.ts test: Add comprehensive edge case tests for image and analyze tools 2025-06-08 06:50:10 +01:00
analyze.test.ts accept path as silent fallback parameter 2025-06-08 04:05:13 +01:00
defensive-format-validation.test.ts fix: Add defensive validation for invalid image formats with automatic PNG fallback 2025-06-08 07:44:17 +01:00
edge-case-fixes.test.ts fix: Handle edge cases for invalid screen index and JSON null paths 2025-06-08 07:53:21 +01:00
image-edge-cases.test.ts Fix tests to match new executeSwiftCli signature with timeout parameter 2025-06-08 07:24:02 +01:00
image.test.ts Fix tests to match new executeSwiftCli signature with timeout parameter 2025-06-08 07:24:02 +01:00
improved-window-error-messages.test.ts feat: Improve window title matching and error messages for URLs with ports 2025-06-08 08:09:47 +01:00
invalid-format.test.ts fix: Add defensive validation for invalid image formats with automatic PNG fallback 2025-06-08 07:44:17 +01:00
list.test.ts Fix array parameter parsing for include_window_details 2025-06-08 07:40:14 +01:00
multiple-app-matches.test.ts feat: Capture all windows from multiple exact app matches instead of erroring 2025-06-08 08:00:44 +01:00
path-traversal-error-handling.test.ts fix: Correct error handling for path traversal and file system errors 2025-06-08 08:05:03 +01:00
window-title-matching.test.ts feat: Improve window title matching and error messages for URLs with ports 2025-06-08 08:09:47 +01:00