docs(research): plan dataset reuse and settings custody
This commit is contained in:
parent
7f7c07e35f
commit
5319bd1bb2
5 changed files with 88 additions and 3 deletions
13
docs/development/backlog/tasks/RP06.md
Normal file
13
docs/development/backlog/tasks/RP06.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# RP06 — Preserve settings and captured preparation across backtest tabs
|
||||
|
||||
Parent E12. Priority P1 / High custody defect. Complexity M. Dependency RP03. Owner continuation authorizes this correction; ADR-006 and financial semantics stay unchanged.
|
||||
|
||||
Evidence: `BacktestDetailPageV2.renderTabContent` mounts canonical setup only in the settings case. Any other tab unmounts it and `DatasetPreparation`, destroying a preview or ambiguous retention retry. `useUnsavedWarning` protects browser unload only, so an ordinary same-page tab click silently loses the exact captured input. The page also clears the configure flag on every run-ID change, although the edited template still belongs to the same backtest.
|
||||
|
||||
Scope: keep settings lazily mounted after the first visit for the current backtest; hide them accessibly while other tabs render. Preserve policy/strategy drafts, loaded source metadata, captured preview and unconfirmed retention retry across tabs and same-backtest run selections. Scope ownership to the backtest ID; changing it disposes/fences the previous editor and never renders old inputs for the new owner. Explicit close/discard and authoritative saved-definition updates keep their existing semantics. Do not start settings/catalog requests before first visit, duplicate the editor or trigger hidden saves/runs. No persistent browser draft store, global router blocker, framework or financial change. Leaving this backtest/reloading remains outside the in-memory preservation guarantee.
|
||||
|
||||
Files/locks: `apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx`, existing `test/integration/backtest-run-controls.test.tsx` and narrowly scoped lifecycle tests. Do not edit CanonicalSetup or its transport (RP05 ownership). Root owns shared browser tests and planning state. React lifecycle implementation agent; independent review.
|
||||
|
||||
Acceptance/tests: demonstrate the original loss before changing code; ordinary name/policy changes survive Settings → Runs → Settings; capture and ambiguous-retention retry retain exactly the same input/hash without another source read; late completion while hidden stays owned by the same template; same-backtest run navigation preserves the draft. Other tabs cannot expose/focus hidden settings, and entering a backtest does not eagerly fetch the catalog. Changing backtest ID clears the old editor and fences late completion; explicit discard/save still work. Verify zero unintended template/run writes during navigation, with a real browser retention retry scenario. Existing polling, cancellation, archived and legacy-history behavior must pass.
|
||||
|
||||
Gates: focused page/lifecycle tests, application/authored-test types, strict lint, production build; root full repository and Chromium suite. Parallel with RP05 because the parent owns mounting while the child owns dataset choice. No broad navigation refactor; the main regression risks are stale ownership, hidden focusable inputs and newly eager requests.
|
||||
Loading…
Add table
Add a link
Reference in a new issue