docs: plan cleanup and maintainability backlog
This commit is contained in:
parent
fbf2eb9e0c
commit
4ddffa6b67
19 changed files with 1743 additions and 7 deletions
73
docs/development/backlog/tasks/CL09.md
Normal file
73
docs/development/backlog/tasks/CL09.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# CL09 — Separate strategy metadata, version inspection and publication UI
|
||||
|
||||
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: React strategy workflows.
|
||||
|
||||
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
|
||||
|
||||
## User story and outcome
|
||||
|
||||
As a strategy developer, I want version inspection, parameter editing and publication to be understandable independent workflows, so changes to one do not disturb the others.
|
||||
|
||||
Expected benefit: Reduces the responsibilities and coupled state in StrategyDetailPage without changing strategy authoring semantics.
|
||||
|
||||
## Verified evidence
|
||||
|
||||
- **Verified — CL-F07:** One 796-line file contains metadata editing, version selection, parameters, publication, cloning, history and comparison. [apps/stock/web-app/src/features/strategies/StrategyDetailPage.tsx:20](../../../../apps/stock/web-app/src/features/strategies/StrategyDetailPage.tsx#L20).
|
||||
|
||||
## Implementation scope
|
||||
|
||||
- Extract focused version inspection/comparison, metadata, and publication/clone panels or hooks as justified by their state ownership.
|
||||
- Keep the route component responsible for selected strategy/version identity and composing panels. Reuse existing CandidatePublication, BuiltinReview and parameter components.
|
||||
- Preserve exact clone/publication receipts, dirty-draft protection, parent/version identity checks and stale-response rejection.
|
||||
- Use explicit local action states where they replace coupled Boolean flags; do not add a global state framework.
|
||||
|
||||
Likely existing files/modules:
|
||||
|
||||
- `apps/stock/web-app/src/features/strategies/StrategyDetailPage.tsx`
|
||||
- `apps/stock/web-app/src/features/strategies/components/`
|
||||
- `apps/stock/web-app/src/features/strategies/services/candidatePublication.ts`
|
||||
- `test/integration/strategy-workbench.test.tsx`
|
||||
|
||||
Proposed new files/modules (names may be adjusted within this scope):
|
||||
|
||||
- `apps/stock/web-app/src/features/strategies/components/StrategyVersionPanel.tsx`
|
||||
- `apps/stock/web-app/src/features/strategies/hooks/useStrategyClone.ts`
|
||||
|
||||
## Exclusions
|
||||
|
||||
- No browser IDE, new strategy/package format, review-policy changes or activation controls.
|
||||
- No redesign of the future AI research workspace or removal of version/evidence history.
|
||||
|
||||
## Dependencies and ownership
|
||||
|
||||
Implementation prerequisites: None.
|
||||
|
||||
Write locks: `web-strategy-detail`.
|
||||
|
||||
Parallel execution: Ready independently; disjoint from DI, CL06 and CL07. Reserve strategy detail/panel/test files against any other frontend owner.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
1. The route composes focused components instead of defining the complete version comparison/publication workflow inline.
|
||||
2. Changing routes/versions cannot apply an old response to a new selection or lose an unacknowledged receipt silently.
|
||||
3. Metadata, parameter, clone and candidate drafts preserve their current unsaved-change and retry behavior.
|
||||
4. Archived/read-only/missing-version states, clone recovery and immutable version links remain functional.
|
||||
5. Existing catalog review and candidate-isolation distinctions remain visible and unchanged.
|
||||
|
||||
## Mandatory verification
|
||||
|
||||
Use existing workspace builds. Tests requiring PostgreSQL/Redis must use explicitly disposable safety fixtures.
|
||||
|
||||
```sh
|
||||
bun test test/integration/strategy-workbench.test.tsx test/integration/candidate-publication-ui.test.tsx
|
||||
bun test test/integration/canonical-workbench.test.tsx
|
||||
bun run typecheck
|
||||
```
|
||||
|
||||
Required regression cases: version navigation races, dirty draft confirmation, ambiguous clone/publication response, archived family, review failure and immutable version reopen.
|
||||
|
||||
## Risks and definition of done
|
||||
|
||||
Extracted panels can reset state by remounting or keep state under the wrong version. Preserve the deliberate keyed identity boundaries and ownership checks.
|
||||
|
||||
Done means the acceptance criteria and relevant checks pass, an independent review accepts the focused diff, and the integrator records exact test results and a commit/reference in the manifest. Preserve the compatibility and financial invariants in the cleanup execution contract.
|
||||
Loading…
Add table
Add a link
Reference in a new issue