GUI packages, examples, and documentation for building desktop applications with Go and web technologies. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9.4 KiB
9.4 KiB
Display Server Features for Claude Code Integration
This document tracks the implementation of display server features that enable AI-assisted development workflows.
Status Legend
- Not started
- Complete
- [~] In progress
Window Management
Core Window Operations
window_list- List all windows with positions/sizeswindow_get- Get specific window infowindow_position- Move window to coordinateswindow_size- Resize windowwindow_bounds- Set position + size in one callwindow_maximize- Maximize windowwindow_minimize- Minimize windowwindow_restore- Restore from maximized/minimizedwindow_focus- Bring window to front- Window state persistence (remembers position across restarts)
Extended Window Operations
window_create- Create new window at specific position with URLwindow_close- Close a window by namewindow_visibility- Show/hide window without closingwindow_title_set- Change window title dynamicallywindow_title_get- Get current window title (returns window name)window_always_on_top- Pin window above otherswindow_background_colour- Set window background color with alpha (transparency)window_fullscreen- Enter/exit fullscreen mode
Screen/Monitor Management
Screen Information
screen_list- List all screens/monitorsscreen_get- Get specific screen by IDscreen_primary- Get primary screen infoscreen_work_area- Get usable area (excluding dock/menubar)screen_at_point- Get screen containing a pointscreen_for_window- Get screen a window is on
Layout Management
Layout Operations
layout_save- Save current window arrangement with a namelayout_restore- Restore a saved layout by namelayout_list- List saved layoutslayout_delete- Delete a saved layoutlayout_get- Get details of a specific layout
Smart Layout
layout_tile- Auto-tile windows (left/right/top/bottom/quadrants/grid)layout_stack- Stack windows in cascade patternlayout_beside_editor- Position window beside detected IDE windowlayout_suggest- Given screen dimensions, suggest optimal arrangementlayout_snap- Snap window to screen edge/corner/center
AI-Optimized Layout
screen_find_space- Find empty screen space for new windowwindow_arrange_pair- Put two windows side-by-side optimallylayout_workflow- Preset layouts: "coding", "debugging", "presenting", "side-by-side"
WebView/Browser Features
JavaScript Execution
webview_eval- Execute JavaScript and return resultwebview_list- List all webview windows
Console & Errors
webview_console- Get console messages (log, warn, error, info)webview_errors- Get structured JS errors with stack traceswebview_clear_console- Clear console buffer
DOM Inspection
webview_query- Query elements by CSS selectorwebview_dom_tree- Get full DOM tree structurewebview_element_info- Get detailed info about an elementwebview_highlight- Visually highlight an element (debugging)webview_computed_style- Get computed styles for element
Interaction
webview_click- Click element by selectorwebview_type- Type into elementwebview_navigate- Navigate to URL/routewebview_scroll- Scroll to element or positionwebview_hover- Hover over elementwebview_select- Select option in dropdownwebview_check- Check/uncheck checkbox
Page Information
webview_source- Get page HTML sourcewebview_url- Get current URLwebview_title- Get page titlewebview_screenshot- Capture rendered page as imagewebview_screenshot_element- Capture specific element as imagewebview_pdf- Export page as PDF (using html2pdf.js)webview_print- Open native print dialog
Network & Performance
webview_network- Get network requests log (via Performance API)webview_network_clear- Clear network logwebview_network_inject- Inject fetch/XHR interceptor for detailed loggingwebview_performance- Get performance metrics (load time, memory)webview_resources- List loaded resources (scripts, styles, images)
DevTools
webview_devtools_open- Open DevTools for windowwebview_devtools_close- Close DevTools
System Integration
Clipboard
clipboard_read- Read clipboard text contentclipboard_write- Write text to clipboardclipboard_read_image- Read image from clipboardclipboard_write_image- Write image to clipboardclipboard_has- Check clipboard content typeclipboard_clear- Clear clipboard contents
Notifications
notification_show- Show native system notification (macOS/Windows/Linux)notification_permission_request- Request notification permissionnotification_permission_check- Check notification authorization statusnotification_clear- Clear notificationsnotification_with_actions- Interactive notifications with buttons
Dialogs
dialog_open_file- Show file open dialogdialog_save_file- Show file save dialogdialog_open_directory- Show directory pickerdialog_message- Show message dialog (info/warning/error) (via notification_show)dialog_confirm- Show confirmation dialog- [~]
dialog_prompt- Show input prompt dialog (not supported natively in Wails v3)
Theme & Appearance
theme_get- Get current theme (dark/light)theme_set- Set application themetheme_system- Get system theme preferencetheme_on_change- Subscribe to theme changes (via WebSocket events)
Focus & Events
Focus Management
window_focused- Get currently focused windowfocus_set- Set focus to specific window (alias for window_focus)
Event Subscriptions (WebSocket)
event_subscribe- Subscribe to events (via WebSocket /events endpoint)event_unsubscribe- Unsubscribe from eventsevent_info- Get WebSocket event server info- Events:
window.focus,window.blur,window.move,window.resize,window.close,window.create,theme.change
System Tray
tray_set_icon- Set tray icon (base64 PNG)tray_set_tooltip- Set tray tooltiptray_set_label- Set tray label texttray_set_menu- Set tray menu items (with nested submenus)tray_info- Get tray status infotray_show_message- Show tray balloon notification
Implementation Priority
Phase 1 - Core Display Server (DONE)
- Window list/get/position/size/bounds
- Window maximize/minimize/restore/focus
- Window state persistence
- HTTP REST bridge for tools
Phase 2 - Enhanced Windows (DONE)
- window_create, window_close
- window_visibility, window_always_on_top
- screen_work_area, window_fullscreen, window_title
Phase 3 - Layouts (DONE)
- layout_save, layout_restore, layout_list
- layout_delete, layout_get
- layout_tile, layout_beside_editor (future)
Phase 4 - WebView Debug (DONE)
- webview_screenshot, webview_screenshot_element
- webview_url, webview_source, webview_title
- webview_dom_tree, webview_element_info, webview_computed_style
- webview_scroll, webview_hover, webview_select, webview_check
- webview_highlight, webview_errors
- webview_performance, webview_resources
- webview_network, webview_devtools (future)
Phase 5 - System Integration (DONE)
- clipboard_read, clipboard_write, clipboard_has, clipboard_clear
- notification_show (native + dialog fallback)
- notification_permission_request, notification_permission_check
- dialog_open_file, dialog_save_file, dialog_open_directory, dialog_confirm
- theme_get, theme_system
Phase 6 - Events & Real-time (DONE)
- WebSocket event subscriptions (/events endpoint)
- Real-time window tracking (focus, blur, move, resize, close, create)
- Theme change events
- focus_set, screen_get, screen_primary, screen_at_point, screen_for_window
Phase 7 - Advanced Features (DONE)
window_background_colour- Window transparency via RGBA alphalayout_tile- Auto-tile windows in grid/halves/quadrantslayout_snap- Snap windows to edges/corners/centerlayout_stack- Cascade windows in stacked patternlayout_workflow- Preset layouts (coding/debugging/presenting)webview_network- Network request loggingwebview_network_clear- Clear network logwebview_network_inject- Detailed fetch/XHR interceptorwebview_pdf- Export page as PDFwebview_print- Native print dialogtray_set_icon- Set tray icon dynamicallytray_set_tooltip- Set tray tooltiptray_set_label- Set tray labeltray_set_menu- Set tray menu itemstray_info- Get tray status
Phase 8 - Remaining Features (Future)
- window_opacity (true opacity if Wails adds support)
- layout_beside_editor, layout_suggest
- webview_devtools_open, webview_devtools_close
- clipboard_read_image, clipboard_write_image
- notification_with_actions, notification_clear
- tray_show_message - Balloon notifications