fix: close Task 6 review findings

This commit is contained in:
lda
2026-08-14 19:29:39 +07:00 Verified
parent a511740c85
commit 50a7fe3207
11 changed files with 288 additions and 75 deletions
@@ -1,41 +0,0 @@
# Task 6 Report
## Status
Complete. The implementation is based on Task 5 commit `eae1a62f`.
Implementation commit: `92a32df8` (`refactor: use canonical authoring choices`).
## Implementation
- Threaded `useAuthoringContract` inventory data through `SelectedCapabilityInspector`.
- Filtered inventory choices by `step_input`, `step_output_source`, and `state_target` use.
- Replaced input target/source datalists, recursive expression path datalists, and output schema-local controls with `AuthoringPathPicker`.
- Preserved canonical input and output binding serializers. Picker values translate canonical inventory paths to the existing local paths before submission.
- Kept unsupported rows and custom or malformed persisted paths editable. Non-catalog values initialize the picker Advanced section without replacing the persisted value.
- Runtime context choices are rendered only when supplied by the inventory; no runtime context field names are hardcoded in production authoring files.
- Preserved existing row diagnostic accessibility through `aria-invalid` and `aria-describedby` on Advanced custom inputs.
- Kept schema helpers required by validation and output preview; removed `workflowSourceSuggestions` as a production source of choices.
## TDD Evidence
The required RED command was run before production changes:
```powershell
pnpm --dir web --filter @lda/console test -- src/workspace/authoring/StepInputBindingsForm.test.tsx src/workspace/authoring/InputExpressionControl.test.tsx src/workspace/authoring/StepOutputBindingsForm.test.tsx src/workspace/authoring/SelectedCapabilityInspector.test.tsx
```
RED result: 4 test files failed, 4 tests failed, and 60 tests passed because the forms still rendered the old datalists/selects.
The tests then covered inventory-backed source/target choices, recursive expression paths, conditional context visibility, canonical submission, custom-path repair, whole-payload path round-tripping, and the selected inspector inventory seam.
## Verification
- `pnpm --dir web --filter @lda/console test -- src/workspace/authoring`: 19 files passed, 197 tests passed.
- `pnpm --dir web --filter @lda/console typecheck`: passed.
- `npx react-doctor@latest --verbose --scope changed`: score 87/100; six non-blocking warnings were reported in existing picker/component patterns.
- `git diff --check`: passed before commit.
## Concerns
React Doctor reports six non-blocking warnings: mirrored picker state, array lookups, the existing large input form, and empty default props. These patterns were present in the existing authoring seams or are equivalent to the prior suggestion-array defaults; no new blocking diagnostic was reported.