fix: harden workspace manager drafts
This commit is contained in:
@@ -38,3 +38,36 @@ 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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user