Skip to content

Commit 4a601c7

Browse files
phodalQoder-AI
andcommitted
feat(studio): refine Studio as a themed technical control room
Establish one coherent visual language across the Studio shell, empty states, docked panes, traces, comparisons, and loading feedback. Add a dark control-room default theme plus a supported light alternative mapped through shared semantic tokens, with a title-bar theme control that persists local preference and exposes state to assistive technology. Add a non-dismissible first-run workspace gate for servers exposing project-workspace session discovery, and a zero-configuration default local harness source so the local Web workspace opens with a usable coder session. Spec: docs/specs/2026-08-20-harness-studio-visual-redesign.md Test: npm test in packages/harness-studio (121 passed) Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
1 parent beaf639 commit 4a601c7

15 files changed

Lines changed: 861 additions & 107 deletions

DESIGN.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ colors:
1818
surface: "#FFFFFF"
1919
surface-subtle: "#F8FAFC"
2020
surface-hover: "#EEF1F5"
21+
surface-active: "#E2E8F0"
2122
surface-selected: "#E7EFFB"
2223
border: "#D7DEE8"
2324
border-strong: "#B8C3D1"
@@ -38,6 +39,55 @@ colors:
3839
categorical-6: "#5E7F2E"
3940
categorical-7: "#7A7385"
4041

42+
themes:
43+
default: dark
44+
light:
45+
source: colors
46+
overlay: "rgba(38, 50, 68, 0.34)"
47+
scrollbar: "#B8C3D1"
48+
scrollbar-hover: "#8D9BAD"
49+
overlay-shadow: "0 18px 48px rgba(38, 50, 68, 0.2)"
50+
dark:
51+
primary: "#79A8FF"
52+
primary-hover: "#9ABEFF"
53+
primary-soft: "#142B4F"
54+
on-primary: "#08111F"
55+
text: "#E6EDF7"
56+
text-muted: "#A6B2C3"
57+
text-subtle: "#8492A6"
58+
canvas: "#080C12"
59+
titlebar: "#0C121C"
60+
sidebar: "#0B1018"
61+
workspace: "#111722"
62+
panel: "#131A25"
63+
surface: "#161F2C"
64+
surface-subtle: "#0E141E"
65+
surface-hover: "#1D2938"
66+
surface-active: "#253348"
67+
surface-selected: "#17345F"
68+
border: "#2B3647"
69+
border-strong: "#3C4B61"
70+
focus: "#9FC1FF"
71+
success: "#63D7A5"
72+
success-surface: "#0E2B22"
73+
warning: "#F2B76F"
74+
warning-surface: "#352411"
75+
danger: "#FF8A94"
76+
danger-surface: "#35171D"
77+
candidate: "#C5A7FF"
78+
candidate-surface: "#251C3B"
79+
categorical-1: "#7BB7E7"
80+
categorical-2: "#B39AF4"
81+
categorical-3: "#9AABC0"
82+
categorical-4: "#6FD3BF"
83+
categorical-5: "#E3AA61"
84+
categorical-6: "#9BC36A"
85+
categorical-7: "#B4AABD"
86+
overlay: "rgba(2, 6, 12, 0.72)"
87+
scrollbar: "#3C4B61"
88+
scrollbar-hover: "#56667C"
89+
overlay-shadow: "0 18px 48px rgba(0, 0, 0, 0.42)"
90+
4191
typography:
4292
display:
4393
fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
@@ -281,6 +331,25 @@ Primary references:
281331
- Use Phosphor icons already owned by Studio. Do not use emoji, text glyphs, or
282332
improvised SVGs as interface icons.
283333

334+
## Theme and visual direction
335+
336+
- The default appearance is the dark technical-control-room theme. A supported
337+
light theme maps the same semantic roles and remains available from a labelled
338+
title-bar control. Theme choice is local presentation state, not server or
339+
Session evidence.
340+
- The visual style is minimal and grid-led: tonal surface steps, neutral 1px
341+
dividers, a blue interaction role, and semantic evidence colors. It may borrow
342+
the discipline of Swiss minimalism, but it must not turn Studio into a landing
343+
page, card dashboard, or decorative terminal pastiche.
344+
- Use the system UI stack in both themes. Generated recommendations for Web fonts
345+
such as IBM Plex Sans or JetBrains Mono are references only; do not load them
346+
unless the files are deliberately bundled and cross-platform tested.
347+
- Do not add glow, gradients, glass surfaces, or scroll-reveal choreography.
348+
Hover, pressed, disclosure, pane, and loading transitions must explain state
349+
and use the shared motion roles.
350+
- Measure dark and light contrast independently. A token name that passed in one
351+
theme is not proof that its mapped value passes in the other.
352+
284353
## Information hierarchy
285354

