Marketing screenshot public/app-workspace-screenshot.png depicts an empty workspace — first-impression asset shows no design #105
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug: marketing asset
public/app-workspace-screenshot.pngshows an empty workspace, not a digitized designSeverity
High — this is the first-impression image on the home page in the "SEE IT IN ACTION" section. It markets the product. Currently it depicts a workspace with just 2 small color swatches and no actual embroidery design.
Reproduction
/.Expected: a workspace screenshot showing a recognizable digitized design (flower or similar) with stitch geometry rendered inside the hoop.
Actual: an empty workspace with hoop outline, faint dot grid, and two small color swatches (blue + green rectangles). No flower shape, no stitch paths visible.
Evidence
http://127.0.0.1:3000/app-workspace-screenshot.png(1440x836 PNG, 8.5 KB-ish).Vision model on the image:
This screenshot is auto-regenerated by the CI
workspace-screenshotjob on every push to main (.forgejo/workflows/ci.yml"Regenerate Workspace marketing screenshot"). The current binary inpublic/is the live output of that job — it IS what the regen produces.Source
tests/e2e/screenshot-workspace.spec.tsseeds the workspace viawindow.__workspaceDispatchwith two stitch objects (Petal A, Petal B). The seeds are:The SEED_REGION at
(60, 60)size(120, 120)is also small.The screenshot is captured via:
Root cause (best guess)
The seeds run in a 240x240 virtual coordinate space at
(60-180, 60-180)— about 50% of the canvas diagonal. They producestitchCount: 320per petal, but the screenshot is taken withawait page.waitForTimeout(500)after the dispatch — perhaps not enough time for the canvas to finish rendering the geometry at 1440x836 capture scale. Or the seeds are too sparse at viewport scale — 6 points per petal means a low-density visual that doesn't read as a "digitized flower" at scale.Worse: the seed had
setStateflipped to 'digitized' andSET_STITCH_OBJECTScalled, but the dispatched events may not have triggered the canvas re-render in time before the 500ms wait. The screenshot could be capturing the workspace post-dispatch but pre-repaint.Suggested fix
await page.waitForTimeout(500)to2000or wait for a stable selector that confirms canvas render.boundingBox: { x: 30, y: 30, width: 180, height: 180 }) so the visual is more readable at the marketing scale.await page.evaluate('document.querySelector("canvas")?.toDataURL()')and confirm pixel coverage > 5%.public/app-workspace-screenshot.pngbefore committing.Fixed in commit
7461c67(pushed to main).Three bugs converged to produce the empty marketing screenshot:
CI workflow path —
.forgejo/workflows/ci.ymlreferencedtests/screenshot-workspace.spec.tsbut the spec was relocated totests/e2e/in commit456af08. Theworkspace-screenshotCI job hasbeen failing to find the spec since Sep 18 07:06 — every run
silently no-op'd.
REPO_ROOT resolution — the spec used
path.resolve(__dirname, "..")which fromtests/e2e/resolves totests/, so theregenerated PNG wrote to
tests/public/app-workspace-screenshot.pnginstead of the canonical
public/app-workspace-screenshot.pngthatsrc/pages/Home.tsxreferences (/app-workspace-screenshot.png).CI's drift gate saw the new file appear and committed it to the
wrong location; the
public/asset stayed frozen at the original#80 regeneration.
Seeds too small + wait too short — even when the spec did run,
boundingBox (60-180, 60-180)on a 200px hoop and a 500ms waitproduced a screenshot where the canvas re-renders hadn't finished
yet. Result: empty hoop, two color swatches, no stitch geometry.
Fixes in
7461c67:tests/e2e/screenshot-workspace.spec.tspublic/of the hoop); coordinates in the same virtual pixel space the
canvas renderer uses at default zoom=1, pan=0
waitForTimeoutbumped 500ms → 2000ms to cover theSET_IMAGE → SET_STITCH_OBJECTS → SET_COLOR_REGIONS → SET_STATE
re-render cascade
on the hoop via
getImageData, asserts ≥5% of pixels are non-linen.Future empty-hoop regens will fail the test instead of silently
shipping
buffer.byteLengththreshold raised 2KB → 8KB to catch theempty-hoop regression independently
tests/public/app-workspace-screenshot.png(redundantleftover from the original relocation)
Regenerated
public/app-workspace-screenshot.pnglocally with the newseeds. Verified thread-color coverage in the committed PNG:
The hoop now renders the flower-like arrangement at the
marketing-image scale.
Verification:
npx tsc --noEmit: passnpm run lint: passnpm test: 335/335 passnpx playwright test tests/e2e/screenshot-workspace.spec.ts: pass