You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share one image-loading helper instead of local copies #132
loadImage in src/hooks/usePrintableFeatureSimulation.ts rejects on error.
Inline new Image() promises in src/hooks/useQuantize.ts, src/hooks/useSwatches.ts, src/hooks/useAppHandlers.ts, src/hooks/useBuildWarning.ts, src/components/DeditherPanel.tsx, src/components/CanvasPreview.tsx and src/components/ThreeDView.tsx.
Because each copy handles errors its own way, fixes such as the zero-size guard from #124 only reach some callers.
Proposal: add one shared helper that loads an image from a URL with a single, documented failure behavior, and switch the copies above to it where their needs match. Leave callers alone when they really need different handling. AGENTS.md keeps src/lib React-free and puts browser concerns in hooks and components, so choose a location that fits that rule. This should not change behavior. The existing unit and e2e tests should pass unchanged.
Activity
vycdev commentedon Nov 7, 2026
Fixed by #141 (merged into develop).
Merge branch 'develop' into refactor/issue-133-image-import-hook