# Nexus Design System 2.0 + Window Framework — Evidence Summary

**Date:** 2026-06-05  
**Scope:** UI / design system / window framework only (no backend, identity, agent, or feature logic changes)

## Build status

```
dotnet build source/nexus-shell/NexusShell/NexusShell.csproj -c Release
```

**Result: PASS** (0 errors, pre-existing warnings only)

## Components created

| Component | Path |
|-----------|------|
| Design tokens (DS2) | `source/nexus-shell/NexusShell/Themes/NexusDesignSystem2.xaml` |
| NexusWindow | `source/nexus-shell/NexusShell/Controls/NexusWindow.cs` |
| NexusTitleBar | `source/nexus-shell/NexusShell/Controls/NexusTitleBar.xaml` |
| NexusContentLayout | `source/nexus-shell/NexusShell/Controls/NexusContentLayout.xaml` |
| NexusSideNav | `source/nexus-shell/NexusShell/Controls/NexusSideNav.xaml` |
| NexusCommandBar | `source/nexus-shell/NexusShell/Controls/NexusCommandBar.xaml` |
| NexusCard | `source/nexus-shell/NexusShell/Controls/NexusCard.xaml` |
| NexusButton | `source/nexus-shell/NexusShell/Controls/NexusButton.xaml` |
| NexusIconButton | `source/nexus-shell/NexusShell/Controls/NexusIconButton.xaml` |
| NexusSearchBox | `source/nexus-shell/NexusShell/Controls/NexusSearchBox.xaml` |
| NexusDataTable | `source/nexus-shell/NexusShell/Controls/NexusDataTable.xaml` |
| NexusPreviewPanel | `source/nexus-shell/NexusShell/Controls/NexusPreviewPanel.xaml` |
| NexusStatusBadge | `source/nexus-shell/NexusShell/Controls/NexusStatusBadge.xaml` |
| NexusEmptyState | `source/nexus-shell/NexusShell/Controls/NexusEmptyState.xaml` |
| NexusToast | `source/nexus-shell/NexusShell/Controls/NexusToast.xaml` |
| NexusModal | `source/nexus-shell/NexusShell/Controls/NexusModal.xaml` |
| NexusProgress | `source/nexus-shell/NexusShell/Controls/NexusProgress.xaml` |
| NexusTabs | `source/nexus-shell/NexusShell/Controls/NexusTabs.xaml` |

### Evidence capture support

| File | Purpose |
|------|---------|
| `Services/EvidenceScreenshotService.cs` | RenderTargetBitmap PNG capture (installer pattern) |
| `Services/DesignEvidenceCaptureRunner.cs` | Opens each app window and saves screenshots |
| `App.xaml.cs` | `--capture-design-evidence` startup flag |

## Design tokens (NexusDesignSystem2.xaml)

Semantic tokens aligned with `NexusDesignTokens.xaml` and installer `InstallerResources.xaml`:

- **Colors:** `Nexus.Background`, `Nexus.Surface`, `Nexus.SurfaceGlass`, `Nexus.Border.Cyan`, `Nexus.Border.Purple`, `Nexus.Text.Primary`, `Nexus.Text.Secondary`, `Nexus.Accent.Cyan`, `Nexus.Accent.Purple`, `Nexus.Glow.Primary`
- **Spacing:** `Nexus.Spacing.*`, `Nexus.Padding.*`
- **Radius:** `Nexus.Radius.*`
- **Typography:** `Nexus.Font.*`, `Nexus.Text.TitleStyle`, `Nexus.Text.SubtitleStyle`
- **Effects:** `Nexus.Shadow.*`, `Nexus.Glow.Accent`
- **Animation:** `Nexus.Animation.*`
- **ZIndex:** `Nexus.ZIndex.*`
- **Window template:** implicit `NexusWindow` style with shell chrome, ambient glow, title bar, content layout, optional footer

Merged in `App.xaml` after `NexusDesignTokens.xaml`.

## Window framework standard

```
NexusWindow
├─ NexusTitleBar (icon, name, subtitle, min/max/close — no Windows chrome)
├─ NexusContentLayout
│  ├─ SideNav (optional)
│  ├─ MainContent
│  └─ RightPanel (optional)
└─ FooterContent (optional)
```

All first-party app windows now inherit `NexusWindow` and use `NexusTitleBar` via the shared template. Duplicate per-window chrome XAML (close button styles, shell borders, ambient ellipses, header drag handlers) removed.

## Apps migrated to NexusWindow

| App | Window | Notes |
|-----|--------|-------|
| Files | `NexusFilesWindow` | Full glass shell + title bar |
| Settings | `NexusSettingsWindow` | Footer with `NexusButton` save/close |
| Store | `NexusStoreWindow` | Title/subtitle from ViewModel |
| Device Manager | `NexusDeviceManagerWindow` | Title/subtitle from ViewModel |
| Browser | `NexusBrowserWindow` | `ShowAmbientGlow=False`, flat shell |
| Photos | `NexusPhotosWindow` | Full glass shell |
| Media | `NexusMediaWindow` | Version subtitle binding |
| Calculator | `NexusCalculatorWindow` | Fixed size, `ResizeMode=NoResize` |
| Console | `NexusConsoleWindow` | Preserved `WireEvents` / console routing |

### Chrome fix

