Skip to content

feat: minimal workbench shell redesign (0166) - #39

Merged
crs48 merged 10 commits into
mainfrom
feat/0166-minimal-workbench-shell
Jun 12, 2026
Merged

feat: minimal workbench shell redesign (0166)#39
crs48 merged 10 commits into
mainfrom
feat/0166-minimal-workbench-shell

Conversation

@crs48

@crs48 crs48 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Implements docs/explorations/0166 — the xNet Workbench: a fixed-region, monochrome, keyboard-first shell that replaces the header + sidebar layout.

What changed

Phase 0 — Foundations (packages/ui)

  • tokens.css rebuilt around a role-named, APCA-checked monochrome ramp (surface-0/1/2, ink-1/2/3, hairline, accent-ink) with all legacy semantic variables aliased onto it. Primary/ring are now monochrome ink; hue survives only for user data (status dots, charts). Includes a true-black OLED variant (ThemeProvider setVariant).
  • 3-role type scale: Inter Variable (UI 13px / prose 16px) + Geist Mono, via fontsource.
  • Shadows removed from primitives and composed components — hairline borders and dimming carry elevation; the modal scrim stays.

Phases 1–2 — Shell + tabs (apps/web/src/workbench/)

  • Fixed regions: Rail (44px) · Left Panel · tabbed Editor Area · contextual Right Panel · Bottom Panel · Status Bar (24px, mono). Persisted zustand store (xnet:workbench:v1) + react-resizable-panels layout persistence.
  • Everything opens as a tab; the router stays authoritative (deep links, back/forward, bookmarks unchanged). Preview-tab semantics (single click previews, editing/double-click promotes), pin, drag-reorder, middle-click close, Ctrl+Tab cycling, one optional split (drag-to-edge or ⌘⇧\). Background tabs are unmounted entirely — zero live Y.Doc subscriptions.
  • Zen mode (⌘., Esc Esc exits) restores the prior layout bit-for-bit.

Phase 3 — Panels

  • Explorer (pinned / recent / virtualized all-items with type filters) replaces the type-siloed sidebar; Tasks and Data left-panel views.
  • Right Panel useContextPanel API: PageView publishes Properties/Comments/Backlinks (comments moved out of the page layout); DatabaseView row detail; CanvasView selection inspector; TasksView task detail.
  • Bottom tray: Shelf, quick capture, notifications, sync activity, and a query console (paste a SavedViewDescriptor/QueryAST → table via SavedViewRunner). Saved views are first-class tabs (/view/$viewId).

Phase 4 — Keyboard & palette

  • GlobalSearch rebuilt on cmdk: quick-open (recents first, full-text pages, all node types), > command mode, chords on every row, ⌘K/⌘P, Escape restores focus. Measured open→focused ~1ms (50ms budget).
  • Shell focus ring: F6/⇧F6 cycle regions; Escape in a panel returns to the editor.

Phase 5 — Unified drag

  • application/x-xnet-node payload (packages/ui/src/dnd/node-transfer.ts) on explorer rows, tabs, My Tasks rows, the database row-detail chip, and the canvas selection pill (drag a card out and you carry its source node — excerpting, not copying).
  • Reference-creating drops: editor → wikilink chip at the drop point, relation cells → link, canvas → source-backed card, tab bar → tab, editor edge → split, Shelf → held reference.

Phase 6 — Extensibility & flip

  • StatusBarContribution added to @xnetjs/plugins; SidebarContributions become rail items/panel views; CommandContributions mirror into the CommandRegistry; configurable startup tab.
  • Flag removed; legacy shell deleted; docs/reference/WORKBENCH.md added.

Validation

  • Full vitest suite: 476 files / 6,465 tests pass; CI editor-ux Playwright specs (desktop + mobile) pass unmodified.
  • Production cold start (reload → interactive editor): 308ms (budget 1.5s); palette ~1ms (budget 50ms).
  • Layout/tabs/zen survive reload bit-for-bit (state-diff verified); back/forward move between tabs.
  • APCA: light ink Lc 105/86/60, dark ink Lc 96/62/32 (dark ink-2/3 brightened vs the exploration table to actually meet the ≥60/≥30 targets); WCAG AA passes for body/secondary.

Deviations from the exploration doc

  • Dark ink-2/ink-3 are #B4B4B4/#7A7A7A (doc's #9A9A9A/#5C5C5C measured Lc 48/19, below its own validation targets).
  • Split is ⌘⇧\ (Mod-|); ⌘\ stays on the right panel per the doc's keyboard map.
  • In-grid row drag stays on dnd-kit (reorder) — rows drag out via the row-detail chip; ProseMirror block drag untouched.
  • Two validation items remain open by nature: a fully mouse-free comment flow (editor selection toolbar is pointer-bound) and the first-run hallway test (needs humans).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Redesigned workbench with tabbed editor, resizable panels, and split-view support
    • Page editor with integrated comment threads, replies, and orphaned comment handling
    • Saved views system for querying and displaying data
    • Improved global search and command palette with keyboard shortcuts
    • Context panels showing selection details, task info, and database rows
    • Zen mode for distraction-free editing
    • Drag-and-drop support across pages, databases, canvases, and shelves
    • Theme variant support including true-black for OLED displays
    • Quick capture tray for fast task creation
    • Explorer panel with pinning and recent items
  • UI Improvements

    • Refined styling with updated monochrome token system
    • Removed drop shadows for cleaner design
    • Enhanced error fallback component
  • Bug Fixes

    • Storage warning banner height tracking
    • Improved node transfer and drag-drop handling

Loading
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