Skip to content

feat: add editor area tab support for Pixel Agents#72

Open
zxcvbnmmohd wants to merge 1 commit intopablodelucca:mainfrom
zxcvbnmmohd:main
Open

feat: add editor area tab support for Pixel Agents#72
zxcvbnmmohd wants to merge 1 commit intopablodelucca:mainfrom
zxcvbnmmohd:main

Conversation

@zxcvbnmmohd
Copy link

Summary

Enable Pixel Agents to open as full-screen editor tabs (WebviewPanel) in addition to the existing sidebar panel view. Users can now open the pixel art office anywhere in the editor area, just like terminals.

Changes

  • Multi-webview Architecture: Refactored PixelAgentsViewProvider to support multiple simultaneous webviews (sidebar + editor tabs)
  • Shared Agent State: Single agents Map broadcasted across all connected views for real-time synchronization
  • New Command: pixel-agents.openEditorTab - Open office in full-screen editor tab
  • UI Enhancement: Added "⊡ Tab" button to BottomToolbar for quick access
  • Message Broadcasting: All agent state updates sync across sidebar and all open editor tabs
  • Terminal Event Listeners: Global event listeners ensure all views stay synchronized with terminal lifecycle events
  • Backward Compatible: 100% compatible with existing sidebar workflow

Features

✅ Open multiple Pixel Agents editor tabs simultaneously
✅ Arrange tabs in split panes alongside code editor
✅ All tabs stay perfectly synced with live agent updates
✅ Independent camera position per tab (local state)
✅ Seamless sidebar + editor tab coexistence
✅ Proper cleanup when tabs are closed

Technical Details

The implementation:

  • Maintains single provider instance managing all state
  • Uses WebviewPanel API for editor tabs (vs WebviewView for sidebar)
  • Broadcasts messages to all connected webviews
  • Tracks active webview for focus-aware message routing
  • Registers global terminal event listeners (once per session)
  • Properly cleans up editor tabs on close

Testing

✅ TypeScript compilation passes
✅ Build succeeds (esbuild + Vite)
✅ No new linting errors
✅ Backward compatible (existing tests unchanged)

- Enable opening Pixel Agents as full-screen editor tabs (WebviewPanel)
- Refactor PixelAgentsViewProvider to support multiple simultaneous webviews
- Add shared agent state broadcasting across all connected webviews
- Implement unified message handling for sidebar and editor tab views
- Add '⊡ Tab' button to BottomToolbar for quick editor tab access
- Add 'Pixel Agents: Open in Editor Area' command to palette
- Maintain 100% backward compatibility with sidebar view
- All agent state updates now sync across sidebar + all editor tabs
@florintimbuc florintimbuc added type: feature New feature or capability area: webview Webview UI: React, Canvas rendering, sprites, editor labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: webview Webview UI: React, Canvas rendering, sprites, editor type: feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants