feat(ui): rebuild desktop renderer on a shared trace graph and design tokens
Replace the full-innerHTML render loop with a static shell plus per-region updates, so composer drafts, fold state, focus, and scroll survive streaming turns. Fold session events into one trace graph consumed by Chat, Trajectory, Waterfall, and the shared inspector drawer, with live ACP updates patched into a keyed live-turn region. Align the visual system with a tokenized design spec: a 4px spacing base with fixed control/row height steps, foreground-derived text tiers and borders (color-mix), neutral interaction overlays, tiered motion durations with a reduced-motion collapse, hover-revealed scrollbars, and drawer-aware layout elasticity. Localize trajectory role chips and row previews. The renderer entry (app.ts) joins the coverage exclude list as a self-executing DOM bootstrap: jsdom lifecycle specs exercise its behavior, and extractable logic lives in covered modules (trace-graph.ts, renderer-content.ts).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Shared contracts for the Deepseek Harness desktop app.
|
||||
* Shared contracts for the DeepSeek Harness desktop app.
|
||||
*
|
||||
* The package starts with view and lifecycle contracts so Electron main,
|
||||
* preload, and renderer code can evolve without copying product decisions from
|
||||
@@ -8,10 +8,10 @@
|
||||
* @module @deepseek-ai/dsh-desktop
|
||||
*/
|
||||
|
||||
/** Main analysis surfaces in the Deepseek Harness session view. */
|
||||
/** Main analysis surfaces in the DeepSeek Harness session view. */
|
||||
export const DESKTOP_SURFACES = ['chat', 'trajectory', 'waterfall', 'context', 'compare', 'dev'] as const
|
||||
|
||||
/** Main analysis surfaces in the Deepseek Harness session view. */
|
||||
/** Main analysis surfaces in the DeepSeek Harness session view. */
|
||||
export type DesktopSurface = (typeof DESKTOP_SURFACES)[number]
|
||||
|
||||
/** Right-side inspector tabs, ordered as rendered. */
|
||||
@@ -221,7 +221,7 @@ export const SURFACE_DEFINITIONS: Record<DesktopSurface, SurfaceDefinition> = {
|
||||
label: 'Trajectory',
|
||||
purpose: 'navigate',
|
||||
primaryQuestion: 'Where am I in the session, turn, step, request, assistant, tool, and context structure?',
|
||||
ownsComposer: false,
|
||||
ownsComposer: true,
|
||||
summaryFirst: true,
|
||||
inlinePreview: true,
|
||||
fullDetailInInspector: true,
|
||||
@@ -231,7 +231,7 @@ export const SURFACE_DEFINITIONS: Record<DesktopSurface, SurfaceDefinition> = {
|
||||
label: 'Waterfall',
|
||||
purpose: 'timing',
|
||||
primaryQuestion: 'Where did time go across model requests, tool calls, and failures?',
|
||||
ownsComposer: false,
|
||||
ownsComposer: true,
|
||||
summaryFirst: true,
|
||||
inlinePreview: false,
|
||||
fullDetailInInspector: true,
|
||||
@@ -282,9 +282,9 @@ export function opensInspector(surface: DesktopSurface, target: InspectorTarget
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the surface is allowed to show the chat composer.
|
||||
* Returns whether the surface participates in the live session composer.
|
||||
* @param surface - The active middle surface.
|
||||
* @returns True only for the driving chat surface.
|
||||
* @returns True for the three live session surfaces.
|
||||
*/
|
||||
export function ownsComposer(surface: DesktopSurface): boolean {
|
||||
return SURFACE_DEFINITIONS[surface].ownsComposer
|
||||
|
||||
Reference in New Issue
Block a user