286355
Every surface must answer one primary question:
@@ -359,6 +428,10 @@ occupy more attention than the active task.
359428
- Shadows are forbidden on docked panes, rows, buttons, tabs, tables, empty
360429
states, and ordinary content groups. A shadow may only communicate a
361430
transient overlay above the workbench; it must disappear with that overlay.
431+
- A required first-run workspace chooser may use one centered floating dialog
432+
above the dimmed workbench. It has one primary action, keeps the underlying
433+
shell inert, cannot be dismissed into an unusable empty application, and
434+
replaces itself with stable discovery progress until the workspace opens.
362435
- `full` radius is limited to a numeric count or circular target. Status text,
363436
evidence roles, filters, and navigation do not become pills by default.
364437
- Compact desktop text controls are 30px high and toolbar targets are at least

docs/specs/2026-08-20-harness-studio-local-web-workspace.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ surface exists.
5050
waiting for the native directory chooser or discovering workspace-matched
5151
Sessions. The Web UI polls that privacy-safe state and renders an indeterminate
5252
progress indicator with reduced-motion support.
53+
- **D-8: local Web owns a real default Debugger harness.** When workspace
54+
Session discovery is available and no explicit harness was configured, the
55+
server resolves a built-in single-session Qoder harness. Explicit harness
56+
configuration still wins. After workspace selection, live runs use that
57+
server-only directory as `cwd` and the default capability source root; no
58+
absolute path is returned to the browser and no scripted demo executor is
59+
substituted in production.
5360

5461
## Acceptance Scenarios
5562

@@ -84,6 +91,11 @@ surface exists.
8491
live status first reports directory selection and then Session discovery, and
8592
completion automatically replaces the intake with the discovered Session
8693
list. No made-up percentage or absolute path is shown.
94+
- **AC-12:** The local Web Debugger is enabled without `--harness`, identifies
95+
itself as the workspace default, opens the existing live-run composer, and
96+
executes through the real built-in Qoder adapter in the selected workspace.
97+
A caller-supplied harness/runtime remains authoritative, and a Studio server
98+
without workspace discovery does not silently acquire a runnable endpoint.
8799

88100
## Non-goals
89101

@@ -93,6 +105,8 @@ surface exists.
93105
- Editing, replaying, or writing back into imported sessions.
94106
- Shipping the public `better-harness web` package boundary in this first UI
95107
migration; the server and packaged-app ownership must be resolved first.
108+
- Faking an out-of-box run with a production scripted executor or bypassing the
109+
selected host's normal authentication and permission boundaries.
96110

97111
## Plan and Tasks
98112

@@ -126,6 +140,14 @@ Keep Studio's server start independent of data arguments. In a follow-up,
126140
package the built Studio runtime so the root command registry can dispatch
127141
`better-harness web` without repository-only paths.
128142

143+
### 6. Provide the local default Debugger harness
144+
145+
Resolve a compiler-valid built-in Qoder harness only for the local
146+
workspace-discovery host. Keep explicit harness configuration authoritative,
147+
bind execution to the selected workspace on the server, label the active
148+
default in the UI, and exercise the same AG-UI/live-run path as configured
149+
harnesses.
150+
129151
## Test and Review Evidence
130152

131153
- AC-1/AC-8: empty-start model and Playwright assertions for UI copy and actions.
@@ -142,15 +164,21 @@ package the built Studio runtime so the root command registry can dispatch
142164
- AC-11: HTTP tests pause the injected chooser and provider to verify the two
143165
status stages; Playwright verifies the live discovery message, progress
144166
indicator, disabled action, and automatic transition to the Session list.
167+
- AC-12: server tests resolve and execute the default harness with an injected
168+
deterministic executor while asserting the selected workspace `cwd` and
169+
source root; Playwright opens Debugger after workspace discovery and completes
170+
a live run through the default AG-UI path.
145171

146172
Implementation evidence (2026-08-20):
147173

148-
- `npm test` in `packages/harness-studio`: 18 files, 118 tests passed,
149-
including controlled chooser/discovery stage transitions.
150-
- `npm run test:browser` in `packages/harness-studio`: 15 Playwright tests
174+
- `npm test` in `packages/harness-studio`: 18 files, 121 tests passed,
175+
including controlled chooser/discovery stages and default-harness execution
176+
rooted at the selected workspace.
177+
- `npm run test:browser` in `packages/harness-studio`: 16 Playwright tests
151178
passed, including the workspace intake, discovered Session detail, Compare,
152-
animated discovery status, wide/compact/narrow screenshots, keyboard focus,
153-
overflow, console, and page error checks.
179+
the default live Debugger flow, animated discovery status,
180+
wide/compact/narrow screenshots, keyboard focus, overflow, console, and page
181+
error checks.
154182
- `npm test` at the repository root: 99 files, 1412 tests passed.
155183
- A live in-process discovery smoke against this repository returned the bounded
156184
100-Session catalog: Qoder 79, Codex 16, and Claude 5.
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
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

Comments
 (0)