parseDesignFile.ts is dead code — Gallery upload ships hash-derived fake metrics #72
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#72
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?
Where:
src/components/gallery/parseDesignFile.ts(156 lines, exportsparseDesignFileandextractExtension).src/pages/Gallery.tsx:17, 153importsdesignFromFilefromsrc/components/gallery/data.ts:84.grep -rn 'parseDesignFile' src/returns only the export line — no imports anywhere.Bug:
designFromFile(data.ts:84-109) writesstitchCount = 1000 + (hash % 49000),threadCount = (hash % 10) + 1, and 4 hash-derivedthumbnailColorsfor every upload.parseDesignFile.ts(which read#PEC0001magic, count non-terminating stitch triplets, parse SVG fill attributes) are never called..pesfiles see 1k–50k fake stitch counts and arbitrary color swatches in their Gallery cards.Fix consistent with existing patterns:
Wire the parser into the upload handler. Change
src/pages/Gallery.tsx:147-164handleFileChangefrom sync to async:Add
parseDesignFileto the import list onGallery.tsx:12-18.Acceptance: an uploaded
flower.pesshows the real PEC stitch count in the card (not1000 + hash%49000).toparseDesignFile.tsis dead code — the Gallery upload path uses hash-derived fake metrics insteadparseDesignFile.tsis dead code — Gallery upload ships hash-derived fake metrics