The Problem

How did it get to this point?

Every AI-generated output โ€” an ad, a proposal, a report โ€” is the tip of an iceberg. Beneath it: data sources, prompt architectures, demographic targeting, compliance checks, campaign strategy. Today, all of that is invisible. The ZUI makes it navigable.

๐Ÿ”
Editing
The final artifact. Edit, perfect, download.
๐Ÿงฉ
Context
The data behind it. CRM, CMS, prompts.
๐ŸŒ
Industry
The big picture. Strategy, compliance, trends.
Interactive Prototype

The Same Screen, Three Contexts

Click each layer below. Watch how the toolbars, center content, and available actions transform โ€” same spatial layout, completely different function. This is the core UX innovation.

Editing Tools
Architecture Anatomy

How the UI Structure Maps Across Layers

Every layer shares the same spatial layout โ€” top toolbar, left tools, center content, bottom actions. But the function of each slot changes completely based on zoom depth. This is the Slot-Based API + Command Pattern in action.

Left Tools
SelectCropText
Editing Layer ยท >2.0x
The final HTML artifact with direct manipulation
WYSIWYGColor PickerFont ControlsExport HTMLLogo Swap
Properties
StyleLayoutAssets
โ†• ZOOM ยท semantic transition ยท toolbar swap
Left Tools
NavigateConnectFilter
Context Layer ยท 0.5xโ€“2.0x
The data network โ€” CRM, CMS, products, prompts
CRM ContactsCMS ContentProduct DataPrompt WeightsDemographics
Data Panel
SourcesLineageWeights
โ†• ZOOM ยท semantic transition ยท toolbar swap
Left Tools
PanSelectMeasure
Industry Layer ยท <0.5x
The strategic view โ€” campaigns, compliance, market data
Campaign PipelineComplianceMarket TrendsAudit TrailPerformance
Analytics
KPIsHeatmapReports
Technical Briefing

What Needs to Be Built

Six engineering domains, each with specific requirements. This is the build specification for the ZUI environment.

01 โ€” Canvas Engine

Hybrid DOM/WebGL Rendering

WebGL (PixiJS) for the macro environment โ€” grid, nodes, edges. DOM overlay via foreignObject for the Editing Layer โ€” real HTML editing with native browser controls. Must maintain 60fps during pan/zoom.

02 โ€” State Machine

Viewport FSM (XState)

Three strict states bound to zoom thresholds. Transitions trigger toolbar slot swaps, data fetching, and rendering fidelity changes. No hybrid states โ€” the UI is always deterministically in one layer.

03 โ€” UI Architecture

Slot API + Command Pattern

Empty toolbar slots filled dynamically based on layer state. Buttons are agnostic shells โ€” they receive Command objects from the active layer. Same button positions, completely different functions.

04 โ€” Mobile

Touch Gestures + dvh Units

Pinch-to-zoom with correct affine math. Single-finger pan. 100dvh sizing to handle mobile toolbar appearance/disappearance. Minimap for spatial orientation on small screens.

05 โ€” Data Provenance

DAG Visualization + XAI

Node-based directed acyclic graph showing data lineage. Traceable connections from CRM/CMS inputs to final output features. Confidence indicators, counterfactual overlays, progressive disclosure.

06 โ€” Performance

Spatial Indexing + Virtualization

Quadtree/R-tree for viewport-bound data loading. Only fetch and render what's visible. Aggressive memoization. Decouple viewport transforms from React render cycles.

Concrete Example

The Supermarket Ad โ€” Layer by Layer

Walking through a single use case to show exactly how the ZUI works when a user wants to understand and edit an AI-generated advertisement.

3.0x
Edit

The Ad Itself

Full interactive HTML preview of "Summer BBQ Sale" banner. User clicks headline to edit text, picks the CTA button color, swaps the logo via URL input, adjusts typography. Downloads the final HTML with one click.

Toolbar: Text ยท Color Picker ยท Download HTML ยท Logo Link ยท Undo/Redo

โ†‘ zoom out ยท the user asks "why this color?" ยท the answer is below โ†“
1.0x
Context

The Data That Shaped It

Node graph showing: CRM segment (families, 25-45, suburban) โ†’ color preference model โ†’ this specific green. CMS product feed โ†’ "charcoal grill" hero image โ†’ background removal โ†’ brand-styled composite. Prompt chain: "Generate summer BBQ ad targeting suburban families" with weight adjustments.

Toolbar: Add CRM Source ยท Refresh CMS ยท Adjust Prompt Weights ยท Filter Demographics

โ†‘ zoom out ยท the user asks "why this demographic?" ยท the answer is below โ†“
0.2x
Industry

The Strategic Picture

National summer campaign pipeline. This ad is one of 47 regional variants. Compliance: checked against advertising standards. Market intel: competitor pricing data shows BBQ equipment demand peaks week 22-26. Supply chain: warehouse stock levels by region.

Toolbar: Export Pipeline ยท View Audit Log ยท Analytics Overlay ยท Trigger Campaign

Mobile Strategy

The Same Experience, Smaller Screen

The spatial canvas must be preserved on mobile โ€” no collapsing to a vertical list. Instead: adapted touch gestures, simplified toolbars, and orientation helpers.

Gestures

Native Touch Math

Pinch-to-zoom with focal point tracking. Single-finger pan. Pull-to-refresh and native zoom disabled.

Viewport

100dvh ยท No Clip

Dynamic viewport units prevent Safari/Chrome toolbar from clipping the interface.

Orientation

Minimap + Breadcrumbs

Always-visible minimap. Spatial breadcrumbs show zoom depth. Edge indicators for off-screen nodes.

Toolbars

Bottom Sheet Pattern

On mobile, toolbars collapse to a bottom sheet with swipe-up reveal. Context-aware, same Command pattern.