Skip to content

[test] canvas: wait for history preview before checking layout - #408

Merged
wangtiance merged 1 commit into
ThinkFlowLab:mainfrom
wangtiance:codex/fix-393-history-preview
Nov 19, 2026
Merged

wangtiance merged 1 commit into
ThinkFlowLab:mainfrom
wangtiance:codex/fix-393-history-preview

Conversation

@wangtiance

Copy link
Copy Markdown
Collaborator

Summary

The node-history browser journey measured image styling after the prompt appeared, while the asynchronous thumbnail could still be absent. It then passed null to getComputedStyle and failed before checking layout.

Locate the detail panel by the expected generated asset ID and wait for its image to be visible, complete and have nonzero natural dimensions before preserving the existing layout/cover assertions. On failure report the asset ID, thumbnail responses, media text and image state. Add optional delayed/missing-thumbnail probes and document their use in Chinese and English. No production UI behavior changes.

Linked issue

Fixes #393

Labels

  • type:ci, area:ci

Test plan

Local Windows / Chrome 157 / Node 26.13.0, isolated creation API + Vite:

  • Normal complete node_versions.mjs journey passed before rebase.
  • HISTORY_PREVIEW_PROBE=delay node tests/browser/node_versions.mjs passed before rebase and again on final tip 4e52ad0 after rebasing onto main.
  • Removing the new readiness block in a temporary test copy under the same one-second delay reproduced the original getComputedStyle null-element TypeError. This is controlled reproduction, not proof of the original CI request timing.
  • HISTORY_PREVIEW_PROBE=missing failed as expected within the bounded wait with History preview unavailable, the expected asset ID, HTTP 404, the missing-media message and an empty image list. This fault probe was checked before rebase; it is not counted as a passing normal journey.
  • Final tip: node --check tests/browser/node_versions.mjs; npm run check:i18n; npm run check:browser-manifest; npm run check:browser-locale; complete PR-diff pre-commit checks; git diff --check passed.
  • Pre-commit used a copied Git index and temporary object directory because the local environment restricts child-process .git writes. All applicable configured hooks ran without exclusions; automatic hook installation remains blocked by .git/hooks permissions.

Left to CI: Release checks and Ubuntu 22.04 extended browser lane. Full Python/frontend unit suites and a production build were not run for this test/docs-only change.

Evidence that it works

N/A for product screenshots: test and validation-documentation changes only. The full delayed journey retained the existing compact layout, cover preview, frozen references, apply/reload and real MP4/WAV checks. Missing media now yields a specific diagnostic instead of a null-element TypeError. This change does not establish or fix an end-user thumbnail service defect.

Provider verification

No live model calls. The journey uses isolated model fixtures and real file, preview, project persistence and browser operations.

Bilingual UI

No user-facing UI strings changed. Fault-probe instructions are included in both Chinese and English.

Only #393 is in scope; no #401 benchmark artifacts, storage code or threshold changes are included.

## summary

- Wait for the expected asset image to load before measuring history.
- Report asset identity, thumbnail responses and media state on failure.
- Add delayed and missing-thumbnail probes and bilingual run guidance.

Fixes: ThinkFlowLab#393
@wangtiance wangtiance added area:ci Continuous integration and checks type:ci Build, test and release automation labels Nov 19, 2026 — with ChatGPT Codex Connector
@wangtiance
wangtiance merged commit aa2288b into ThinkFlowLab:main Nov 19, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Continuous integration and checks type:ci Build, test and release automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] nightly: node version layout check reads the preview before its image is available

1 participant