Export dialog offers only PES and DST — service also supports EXP (Melco) and JEF (Janome/Elna); add them to the format list #129

Closed
opened 2026-10-03 02:49:16 +00:00 by Mark · 1 comment
Owner

Finding

The service's /v1/export endpoint supports four formats: pes, dst, exp, jef. The client UI's export dialog offers only PES and DST (after the round 4 fix removed the dead SVG/PDF buttons). The TypeScript union (ExportFormat) includes all four, the client wrapper accepts all four, and the service returns 200 with valid bytes for all four — but the user can never pick EXP or JEF.

  • EXP is the Melco / Bernina commercial embroidery format
  • JEF is the Janome / Elna / New Home format

The Help FAQ at src/pages/Help.tsx:125-126 says "any embroidery machine that accepts PES or DST files" — but the service already supports two more machine families that the UI hides.

Where

  • Service: POST /v1/export — confirmed working for exp (4 bytes for the test payload) and jef (130 bytes)
  • Type: src/lib/easystitch-client.ts:66 (export type ExportFormat = "pes" | "dst" | "exp" | "jef")
  • Client wrapper: src/lib/easystitch-client.ts:623 (exportPES — name is misleading, accepts any of the four formats)
  • UI: src/components/workspace/ExportDialog.tsx — FORMATS const (currently ['PES', 'DST'] after round 4)
  • Filename extension mapping: src/components/workspace/ExportDialog.tsx:85-87 (the .format.toLowerCase() map)

Suggested fix shape

Extend the export dialog to offer all 4 formats the service supports:

  • Update FORMATS to ['PES', 'DST', 'EXP', 'JEF'].
  • Add a small label under each format button: "Brother Entrepreneur", "Tajima (most machines)", "Melco / Bernina", "Janome / Elna / New Home".
  • Update the filename extension logic: pes, dst, exp, jef.
  • Update the test in ExportDialog.test.tsx for the new format options.

The 2-column grid from round 4 becomes 4 columns. If 4 columns is too wide, use 2x2.

Discovered by

Gap analysis (2026-10-02) of unreached export formats.

  • Round 4 fix (commit 306d1b7) removed SVG/PDF because they were non-functional. This issue is the inverse: the service is functional, the UI hides the option.
## Finding The service's `/v1/export` endpoint supports four formats: `pes`, `dst`, `exp`, `jef`. The client UI's export dialog offers only PES and DST (after the round 4 fix removed the dead SVG/PDF buttons). The TypeScript union (`ExportFormat`) includes all four, the client wrapper accepts all four, and the service returns 200 with valid bytes for all four — but the user can never pick EXP or JEF. - EXP is the Melco / Bernina commercial embroidery format - JEF is the Janome / Elna / New Home format The Help FAQ at `src/pages/Help.tsx:125-126` says "any embroidery machine that accepts PES or DST files" — but the service already supports two more machine families that the UI hides. ## Where - Service: `POST /v1/export` — confirmed working for `exp` (4 bytes for the test payload) and `jef` (130 bytes) - Type: `src/lib/easystitch-client.ts:66` (`export type ExportFormat = "pes" | "dst" | "exp" | "jef"`) - Client wrapper: `src/lib/easystitch-client.ts:623` (`exportPES` — name is misleading, accepts any of the four formats) - UI: `src/components/workspace/ExportDialog.tsx` — `FORMATS` const (currently `['PES', 'DST']` after round 4) - Filename extension mapping: `src/components/workspace/ExportDialog.tsx:85-87` (the `.format.toLowerCase()` map) ## Suggested fix shape Extend the export dialog to offer all 4 formats the service supports: - Update `FORMATS` to `['PES', 'DST', 'EXP', 'JEF']`. - Add a small label under each format button: "Brother Entrepreneur", "Tajima (most machines)", "Melco / Bernina", "Janome / Elna / New Home". - Update the filename extension logic: `pes`, `dst`, `exp`, `jef`. - Update the test in `ExportDialog.test.tsx` for the new format options. The 2-column grid from round 4 becomes 4 columns. If 4 columns is too wide, use 2x2. ## Discovered by Gap analysis (2026-10-02) of unreached export formats. ## Related - Round 4 fix (commit `306d1b7`) removed SVG/PDF because they were non-functional. This issue is the inverse: the service is functional, the UI hides the option.
Mark closed this issue 2026-10-03 03:08:12 +00:00
Author
Owner

