Files
ThothII/.superpowers/sdd/2026-08-03-git-workspace-registry/task-9-report.md
T

74 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Task 9 report — Workspace Management CRUD page
## Delivered
- Added the Workspace management dialog, launched from the persistent right sidebar and the
Model activity header without touching live-session/SSE state.
- Added a workspace list/detail editor for General, DWH, Semantic index, LLM policy,
Installation requirements, and Git status/history.
- Added browser-only New, Edit, Duplicate, Save draft, and Delete-draft workflows. A deletion
draft stores only ID and immutable revision references; publication remains a Task 10 action.
- Used closed native controls for languages, engines, transports, distance metrics, embedding
providers, and selectable default models. Free values have client-side, accessible errors.
- Made semantic-index dimensions atomic: one editor field always writes the same value to the
vector-store and embedding contracts.
- Added Validate and Test-on-this-installation actions. They display sanitized code/message
diagnostics only; neither action exposes or stores credentials, secrets, or raw response bodies.
- Explicitly excluded publish, pull, import, and export user flows from this task.
## TDD evidence
- RED: `npx vitest run src/shell/WorkspaceManager.test.tsx src/shell/WorkspaceEditor.test.tsx`
failed because the manager and editor modules did not exist.
- GREEN: focused manager/editor/AppShell coverage passed after the implementation.
- RED: a deletion-draft persistence regression failed with
`Cannot read properties of undefined (reading 'save')` before the sanitized draft store was added.
- GREEN: the draft-store and manager tests passed once deletion intent persisted locally.
## Verification
Executed from `frontend/`:
```text
npx vitest run
50 test files passed, 358 tests passed
npx tsc -b
exit 0
```
`git diff --check` passed before commit. No workspace secret value, secret-file path, raw
diagnostic body, publish call, import flow, or export flow was introduced.
## Fix round 1
### Root causes and fixes
- The original duplicate proposal appended `-copy` and then truncated at 63 characters. For an
already-maximal ID, truncation could remove the suffix and reproduce the immutable source ID.
The proposal now reserves suffix space and falls back to a distinct `-2` suffix when a maximal
source already ends in `-copy`.
- `dwh.timeout_ms` was rendered as a positive numeric field but was absent from the client
validation map. It now has the same immediate accessible error treatment as other numeric
fields, so a rejected save never reaches the manager’s saved-draft toast.
- Registry status, workspace list, and selected-detail React Query failures were rendered as
loading, empty, or unselected states. Each now has a named alert and a retry control, distinct
from its corresponding loading and empty state.
### TDD evidence
- RED: max-length duplication retained the original 63-character ID; the timeout field produced
no alert; and each of the three failed queries had no accessible retry control.
- GREEN: the focused manager/editor tests passed **12/12**, covering a valid changed duplicate
proposal, rejected zero timeout with no save toast, and status/list/detail retry recovery.
### Verification
Executed from `frontend/`:
```text
npx vitest run
50 test files passed, 364 tests passed
npx tsc -b
exit 0
```