|
| 1 | +# Refine Harness Studio as a technical control room |
| 2 | + |
| 3 | +## Traceability |
| 4 | + |
| 5 | +- Spec ID: harness-studio-visual-redesign |
| 6 | +- Status: Implemented |
| 7 | + |
| 8 | +## Intent |
| 9 | + |
| 10 | +Harness Studio should feel like a deliberate local developer workbench rather |
| 11 | +than an unstyled collection of dense tables. The redesign keeps the existing |
| 12 | +`Workspace -> Sessions -> Detail / Compare -> Artifacts` information |
| 13 | +architecture, while establishing one coherent visual language across the shell, |
| 14 | +empty states, docked panes, traces, comparisons, and loading feedback. |
| 15 | + |
| 16 | +The direction combines the repository's VS Code-inspired docked workbench |
| 17 | +contract with the verified `ui-ux-pro-max` recommendation for a minimal, |
| 18 | +high-contrast developer tool: restrained dark surfaces, a supported light |
| 19 | +alternative, semantic color, system typography, dense evidence rows, and subtle |
| 20 | +motion. The generated FAQ layout, unbundled Web fonts, green primary CTA, and |
| 21 | +scroll-reveal effects do not fit the product and are intentionally excluded. |
| 22 | + |
| 23 | +## Acceptance Scenarios |
| 24 | + |
| 25 | +- **AC-1:** A fresh Studio load uses the dark technical-control-room theme. A |
| 26 | + labelled title-bar control switches between dark and light themes, persists |
| 27 | + the local preference, and exposes its current state to assistive technology. |
| 28 | +- **AC-2:** Shared semantic tokens own both themes. Studio components introduce |
| 29 | + no one-off colors, fonts, radii, shadows, or motion durations outside the |
| 30 | + approved token source, and docked regions remain flat and edge-to-edge. |
| 31 | +- **AC-3:** The application shell has a clear hierarchy at first glance: |
| 32 | + product identity and top-level tools on the left, current context and scoped |
| 33 | + actions in the title bar, and one primary workspace surface. Selection, |
| 34 | + availability, hover, focus, pressed, and disabled states are distinguishable. |
| 35 | +- **AC-4:** Overview and workspace-intake screens show one dominant next action, |
| 36 | + readable supporting context, and stable loading feedback without becoming |
| 37 | + card dashboards or decorative landing pages. |
| 38 | +- **AC-5:** Session rows establish provider and observed time before prompt, |
| 39 | + keep compare selection separate from opening, and reveal a legible detail |
| 40 | + timeline. Dense metadata uses tabular figures where alignment matters. |
| 41 | +- **AC-6:** Session Compare visually distinguishes the two evidence lanes using |
| 42 | + labels and semantic lane treatments, retains the explicit no-winner boundary, |
| 43 | + and keeps tables and tool sequences readable without color-only meaning. |
| 44 | +- **AC-7:** Icons use the existing Phosphor family. Decorative icons are hidden |
| 45 | + from the accessibility tree; icon-only controls have an accessible name, |
| 46 | + state where applicable, visible focus, and a tooltip. |
| 47 | +- **AC-8:** At 1440x900, 1024x768, 390x844, and 375x812, the primary decision is |
| 48 | + visible, the document has no horizontal overflow, panes use bounded local |
| 49 | + scrolling, and narrow controls provide at least 44px targets. |
| 50 | +- **AC-9:** Keyboard navigation, 200% zoom/reflow, light-theme and dark-theme |
| 51 | + contrast, async live regions, and `prefers-reduced-motion` remain usable. |
| 52 | +- **AC-10:** Playwright captures meaningful non-loading screenshots of Overview, |
| 53 | + workspace intake, Session browser, Session Compare, Artifact View, Bench, |
| 54 | + Live trial, and Evidence results, with no browser console or page errors. |
| 55 | +- **AC-11:** When the server exposes project-workspace Session discovery and no |
| 56 | + workspace is connected, Studio opens with a non-dismissible modal workspace |
| 57 | + gate. The shell remains visible but inert and hidden from assistive |
| 58 | + technology; successful discovery removes the gate and opens Sessions. |
| 59 | + Preconfigured servers without workspace discovery keep their existing direct |
| 60 | + entry into the relevant workbench. |
| 61 | + |
| 62 | +## Non-goals |
| 63 | + |
| 64 | +- Changing the project-workspace and Inspector Session-discovery architecture. |
| 65 | +- Introducing cards as the default container, gradients, glassmorphism, glow, |
| 66 | + illustration assets, emoji icons, or marketing-page sections. |
| 67 | +- Loading Google Fonts, adding GSAP, or depending on network-hosted visual |
| 68 | + assets. |
| 69 | +- Redesigning the separately owned Canvas artifact viewer rendered in its |
| 70 | + sandboxed iframe. |
| 71 | +- Adding new data sources, evaluation semantics, or Session write-back. |
| 72 | + |
| 73 | +## Plan and Tasks |
| 74 | + |
| 75 | +### 1. Extend the visual source of truth |
| 76 | + |
| 77 | +Record the verified dark/light palette, theme behavior, motion roles, and |
| 78 | +control-room rationale in `DESIGN.md`. Keep the existing system font and |
| 79 | +semantic evidence roles. |
| 80 | + |
| 81 | +### 2. Rebuild shared visual primitives |
| 82 | + |
| 83 | +Update `styles/tokens.css` with dark-default and light-theme mappings, theme and |
| 84 | +motion roles, predictable focus/pressed/disabled states, and narrow target |
| 85 | +sizes. Keep every surface mapped to shared tokens. |
| 86 | + |
| 87 | +### 3. Refine shell and workspaces |
| 88 | + |
| 89 | +Update the React shell and `styles/shell.css` / `styles/workbench.css` so the |
| 90 | +brand, navigation, title bar, Overview, empty state, Sessions, detail timeline, |
| 91 | +Compare, Artifact View, Bench, Live trial, and Evidence results share the same |
| 92 | +hierarchy and density. |
| 93 | + |
| 94 | +### 4. Add explicit theme control |
| 95 | + |
| 96 | +Add a local, accessible dark/light toggle in the title bar. Apply the theme |
| 97 | +before meaningful paint where practical and preserve the user's selection |
| 98 | +without involving the server. |
| 99 | + |
| 100 | +### 5. Validate the actual product |
| 101 | + |
| 102 | +Build Studio, run behavioral tests, exercise all changed surfaces with |
| 103 | +Playwright, inspect console/page errors, verify overflow/focus/reduced motion, |
| 104 | +and visually review the required screenshots before marking this spec |
| 105 | +implemented. |
| 106 | + |
| 107 | +## Test and Review Evidence |
| 108 | + |
| 109 | +- AC-1/AC-2: theme-state unit/browser assertions plus parsed token/style-source |
| 110 | + checks for approved semantic roles and absence of one-off visual literals. |
| 111 | +- AC-3/AC-4: Playwright shell, Overview, empty-state, hover/pressed/disabled, |
| 112 | + and single-primary-action checks. |
| 113 | +- AC-5/AC-6: Session browser and Compare interaction tests and screenshots in |
| 114 | + both themes, including independent checkbox/open behavior and no-winner copy. |
| 115 | +- AC-7: role/name/state assertions, keyboard focus checks, and icon ownership |
| 116 | + review. |
| 117 | +- AC-8: overflow and screenshot checks at all four required viewport sizes. |
| 118 | +- AC-9: reduced-motion, 200% zoom/reflow, keyboard order, live-region, and |
| 119 | + measured foreground/background contrast checks. |
| 120 | +- AC-10: full Studio Playwright suite with captured screenshots and empty |
| 121 | + console/page-error collections. |
| 122 | +- AC-11: server capability assertion plus Playwright dialog, inert-shell, |
| 123 | + responsive screenshot, loading-state, and post-selection navigation checks. |
| 124 | + |
| 125 | +### Recorded validation |
| 126 | + |
| 127 | +- `npm run typecheck` and `npm run build` in `packages/harness-studio` passed. |
| 128 | +- `npm test` in `packages/harness-studio` passed 18 files and 121 tests. |
| 129 | +- `npm run test:browser` in `packages/harness-studio` passed all 16 Playwright |
| 130 | + scenarios, including the real provisioned `deck.pptx` Canvas viewer. |
| 131 | +- Playwright verified 1440x900, 1024x768, 390x844, and 375x812 layouts, |
| 132 | + theme persistence, rendered foreground/background contrast of at least 4.5:1, |
| 133 | + keyboard focus, reduced motion, bounded scrolling, and no page-level |
| 134 | + horizontal overflow. |
| 135 | +- Screenshots were visually reviewed for Overview, workspace intake and loading, |
| 136 | + Session browser, Session Compare, Artifact View, Bench, Live trial, and |
| 137 | + Evidence results. Browser console and page-error collections were empty. |
| 138 | + |
| 139 | +### Risks |
| 140 | + |
| 141 | +- Dark-theme muted text and semantic states can appear polished while missing |
| 142 | + WCAG contrast. Measure actual rendered pairs rather than reviewing hex values |
| 143 | + by sight. |
| 144 | +- A global token change affects every Studio surface. Validate Bench, Live |
| 145 | + trial, Evidence results, and artifact code/diff previews in addition to the |
| 146 | + new Session flow. |
| 147 | +- Theme persistence can cause a flash or stale state if it is applied only after |
| 148 | + React mounts. Initialize the root theme deterministically and keep storage |
| 149 | + failure non-fatal. |
| 150 | +- Embedded Inspector and Canvas viewers own separate rendering contexts. Do not |
| 151 | + claim theme parity inside an iframe unless that owner exposes a supported |
| 152 | + theme contract. |
0 commit comments