`NexusWindowChromeButtons` close command now binds to `DataContext.CloseCommand` on the host window (was incorrectly binding to `Window.CloseCommand`).

## Screenshots

Automated capture was attempted but **did not complete** in this environment: `dotnet run -- --capture-design-evidence` hit a stack overflow in `NexusStoreViewModel` ↔ `NexusPackageService.Reload()` event loop during shell startup (pre-existing store wiring, outside this UI sprint).

### Manual capture instructions

From repo root, with a graphical session:

```powershell
cd "Ninja Nexus/source/nexus-shell/NexusShell"
dotnet run -c Release -- --capture-design-evidence
```

Screenshots are written to `docs/evidence/nexus-design-system-v2/`:

- `window-framework-files.png`
- `window-framework-settings.png`
- `window-framework-store.png`
- `window-framework-device-manager.png`
- `window-framework-browser.png`
- `window-framework-photos.png`
- `window-framework-media.png`
- `window-framework-console.png`

Alternatively, open each app from the Nexus desktop and capture manually.

## What's still missing

- **View-level token migration:** App views (`NexusFilesView`, `NexusStoreView`, etc.) still contain local hardcoded colors/styles; window shell is unified but inner views were not refactored (minimal-diff scope).
- **NexusContentLayout slots in views:** SideNav / RightPanel dependency properties exist on `NexusWindow` but apps keep nav/preview inside existing views rather than lifting into the framework slots.
- **Shared component adoption in views:** `NexusSearchBox`, `NexusDataTable`, `NexusCard`, etc. are available but not yet wired into view XAML (views retain bespoke controls).
- **Calculator screenshot:** Not in required capture list; can be added to `DesignEvidenceCaptureRunner` if needed.
- **Automated screenshots:** Blocked until store `Reload()` recursion is resolved (separate sprint).

## Changed files (this sprint)

### New

- `Themes/NexusDesignSystem2.xaml`
- `Controls/NexusWindow.cs`
- `Controls/NexusTitleBar.xaml` (+ `.cs`)
- `Controls/NexusContentLayout.xaml` (+ `.cs`)
- `Controls/NexusSideNav.xaml` (+ `.cs`)
- `Controls/NexusCommandBar.xaml` (+ `.cs`)
- `Controls/NexusCard.xaml` (+ `.cs`)
- `Controls/NexusButton.xaml` (+ `.cs`)
- `Controls/NexusIconButton.xaml` (+ `.cs`)
- `Controls/NexusSearchBox.xaml` (+ `.cs`)
- `Controls/NexusDataTable.xaml` (+ `.cs`)
- `Controls/NexusPreviewPanel.xaml` (+ `.cs`)
- `Controls/NexusStatusBadge.xaml` (+ `.cs`)
- `Controls/NexusEmptyState.xaml` (+ `.cs`)
- `Controls/NexusToast.xaml` (+ `.cs`)
- `Controls/NexusModal.xaml` (+ `.cs`)
- `Controls/NexusProgress.xaml` (+ `.cs`)
- `Controls/NexusTabs.xaml` (+ `.cs`)
- `Services/EvidenceScreenshotService.cs`
- `Services/DesignEvidenceCaptureRunner.cs`
- `docs/evidence/nexus-design-system-v2/SUMMARY.md`

### Modified

- `App.xaml` — merge `NexusDesignSystem2.xaml`
- `App.xaml.cs` — `--capture-design-evidence` hook
- `Views/Controls/NexusWindowChromeButtons.xaml` — close command binding fix
- `Views/NexusFilesWindow.xaml` (+ `.cs`)
- `Views/NexusSettingsWindow.xaml` (+ `.cs`)
- `Views/NexusStoreWindow.xaml` (+ `.cs`)
- `Views/NexusDeviceManagerWindow.xaml` (+ `.cs`)
- `Views/NexusBrowserWindow.xaml` (+ `.cs`)
- `Views/NexusPhotosWindow.xaml` (+ `.cs`)
- `Views/NexusMediaWindow.xaml` (+ `.cs`)
- `Views/NexusCalculatorWindow.xaml` (+ `.cs`)
- `Views/NexusConsoleWindow.xaml` (+ `.cs`)

## Git status (design-system files only)

```
?? Ninja Nexus/source/nexus-shell/NexusShell/Themes/NexusDesignSystem2.xaml
?? Ninja Nexus/source/nexus-shell/NexusShell/Controls/Nexus*.xaml (+ .cs)
?? Ninja Nexus/source/nexus-shell/NexusShell/Controls/NexusWindow.cs
?? Ninja Nexus/source/nexus-shell/NexusShell/Services/DesignEvidenceCaptureRunner.cs
?? Ninja Nexus/source/nexus-shell/NexusShell/Services/EvidenceScreenshotService.cs
?? Ninja Nexus/docs/evidence/nexus-design-system-v2/SUMMARY.md
 M Ninja Nexus/source/nexus-shell/NexusShell/App.xaml
 M Ninja Nexus/source/nexus-shell/NexusShell/App.xaml.cs
 M Ninja Nexus/source/nexus-shell/NexusShell/Views/Controls/NexusWindowChromeButtons.xaml
 M Ninja Nexus/source/nexus-shell/NexusShell/Views/Nexus*Window.xaml (+ .cs)  [9 apps]
```

No commit created (per sprint instructions).
