Skip to content

feat: add zoning system for workspace folder seat assignment#259

Open
pablodelucca wants to merge 25 commits intorc/v1.4from
feat/zoning
Open

feat: add zoning system for workspace folder seat assignment#259
pablodelucca wants to merge 25 commits intorc/v1.4from
feat/zoning

Conversation

@pablodelucca
Copy link
Copy Markdown
Owner

Summary

  • Paint named zones on the office map and assign workspace folders to them
  • Agents from a folder automatically sit in their zone's seats (zone > unzoned > any seat fallback)
  • Zone definitions and tiles stored in layout.json; folder-to-zone mappings stored in .code-workspace file
  • Folders can be mapped to multiple zones
  • Zone editor tab with color pickers, inline rename, folder assignment cards
  • Zone overlay rendering with labels rendered on top of furniture/characters
  • "Show Zones" settings toggle for visibility outside edit mode
  • pixel-scrollbar CSS utility for consistent scrollbar styling
  • Dropdown component gains direction and maxHeight props
  • Enforces Tailwind-first styling (documented in CLAUDE.md)

Test plan

  • Open a multi-root workspace in Extension Dev Host
  • Open layout editor — Zones tab should appear between Wall and Erase
  • Create zones, paint tiles, verify save/reload persists in layout.json
  • Map folders to zones via card dropdowns, verify .code-workspace file updates
  • Spawn agents from different folders — verify they sit in correct zones
  • Verify fallback: agent from unmapped folder sits in unzoned seat
  • Toggle "Show Zones" in settings — overlay appears/disappears
  • Expand layout — verify zone tiles shift correctly
  • Root folder with custom name (e.g. "name": "root", "path": ".") maps correctly

🤖 Generated with Claude Code

NNTin and others added 25 commits April 5, 2026 16:24
- CarpetTile interface and carpetTiles field in OfficeLayout
- carpetTiles.ts: dual-grid marching squares junction renderer
- assetLoader.ts: loadCarpetTiles() for PNG sprite loading
- Extension wires carpetTilesLoaded message to webview
- useExtensionMessages.ts handles carpetTilesLoaded
- renderer.ts renders carpet junctions after floor tiles
- layoutSerializer.ts includes carpetTiles in save/load

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- editorState.ts: carpet tool with carpetVariant, carpetColor, and carpetDragErasing state
- editorActions.ts: paintCarpet() and eraseCarpet() pure layout ops; also fix expandLayout() to preserve carpetTiles when resizing
- EditorToolbar.tsx: Carpet tab with variant swatches and HSBC color sliders (colorize mode always on)
- OfficeCanvas.tsx: carpet paint/erase mouse event handling (drag support, right-click erase)
- useEditorActions.ts: handleCarpetColorChange, handleCarpetVariantChange, carpet drag logic
- types.ts: CARPET_PAINT added to EditTool
- Layout save: carpetTiles already included via JSON.stringify in serializeLayout — no changes needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SpriteData is already string[][], so SpriteData[][][] was one dimension too
many, causing a type mismatch with the string[][][][] wire format.

Fixes build error: tsc -b caught what tsc --noEmit missed.
…r presets

- Add VisualColorPicker component (SV square + vertical hue rainbow bar) for carpet colors, replacing HSBC sliders
- Move carpet tab inside furniture panel as a category alongside Desks, Chairs, etc.
- Make Pick and Color buttons contextual to active category (carpet vs furniture)
- Fix carpet pick mode deleting carpet on click
- Fix panel closing on repeated clicks (Pick toggle, Carpet tab)
- Add flat colorization for carpets so chosen colors match exactly
- Update default carpet colors to #941919 (main) and #dba35a (accent)
- Add always-available Color button for furniture with pickedFurnitureColor for new placements
- Show color shift preview in furniture thumbnails and ghost placement
- Add Reset button inside ColorPicker panel
- Remove carpet presets

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts from core architecture refactor (#236) — shared/assets/
moved to core/src/assets/, carpet changes ported to new location.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Paint named zones on the office map and assign workspace folders to them.
Agents from a folder automatically sit in their zone's seats (zone seats
first, then unzoned seats, then any seat as fallback). Zone definitions
and tiles are stored in layout.json; folder-to-zone mappings are stored
in the .code-workspace file under a pixel-agents key. Folders can be
mapped to multiple zones. Includes zone editor tab with color pickers,
inline rename, folder assignment cards, zone overlay rendering with
labels on top of furniture, Show Zones settings toggle, and pixel-styled
scrollbar CSS utility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…kspaces

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Renames all zone-related types, functions, constants, props, messages,
and UI text from "zone/Zone" to "area/Area". File rename:
workspaceZonePersistence.ts → workspaceAreaPersistence.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants