Add machine-profile selector: Help page advertises 6 Brother machines (PR-1050X, PR-680W, PR-1000e, PE-800, SE-1900, PRS100) but client only sends machineProfile=brother-pr10, service rejects anything else with 422 #136
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#136
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?
Finding
The Help page (
src/pages/Help.tsx:111-118) advertises 6 Brother machines in a compatibility table:The codebase supports 1:
machineProfile: "brother-pr10". The type insrc/lib/easystitch-client.ts:26, 67is a single-string literal, not an enum. The service rejects any other machine profile with 422 (verified at runtime). The RightPanel has no machine profile selector. The auto-digitize handler atsrc/components/workspace/useWorkspace.ts:697and the export handler atsrc/components/workspace/ExportDialog.tsx:84both hardcodemachineProfile: "brother-pr10"(viadigitize-adapters.ts:55andeasystitch-client.ts:634).This is a real product gap with three concrete consequences:
The Help page also references a "jumbo 14×8 (BDFH)" hoop (
src/pages/Help.tsx:103-104). The 14×8 hoop is not a real Brother hoop size; the largest Brother Entrepreneur hoop is 8×12 (200×300mm). The BDFH acronym doesn't correspond to any known Brother hoop.Where
"brother-pr10";POST /v1/exportwith any other value returns 422src/lib/easystitch-client.ts:26(MachineProfile = "brother-pr10") and:67(export reuses it)src/lib/digitize-adapters.ts:55andsrc/lib/easystitch-client.ts:634src/pages/Help.tsx:111-118src/pages/Help.tsx:103-104Suggested fix shape
Two scopes — pick one or both:
Service-side: extend the
machineProfileenum to accept the 6 documented machines. Addbrother-pr680w,brother-pr1000e,brother-pe800,brother-se1900,brother-prs100to the literal type insrc/lib/easystitch-client.ts:26, 67. Each profile carries:name: human-readable nameneedles: 10 | 6 | 1maxHoopMm: { w, h }threadSystem: "pr10" | "single"pesVersion: 6limits: { maxColors, maxStitchCount, maxJumpStitchLengthMm }Update the
AutoDigitizeSettingstype to accept the new profile. The service may need matching updates; the openapi spec currently constrainsmachineProfile: "brother-pr10".Client-side: add a Machine Profile selector to the RightPanel's Design Settings section. The selector lists the 6 machines; selecting one updates the workspace state and affects:
machineProfilefield sent in digitize/export requestsStore the chosen profile in the workspace reducer (similar to
hoopSize).The implementation: define a
MACHINE_PROFILESconst in the codebase with the 6 entries; typeMachineProfileto its keys; the rest of the app reads from the const for filters/limits.Severity
High. The Help page is making product claims the codebase can't back up. A user with a PE-800 reading "Limited" might think the app partially supports their machine; reality is the app sends every request as if it's a PR-1050X.
Discovered by
Gap analysis (2026-10-02) of unreached machine-specific features.
Related
parseDesignFile.ts(issue #131) — file parser doesn't know about machine-specific limits eitherClosed: machine-profile selector shipped.
Feature commit (already on origin/main):
26743a0 fix(#136): add machine-profile selector with hoop auto-clampBuild/lint repair:
b59355c fix(#136): make pnpm build passTest repair:
c777714 fix(#136): make StitchObjectDetail lookup and repro-64-ui test passGate repair (just pushed):
459f252 fix(gate): repair SettingsModal add/remove and ExportDialog format/swatch testsMACHINE_PROFILES catalog with 6 entries now in src/lib/easystitch-client.ts; MachineProfile union type replaces the legacy "brother-pr10" literal; SET_MACHINE_PROFILE reducer auto-clamps hoop to machine maxHoopMm; RightPanel got a Machine Profile selector above the hoop dropdown; ExportDialog passes designSettings.machineProfile through to /v1/export; issue-136.test.tsx covers the catalog, threading, hoop clamp, and selector (11/11 pass).
Full test suite: 591/591 passing across 58 files. tsc clean. Lint clean (1 pre-existing warning). Build green.
Pushed: f29cfd1..459f252.