fix(cv): retain preview geometry while refreshing last-good pages

This commit is contained in:
cesnimda
2026-10-26 04:01:22 +01:00
parent 8979244576
commit 61f412bb27
3 changed files with 7 additions and 1 deletions
@@ -48,3 +48,7 @@ The first independent full review found three P2 acceptance gaps: location was c
Fresh full Release backend1227/1227 (40 added cases, zero removed from the preceding1187 report) and frontend981/981 across107 suites passed. Source-bound frontend process before/after hashes match. Two letter browser cases passed after corrections; the unchanged native oracle passed all four letter fixtures/14pages with zero differences. Actual MariaDB source-bound transaction cases and final aggregate Windows/Linux runs remain pending. Re-review of the corrections found no remaining material defect; review did not substitute for execution.
Actual MariaDB source-boundary successor59/59 passed (`provider-final-03`), including three real relational transaction/held-source cases with a stub inference service. Source hashes match and owned cleanup is confirmed. The intermediate `provider-final-02` preparation failed before starting a service or executing tests and remains preserved. Real API authorization checks also passed (missing owned interaction404; free account403). The seven-scenario responsive browser case additionally passed five targeted WCAG A/AA scans with zero violations; incomplete/manual qualifications remain open and final native reports retain their scan details. Its preceding exact-name locator timeout is a fixture failure retained separately: MUI exposes the select's label together with its selected value.
## Last-good preview scroll regression
The aggregate `final-04` run exposed a real regression in both original preview-presentation recovery cases: a held refresh changed scrollTop by7px against the unchanged1px tolerance. The new page selector unmounted while `previewReady` was false, shortening the toolbar and expanding the retained preview viewport. The narrow correction keeps the selector mounted when last-good multi-page HTML exists and disables it until ready. Both original EN/light and NB/dark scenarios now pass, including held/error/retry, retained iframe identity/content and scroll checks (`preview-scroll-successor-01.json`); focused editor50/50 and a fresh static build pass. Independent review found no material issue. No oracle tolerance or original assertion changed. Full frontend successor and fresh aggregate/PDF runs remain pending; failed/interrupted `final-04` is retained.
+2
View File
@@ -22,4 +22,6 @@ Independent review corrections complete: optional contact selection, persistent
Actual provider source-boundary suite59/59 passed with stable sources and positive cleanup; five targeted letter axe scans and real403/404 authorization checks passed. Final aggregate browser/contract/volume and Windows/Linux original CV+letter PDF gates remain open.
`final-04` found and retained a preview scroll regression. One-condition selector lifetime fix passed the unchanged two EN/NB recovery scenarios and50 focused editor tests; static build/review pass. Full frontend successor and `final-05` aggregate qualification remain pending.
Historical evidence: Phase 9 conditional acceptance is inherited, not fresh CV-UX test execution. Hosted isolation/production/manual/provider/AI semantic limitations remain open. Research checksum verification: 83/83; screenshot pairs: 37/37; contact sheets inspected locally. Raw third-party imagery stays outside Git/product assets.
+1 -1
View File
@@ -651,7 +651,7 @@ export default function CvBuilderEditor() {
<Typography variant="caption" color="text.secondary" role="status">
{previewBusy ? t("cvEditorUpdatingPreview") : previewReady ? t("cvEditorPageCount", { count: pages }) : null}
</Typography>
{previewReady && pages > 1 && <TextField select size="small" label={t("cvEditorGoToPage")} value="" sx={{ minWidth: 140 }} onChange={(event) => {
{!!html && pages > 1 && <TextField select size="small" disabled={!previewReady} label={t("cvEditorGoToPage")} value="" sx={{ minWidth: 140 }} onChange={(event) => {
const pane = scrollRef.current;
const page = pane?.querySelector<HTMLElement>(`[data-cv-page="${Number(event.target.value)}"]`);
if (pane && page) pane.scrollTop += page.getBoundingClientRect().top - pane.getBoundingClientRect().top;