29 lines
3.4 KiB
Markdown
29 lines
3.4 KiB
Markdown
# P5-15-01R-02 — Rules draft preservation
|
||
|
||
Source: `c8e32238ef628f34c6ae8f64c6cb40ca5d8c68ac`, development `codex/ui-redesign-phase4`. Production `main` remains unchanged/NO-GO. This checkpoint owns SETTINGS-01 only; Analytics, P5-13, P5-15-02, Docker and B07 are excluded.
|
||
|
||
## Demonstrated reproduction before implementation
|
||
|
||
The new ordinary browser regression uses a disposable authenticated SQLite application. Seed the existing six-field Rules configuration (Applied follow-up14); edit it to5; switch Follow-ups→Notifications→Follow-ups. The entered5 becomes14, the persisted value remains14, and zero Rules PUTs occur. The run fails on the actual visible value (`expected5, received14`), not a mocked server or missing selector. Raw trace/report: ignored `.artifacts/p5-15-01R-02/browser/rules-red.*`.
|
||
|
||
`SettingsView.TabPanel` returns null for inactive sections, unmounting `RulesSettingsCard`. The card's local `s` state is both its initially fetched data and edited draft. Returning creates a new card, performs a new GET and initializes from persisted14. This is destruction of editing-session state, not a backend write or deletion.
|
||
|
||
## Bounded repair contract
|
||
|
||
- Move the single Rules draft, persisted baseline and load/save/error state into the existing Settings parent. Inactive forms may still unmount; no keep-all-tabs-mounted workaround, browser storage, cross-session draft or automatic save.
|
||
- Preserve the existing per-account six-field atomic GET/PUT contract: Applied, Offer and Feedback are separate scenarios within one configuration, not three separately saved records. PUT returns204; the API clamps integer day values to1–365 and has no revision/ETag contract.
|
||
- Internal tab/phone-section changes preserve pending fields/errors. Save submits one validated snapshot; failure retains it; later edits during a pending save must stay dirty. Explicit discard returns to the latest successful baseline without a write.
|
||
- Clearly communicate the in-memory Settings-session boundary. Existing authentication/session disposal remains authoritative; no global draft store or second identity boundary.
|
||
- Keep S03 and W11 traceability, E07/E08/E09 reachability/accessibility/account protection. Full-group acceptance requires other retained sub-workflows; this repair alone cannot grant PASS.
|
||
|
||
## Checkpoint plan / current status
|
||
|
||
- [x] Trace and reproduce the exact native draft loss.
|
||
- [x] Add the ordinary failing browser regression before application changes.
|
||
- [x] Repair and validate controlled draft/save/discard/error ownership.
|
||
- [x] Complete focused native/browser, localisation/responsive and account evidence.
|
||
- [ ] Run the fresh full baseline and reconcile ordinary failures/counts.
|
||
- [ ] Update acceptance/defect evidence, commit/push each completed unit and verify clean remote equality.
|
||
|
||
The reproducer was committed/pushed as `5b5dcd0b80aa0713545ecf1fdab079fb9dec28ee` before implementation. The bounded implementation now passes all four native SQLite browser journeys and all472 frontend tests (464+8 focused behavioural cases), TypeScript, lint and the production build. Backend1,033, focused AI108, revision5 and sidecar49 have fresh passing runs. The complete browser/security/document run is in progress; no final browser count or repair acceptance is claimed here. The original audit and R-01 evidence remain unchanged. Production NO-GO and all deferred qualification obligations remain open.
|