137 lines
8.9 KiB
Markdown
137 lines
8.9 KiB
Markdown
---
|
|
phase: 03-unified-runtime-workspace
|
|
plan: 02
|
|
type: execute
|
|
wave: 2
|
|
depends_on: [03-01]
|
|
files_modified:
|
|
- tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx
|
|
- tauri-app/src/features/runtime/components/RuntimeWorkspace.css
|
|
- tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx
|
|
autonomous: true
|
|
requirements: [WORK-01, DIAG-01]
|
|
must_haves:
|
|
truths:
|
|
- One component combines runtime status, lifecycle controls, settings editing, and actionable health guidance.
|
|
- The unified workspace renders endpoint or mode context, active model context, and failure guidance from the manager-owned summary instead of separate card and drawer heuristics.
|
|
- Saving, starting, stopping, restart-required guidance, and invalid-draft preservation all remain available inside the same operator surface.
|
|
artifacts:
|
|
- path: tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx
|
|
provides: one authoritative runtime workspace component that combines summary, health, actions, and draft editing
|
|
- path: tauri-app/src/features/runtime/components/RuntimeWorkspace.css
|
|
provides: layout and responsive styling for the consolidated runtime workspace
|
|
- path: tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx
|
|
provides: integrated regression coverage for the new unified workspace component
|
|
key_links:
|
|
- from: tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx
|
|
to: tauri-app/src/features/runtime/useRuntimeManager.ts
|
|
via: manager-owned workspace summary, health diagnostics, and action state
|
|
pattern: workspaceSummary|workspaceHealth|applyImpact
|
|
- from: tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx
|
|
to: tauri-app/src/features/runtime/runtime-settings-form.ts
|
|
via: reuse of existing draft-editing, model-selection, and validation flows inside one workspace
|
|
pattern: createRuntimeConfigPatch|resolveDraftModelSelection
|
|
---
|
|
|
|
<objective>
|
|
Build the actual unified runtime workspace component after the manager contract is in place.
|
|
|
|
Purpose: replace the conceptual split between status and settings by giving operators one surface that contains runtime summary, health details, actions, and editable runtime draft sections together.
|
|
Output: a new `RuntimeWorkspace` component and styles that render all runtime status, control, and settings flows from one authoritative UI.
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@$HOME/.config/opencode/get-shit-done/workflows/execute-plan.md
|
|
@$HOME/.config/opencode/get-shit-done/templates/summary.md
|
|
</execution_context>
|
|
|
|
<context>
|
|
@.planning/PROJECT.md
|
|
@.planning/ROADMAP.md
|
|
@.planning/STATE.md
|
|
@.planning/REQUIREMENTS.md
|
|
@.planning/phases/03-unified-runtime-workspace/03-RESEARCH.md
|
|
@.planning/phases/03-unified-runtime-workspace/03-01-PLAN.md
|
|
@tauri-app/src/features/runtime/useRuntimeManager.ts
|
|
@tauri-app/src/features/runtime/runtime-settings-form.ts
|
|
@tauri-app/src/features/runtime/components/RuntimeStatusCard.tsx
|
|
@tauri-app/src/features/runtime/components/RuntimeSettingsDrawer.tsx
|
|
@tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx
|
|
</context>
|
|
|
|
<tasks>
|
|
|
|
<task type="auto" tdd="true">
|
|
<name>Task 1: Create the unified runtime workspace shell for summary, health, and actions</name>
|
|
<files>tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx, tauri-app/src/features/runtime/components/RuntimeWorkspace.css, tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx</files>
|
|
<read_first>
|
|
- tauri-app/src/features/runtime/components/RuntimeStatusCard.tsx
|
|
- tauri-app/src/features/runtime/components/RuntimeSettingsDrawer.tsx
|
|
- tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx
|
|
- tauri-app/src/features/runtime/useRuntimeManager.ts
|
|
- tauri-app/src/features/runtime/runtime-utils.ts
|
|
- .planning/phases/03-unified-runtime-workspace/03-RESEARCH.md
|
|
</read_first>
|
|
<behavior>
|
|
- Test 1: the unified workspace renders one status section with lifecycle action buttons and does not require a separate launcher to reveal health details.
|
|
- Test 2: a degraded local runtime shows readiness headline, endpoint, active model, and actionable backend error guidance in the same component.
|
|
- Test 3: remote mode shows provider or endpoint context in the same workspace instead of hiding diagnostics behind a different surface.
|
|
</behavior>
|
|
<action>Create `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` and `RuntimeWorkspace.css` with explicit sections titled `Runtime workspace`, `Runtime health`, `Connection details`, and `Draft settings`. In the summary area, render the manager-owned `workspaceSummary`, `workspaceHealth`, lifecycle result banner, and primary lifecycle controls using exact button copy already established in Phase 2 such as `Start`, `Stop`, `Save changes`, and `Save and start local API`. Render endpoint, connection mode, saved model, and health guidance directly in the component header or summary grid so the operator can understand readiness and next actions without opening a second surface.</action>
|
|
<acceptance_criteria>
|
|
- `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` exists.
|
|
- `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` contains the headings `Runtime workspace`, `Runtime health`, and `Draft settings`.
|
|
- `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` contains both `Save changes` and `Save and start local API`.
|
|
- `tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx` asserts unified workspace summary or health content.
|
|
</acceptance_criteria>
|
|
<verify>
|
|
<automated>npm test -- RuntimeSurface</automated>
|
|
</verify>
|
|
<done>The runtime status, actions, and diagnostics become visible in one component instead of a split card-plus-drawer model.</done>
|
|
</task>
|
|
|
|
<task type="auto" tdd="true">
|
|
<name>Task 2: Move draft editing and apply guidance into the same authoritative workspace</name>
|
|
<files>tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx, tauri-app/src/features/runtime/components/RuntimeWorkspace.css, tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx</files>
|
|
<read_first>
|
|
- tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx
|
|
- tauri-app/src/features/runtime/components/RuntimeSettingsDrawer.tsx
|
|
- tauri-app/src/features/runtime/runtime-settings-form.ts
|
|
- tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx
|
|
- .planning/phases/02-lifecycle-command-safety/02-03-SUMMARY.md
|
|
</read_first>
|
|
<behavior>
|
|
- Test 1: the same unified workspace shows immediate-apply, restart-required, and save-before-apply guidance alongside editable settings.
|
|
- Test 2: invalid or pending model-selection draft states remain visible and still block save inside the unified workspace.
|
|
- Test 3: managed library state, models-folder actions, and Hugging Face search remain reachable from the same workspace used for runtime status and actions.
|
|
</behavior>
|
|
<action>Port the editable form sections from `RuntimeSettingsDrawer.tsx` into `RuntimeWorkspace.tsx` without losing draft-preservation behavior. Keep the exact operator-facing guidance phrases `Applies immediately after save.`, `Restart required to apply saved changes.`, and `Stop the local API or save first before applying this change.` visible next to the relevant controls inside the same component. Preserve the managed library section, models folder browse or rescan actions, selected model control, Hugging Face search, GPU layers, context presets, and discard confirmation behavior so the workspace remains the full runtime control plane rather than a read-only summary.</action>
|
|
<acceptance_criteria>
|
|
- `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` contains `Applies immediately after save.`.
|
|
- `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` contains `Restart required to apply saved changes.`.
|
|
- `tauri-app/src/features/runtime/components/RuntimeWorkspace.tsx` contains `Stop the local API or save first before applying this change.`.
|
|
- `tauri-app/src/features/runtime/components/RuntimeSurface.test.tsx` covers invalid-draft blocking or managed-library interactions inside `RuntimeWorkspace`.
|
|
</acceptance_criteria>
|
|
<verify>
|
|
<automated>npm test -- RuntimeSurface</automated>
|
|
</verify>
|
|
<done>The operator can inspect health, edit settings, and execute lifecycle actions from one authoritative runtime workspace.</done>
|
|
</task>
|
|
|
|
</tasks>
|
|
|
|
<verification>
|
|
- `npm test -- RuntimeSurface`
|
|
- `npm run build`
|
|
</verification>
|
|
|
|
<success_criteria>
|
|
- One runtime component combines summary, health, actions, and editable settings.
|
|
- Runtime health, endpoint or mode context, and active model context are visible without opening a separate surface.
|
|
- Draft validation, apply guidance, and lifecycle safety remain intact inside the unified workspace.
|
|
</success_criteria>
|
|
|
|
<output>
|
|
After completion, create `.planning/phases/03-unified-runtime-workspace/03-02-SUMMARY.md`
|
|
</output>
|