fix(ui): preserve inbox context and review recovery

This commit is contained in:
cesnimda
2026-10-14 07:14:50 +02:00
parent 4c3254c472
commit a791e353b0
19 changed files with 2852 additions and 227 deletions
+63
View File
@@ -0,0 +1,63 @@
# P7-06 — Inbox and read review
**Status: bounded CONDITIONAL GO; final static checks and normal push pending.** This is the second of three approved P7-06 implementation boundaries: embedded forms → inbox/read review → compose/send. The forms slice is committed and pushed; this inbox slice has no verified push receipt yet. Draft persistence and send repairs remain the [next mandatory safety boundary](../DEBT.md#p7-06-confirmed-compose-safety-entry-dependency). Optional P7-06F remains DEFERRED.
[Inbox entry](evidence/inbox-entry.json) retains the preceding forms push `4c3254c472871d1cac05abcef502feb4a1be435b`, observed on 2026-10-13 at 21:27:19.353249 UTC: clean local HEAD = origin = live development, local/origin/live main unchanged `27657f31131cd95d42f0e1290853ec9c9b3959a4`. [Forms results](evidence/forms-results.json) retain its separate evidence and conditions.
## Existing owners and bounded repairs
`CorrespondenceInboxPage` retains saved-message paging, search/direction/link filters, detail selection, job Back context and the legacy review alias. Filter changes preserve unrelated query parameters, route state and URL fragments. The literal search “all” stays a search term; only enum filters use the “all” sentinel. Typing replaces the current search history entry so one Back step returns to the prior screen.
Read results belong to their captured query/page. A pending or failed new query cannot leave an old query's rows, counts or actions active. Same-query refresh can retain its successful snapshot. Generation guards reject late reads, and UI language changes retranslate without another inbox/provider/draft GET.
Provider status has independent GET-only recovery. Detail recovery retains the exact provider/message identity and existing saved fallback; Hide, another selection or view changes invalidate stale completion. Saved bodies remain plain text. Shared surfaces, H2/H3 hierarchy, named groups, current-page metric labels, wrapping content and deliberate retry focus replace inconsistent presentation.
`GmailReviewPage` retains its paired review/provider read owner. Errors remain distinct from a disconnected account or a genuinely empty queue. Notes and filters survive recovery and view changes. A synchronous local mutex protects explicit decisions even when a filter hides the active row. If a write succeeds and its following GET fails, Retry repeats only the read. If creation already returned an ID, recovery retains that resource and its Open job action rather than issuing another create.
Exact decision, sync, create and unlink payloads remain compatible. This slice does not change mailbox grants, backend paging, tenant/resource authorization, draft revision semantics or send ownership. Local serialization is not distributed idempotency or live-provider delivery qualification.
## Saved correspondence contract
The established global inbox includes owned correspondence associated with jobs in Trash. The current controller/owner predicates agree with Phase 6 `b5319981` and production `27657f3`; there is no global correspondence soft-delete exclusion to introduce.
The native fixture therefore positively preserves **56 owned messages**, exact date→ID ordering, pages **50/6**, owned trashed-message detail HTTP200, anonymous HTTP401 and foreign-owner HTTP404. An earlier expected total 55 was an unsupported policy assumption. Its failed run remains retained; correcting that oracle does not change backend behavior or weaken owner denial.
## Automated evidence
| Observation | Actual result | Qualification |
|---|---|---|
| Original affected baseline | **30/5 PASS** | 2026-10-13 16:29:38.669864–16:29:51.144721 UTC. Frozen source snapshots were collected after the run; no retrospective pre-run capture is claimed |
| Corrected meaningful initial RED | **30 pass/10 fail** | `unit-red-dialog-ready`, 21:34:16.284168–21:34:30.853292 UTC. Original 30 pass; failures expose recovery, late reads, locale rereads and mutation ownership |
| Initial candidate GREEN | **40/5 PASS** | `unit-green`, 21:45:30.565488–21:45:46.720094 UTC; 14 pre/post source captures match |
| I7 query-context RED → GREEN | **40 pass/1 fail → 41/5 PASS** | RED reproduces literal “all” being cleared. GREEN also executes fragment/source/filter/page, stale-query actions and no-write assertions; assertions after the first RED failure were not reached in RED |
| I8 Back-history RED → GREEN | **41 pass/1 fail → 42/5 PASS** | Four actual search input changes reproduce extra Back steps. RED ran 2026-10-13 22:06:13.284326–22:06:33.443764 UTC; its post-run source capture occurred after the usage pause on Oct14 |
| Latest affected GREEN | **42/5 PASS** | `unit-history-green`, 2026-10-14 05:08:44.577597–05:09:06.324638 UTC; 14 pre/post sources match, zero failed/pending/todo |
| Existing backend subset | **25 PASS** | 2026-10-13 21:33:13.648686–21:33:17.047640 UTC. Correspondence/Email/Gmail tests on the unchanged Release DLL with `--no-build`; no full backend rerun |
| Prior native candidate | **8/8 PASS** | Build `VzfBnZASyHuo3qkczerhH`, 2026-10-13 22:04:13.376117–22:05:00.507133 UTC; predates I8's search-history repair and cannot establish current-source native acceptance |
| Final current-source native | **8/8 PASS** | Build `uhKavi8_u6PrcEm2rZ1On`, 2026-10-14 05:09:27.486825–05:10:16.147321 UTC; all16 pre/post sources match, zero failed/skipped/flaky cases |
Exact raw commands, reports, failed attempts and source hashes remain under `.artifacts/phase7/p7-06/inbox/`. The first native attempt recorded 6 pass/2 fail from fixture/locator premises. The two-case context RED retained a genuine old-row action defect and the false total 55 oracle; it did not reach the first case's fragment assertion. Original Message selectors were narrowed to the exact textbox after semantic groups made broad queries ambiguous; payload, confirmation, conflict and uncertain-state assertions remain.
The five affected suites contain inbox 24, review 7, Gmail import 6, search context 2 and provider connections 3. **Twelve new frontend cases/zero suites** derive **729/94**, using forms 717/94. Eight native cases derive **291 browser cases** from 283. Both are inventories, not whole-suite pass counts. Backend 1,034 remains derived; latest whole frontend 573/89, backend 1,033 and sidecar 49 stay inherited until P7-12.
## Native, visual and accessibility boundary
Fresh app/browser TypeScript, lint and build pass against the final search-history source. App TypeScript ran 05:08:31–05:08:43, lint 05:08:43–05:09:06, browser TypeScript 05:09:06–05:09:18 and build 05:09:18–05:09:27 UTC on Oct14; all exit 0. Final capsule `.artifacts/phase7/p7-06/inbox/history-final/results.json` has SHA256 `e11bbee367949a6478889b1176d71ef5316a9d0c85713a0547761a8dfe29bc53` and 137,271 bytes. It records current build `uhKavi8_u6PrcEm2rZ1On`, eight ordinary native passes and all16 pre/post source matches. Finite static checks and normal push remain pending.
All 20 latest PNGs were displayed and reviewed. No new clipped mail control was observed; saved bodies, fallback alerts, current-page labels, wrapping Bokmål and light/dark focus remain consistent in the sampled states. Native geometry records root horizontal overflow 0. Four long captures—populated 1440 and 320/360/390—were resized for display; sticky full-page detail/review composites do not establish viewport occlusion, physical keyboard, real zoom or assistive-technology acceptance.
All 20 all-enabled axe scans record **0 violations/84 incomplete nodes**, retaining full vectors. All incompletes concern color contrast: 20 short badge-text nodes and 64 input/MUI Select background-overlap nodes. They require contextual human contrast evaluation. Neither zero violations nor screenshot review closes M01–M12. The prior candidate's 20 PNGs/20 scans remain separate earlier-build observations and are not counted again.
Native proof distinguishes actual owned HTTP/SQLite correspondence reads and a nonlinked review-decision POST from controlled provider/review projections. The saved-list/detail/order/page/owner checks use disposable SQLite. Live-provider failure and the paired review queue use explicit local fixtures. A browser-only provider discriminator exercises fallback against real saved detail; it does not change stored provider data. The review recovery queue projects the actual decision response and is not independent provider persistence readback.
No Google/Outlook/IMAP grant, provider sync/import, suggested-job creation, unlink, compose/draft/send, model call or delivery runs in the native read slice. Unit/backend coverage qualifies those existing request contracts where applicable. Strict real EN/Bokmål language HTTP204 assertions remain ordinary cases: one passing inbox fixture does not diagnose or close the separately reproduced RD11 HTTP500.
Finite EN/Bokmål, light/dark and 320,360,390,768,1024,1280 landscape,1440 and1920 samples cover long inbox/detail/review content and keyboard recovery. Full-page captures can be resized and do not establish viewport focus visibility or physical keyboard behavior. Retain full axe incomplete vectors and the applicable human checks from the [approved handoff](../../phase-6/p6-05/PHASE7_HANDOFF.md#migration-order-and-commit-boundaries).
## Acceptance conditions and next boundary
All 57 preservation groups remain **56 PARTIAL / PRES-C11 DEFERRED** and 32 routes. M01–M12 remain **NOT VERIFIED**. RD11/RD21, screen-reader, physical touch/software keyboard, real zoom, font/photo/native-print/provider and release qualifications remain open.
Complete review and push this second boundary before implementing the separately scoped compose/send repair. Preserve exact draft identity/revision and uncertain-delivery safeguards there. **P5-13 remains withheld; P7-06F remains deferred; production remains NO-GO; main is unchanged; Phase 8 has not started.**
Final inbox hygiene PASS observed2026-10-14 05:14:23UTC: secret and working/staged/phase whitespace gates pass,15 docs/474 local links resolve,57 groups and32 routes retained. Normal development push pending; main unchanged.