fix(research): preserve settings and capture across tabs (RP06)

This commit is contained in:
Boki 2026-10-27 09:31:46 -04:00
parent 6d549542a9
commit c838e3d05a
4 changed files with 405 additions and 46 deletions

View file

@ -11,3 +11,5 @@ Files/locks: `apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx`
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.
Accepted October 27, 2026: the original name-draft loss was reproduced before the fix. One lazily mounted settings panel now survives same-backtest tabs/run URLs; another backtest disposes it. Independent review passed 45 lifecycle tests / 279 assertions; broader implementer suites passed 198 / 967. Root full repository gate and both real browser regressions passed: unsaved name survives index-to-run navigation without changing the saved definition, and a committed retention response can be lost, followed by tab changes and exact retry after source removal, without a source reread. Hidden controls are absent from accessible role queries. [Combined evidence](../../real-data-research.md) records the in-memory scope; no persistent draft or general navigation framework was added.