Closed via commit 0ab34ee on Mark/Kimi_Agent_Brother_10_Digitizing_App (main, fast-forward from 7e2f2e5).\n\nThis commit completes #129 on top of the round 4 removal commit (306d1b7) that was already on origin/main when this triage pass landed. Round 4 dropped the dead SVG/PDF buttons and kept the dialog at PES+DST on a 2x2 grid; this follow-up actually offers the other two formats the endpoint accepts (Melco/Bernina EXP and Janome/Elna/New Home JEF).\n\nChanges:\n- src/components/workspace/types.ts: ExportFormat union is now (PES | DST | EXP | JEF), aligned with the service set.\n- src/components/workspace/ExportDialog.tsx: FORMATS = [PES, DST, EXP, JEF]; each button renders its machine-family label under the format code via FORMAT_DESCRIPTIONS (Brother / Babylock, Tajima, Melco / Bernina, Janome / Elna / New Home). Kept the 2x2 grid from 306d1b7 — the labels need the width. The lying cast format.toLowerCase() as pes | dst is now as pes | dst | exp | jef.\n- src/components/workspace/ExportDialog.test.tsx: added a test that all four formats are present, enabled, and each shows its machine-family label; added a test that picking EXP or JEF forwards the correct lowercase key to exportPES. Updated the #format-options only-PES-and-DST assertion to reflect the new four-format state.\n\nTypecheck clean (npx tsc --noEmit), no regressions on the changed files. The unrelated test infra drift (vi.mock for @/lib/easystitch-client missing the getThreadCatalog export that useThreadLibrary now requires) was already on origin/main and is out of scope for #129.\n\nFixes #129

Closed via commit 0ab34ee on Mark/Kimi_Agent_Brother_10_Digitizing_App (main, fast-forward from 7e2f2e5).\n\nThis commit completes #129 on top of the round 4 removal commit (306d1b7) that was already on origin/main when this triage pass landed. Round 4 dropped the dead SVG/PDF buttons and kept the dialog at PES+DST on a 2x2 grid; this follow-up actually offers the other two formats the endpoint accepts (Melco/Bernina EXP and Janome/Elna/New Home JEF).\n\nChanges:\n- src/components/workspace/types.ts: ExportFormat union is now (PES | DST | EXP | JEF), aligned with the service set.\n- src/components/workspace/ExportDialog.tsx: FORMATS = [PES, DST, EXP, JEF]; each button renders its machine-family label under the format code via FORMAT_DESCRIPTIONS (Brother / Babylock, Tajima, Melco / Bernina, Janome / Elna / New Home). Kept the 2x2 grid from 306d1b7 — the labels need the width. The lying cast `format.toLowerCase() as pes | dst` is now `as pes | dst | exp | jef`.\n- src/components/workspace/ExportDialog.test.tsx: added a test that all four formats are present, enabled, and each shows its machine-family label; added a test that picking EXP or JEF forwards the correct lowercase key to exportPES. Updated the #format-options only-PES-and-DST assertion to reflect the new four-format state.\n\nTypecheck clean (npx tsc --noEmit), no regressions on the changed files. The unrelated test infra drift (vi.mock for @/lib/easystitch-client missing the getThreadCatalog export that useThreadLibrary now requires) was already on origin/main and is out of scope for #129.\n\nFixes #129
Sign in to join this conversation.
No description provided.