Adds revolutionary features for MCP client identification and browser automation:
MCP Client Debug System:
- Floating pill toolbar with client identification and session info
- Theme system with 5 built-in themes (minimal, corporate, hacker, glass, high-contrast)
- Custom theme creation API with CSS variable overrides
- Cross-site validation ensuring toolbar persists across navigation
- Session-based injection with persistence across page loads
Voice Collaboration (Prototype):
- Web Speech API integration for conversational browser automation
- Bidirectional voice communication between AI and user
- Real-time voice guidance during automation tasks
- Documented architecture and future development roadmap
Code Injection Enhancements:
- Model collaboration API for notify, prompt, and inspector functions
- Auto-injection and persistence options
- Toolbar integration with code injection system
Documentation:
- Comprehensive technical achievement documentation
- Voice collaboration architecture and implementation guide
- Theme system integration documentation
- Tool annotation templates for consistency
This represents a major advancement in browser automation UX, enabling
unprecedented visibility and interaction patterns for MCP clients.
Video Recording Enhancements:
- Add intelligent recording modes: smart, continuous, action-only, segment
- Implement automatic viewport matching to eliminate gray borders in videos
- Add pause/resume functionality with manual and automatic control
- Default to 1280x720 HD recording with auto-viewport matching
- Enhanced browser_start_recording with autoSetViewport parameter
Smart Recording System:
- Smart mode: Auto-pause during waits, resume during actions (perfect for demos)
- Action-only mode: Only record during browser interactions
- Segment mode: Create separate video files for each action sequence
- Continuous mode: Traditional behavior with optional manual pause/resume
Tool Enhancements:
- Comprehensive descriptions for all video recording tools
- Professional context and use case guidance
- Integration with browser_wait_for for recordDuringWait parameter
- Action-aware recording in navigation and interaction tools
- Enhanced browser_recording_status with mode and viewport info
Documentation & Testing:
- Complete best practices guide for video recording workflows
- Viewport matching diagnostic and setup scripts
- Recommended video sizes and quality settings
- Gray border problem solution with automatic viewport matching
Solves the gray border issue by ensuring browser viewport matches video
recording dimensions, creating professional full-frame demo videos.
Implements dynamic snapshot configuration that MCP clients can control during
sessions without requiring server restarts or CLI changes.
New tool: browser_configure_snapshots
- Configure includeSnapshots, maxSnapshotTokens, differentialSnapshots at runtime
- Changes take effect immediately for subsequent tool calls
- Shows current settings when called with no parameters
- Provides helpful tips and usage guidance
Key improvements:
1. **Runtime Configuration**: Update snapshot behavior during active sessions
2. **Client Control**: MCP clients can adapt to different workflows dynamically
3. **Immediate Effect**: No server restart required - changes apply instantly
4. **State Tracking**: Context maintains current session configuration
5. **User Friendly**: Clear feedback on current settings and changes
Updated tool descriptions:
- All interactive tools now mention "configurable via browser_configure_snapshots"
- Removed references to CLI-only configuration
- Enhanced browser_snapshot description for explicit snapshots
Benefits for users:
🔄 Dynamic configuration without restarts
🎛️ Client-controlled snapshot behavior
📊 View current settings anytime
⚡ Instant configuration changes
🎯 Adapt settings per workflow/task
Example usage:
```json
{
"includeSnapshots": false,
"maxSnapshotTokens": 25000,
"differentialSnapshots": true
}
```
This transforms snapshot configuration from static CLI options into a flexible
session management system that adapts to client needs in real-time.
Co-Authored-By: Claude <noreply@anthropic.com>
Implements comprehensive solution for browser_click and other interactive tools
returning massive responses (37K+ tokens) due to full page snapshots.
Features implemented:
1. **Snapshot size limits** (--max-snapshot-tokens, default 10k)
- Automatically truncates large snapshots with helpful messages
- Preserves essential info (URL, title, errors) when truncating
- Shows exact token counts and configuration suggestions
2. **Optional snapshots** (--no-snapshots)
- Disables automatic snapshots after interactive operations
- browser_snapshot tool always works for explicit snapshots
- Maintains backward compatibility (snapshots enabled by default)
3. **Differential snapshots** (--differential-snapshots)
- Shows only changes since last snapshot instead of full page
- Tracks URL, title, DOM structure, and console activity
- Significantly reduces token usage for incremental operations
4. **Enhanced tool descriptions**
- All interactive tools now document snapshot behavior
- Clear guidance on when snapshots are included/excluded
- Helpful suggestions for users experiencing token limits
Configuration options:
- CLI: --no-snapshots, --max-snapshot-tokens N, --differential-snapshots
- ENV: PLAYWRIGHT_MCP_INCLUDE_SNAPSHOTS, PLAYWRIGHT_MCP_MAX_SNAPSHOT_TOKENS, etc.
- Config file: includeSnapshots, maxSnapshotTokens, differentialSnapshots
Fixes token overflow errors while providing users full control over
snapshot behavior and response sizes.
Co-Authored-By: Claude <noreply@anthropic.com>