Skip to content

The data import wizard names an untitled frame the way the canvas does - #650

Merged
MerciHanrim merged 1 commit into
mainfrom
p4-untitled-frame-name
Nov 23, 2026
Merged

MerciHanrim merged 1 commit into
mainfrom
p4-untitled-frame-name

Conversation

@MerciHanrim

Copy link
Copy Markdown
Owner

Part of #611 (review item P4).

What was wrong

Reproduced on main b8bb0a01 (v0.33.1), desktop, with two untitled saved frames (340 × 340 and 40 × 40) and one named "Line 3":

en ko ar
Canvas chip and Model list Group 1, Group 2 그룹 1, 그룹 2 مجموعة 1, مجموعة 2
Wizard, "existing frame" choices Group 1, Group 2 Group 1, Group 2 Group 1, Group 2
Commit into the 40 × 40 untitled frame Not enough free space in "". ""에 여유 공간이 충분하지 않습니다. لا مساحة حرة كافية في "".
  • The choices used f.label || `Group ${f.n}` (DataImportWizard.tsx:957), while the canvas and the Model list use t('canvas.frame.defaultName', { n }); the numbers agreed.
  • The refusal for room quoted target.label (dataImportCommit.ts:351, 354), which is '' for an untitled frame, in every language.

The change

  • DataImportWizard.tsx: a local frameName(f) = the frame's name, or canvas.frame.defaultName with its number, as the Model list does; the choices use it.
  • dataImportCommit.ts: the frame-insufficient-space refusal carries frameId beside frame on both of its paths. A saved frame has no number and the model layer has no catalogue, so the wizard finds that frame in the frame store and names it with frameName, still isolateAuto (obligation wizard-commit-error-names, unchanged). A frame no longer in the store falls back to the label.
  • icu-argument-disposition.json: 577 → 578 arguments (the new {n}, a number).

Not in scope, recorded on #611: one shared helper for the "name or default name" rule, which the Model list, the wizard and the frame layer each write today.

Tests

Failing first on main's code:

  • src/model/dataImportCommit.test.ts, "a refusal for room names the frame by its id as well as its label, on both paths": failed on main (no frameId), passes now.
  • e2e/data-import-wizard.spec.ts, "Korean: untitled frames are 그룹 1 and 그룹 2 in the frame choices and in a refusal for room": on main both checks failed (Group 1, Group 2; then ""에 여유 공간이 충분하지 않습니다.), and it passes now. The wizard is filled in English and switched to Korean at the placement step, as in the reproduction.

The reproduction's three languages again on this branch:

en ko ar
Wizard choices Group 1, Group 2 그룹 1, 그룹 2 مجموعة 1, مجموعة 2
Commit error Not enough free space in "Group 2". "그룹 2"에 여유 공간이 충분하지 않습니다. لا مساحة حرة كافية في "مجموعة 2".

The name in the error is FSI-isolated; the Arabic sentence reads right to left with the name in place (screenshot taken, not attached).

Local:

  • every check:* script: 0 failed;
  • tsc -b: clean;
  • lint: 88 warnings, the baseline;
  • unit: 5719 passed;
  • related e2e on chromium, one worker, no retries: 77 passed (data-import-wizard, data-import-wizard-state, data-import-refresh-errors, data-import-guide, rtl-bidi-isolation); data-import-guide's screenshots were compared against their committed images.

Part of #611 (review P4). The wizard's frame choices named an untitled frame "Group n" in English in every language, and a refusal for room quoted its empty label. The choices now use the frame's name or the catalogue's default name with its number, and the commit's refusal carries the frame's id so the wizard names that frame the same way, still isolated.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying cozy-loop-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7a780be
Status: ✅  Deploy successful!
Preview URL: https://43101463.cozy-loop-studio.pages.dev
Branch Preview URL: https://p4-untitled-frame-name.cozy-loop-studio.pages.dev

View logs

@MerciHanrim
MerciHanrim merged commit 1451421 into main Nov 23, 2026
13 checks passed
@MerciHanrim
MerciHanrim deleted the p4-untitled-frame-name branch November 23, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant