Repository navigation
The data wizards' Header row and Ignore last N rows take a number on Enter or on leaving the field - #660
Merged
Conversation
…Enter or on leaving the field Both wizards use DraftNumberInput with commitOnConfirm (a whole number >= 1, or >= 0 for Ignore last N rows): a blank no longer snaps to the minimum and no key on the way reparses the paste. A confirmed header row with another cell count still resets the import roles. Part of #615.
Deploying cozy-loop-studio with
|
| Latest commit: |
3d86d4b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://444bd4d9.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://import-row-fields-confirm.cozy-loop-studio.pages.dev |
Header row 2 confirmed is read as the header (Next goes straight to the review, not to Column changes); Ignore last N rows applies by Enter and by Tab (1 row missing from the new data, then none) and a blank confirmed brings the value back. Part of #615.
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #615 (item 1's two wizards' header-row fields; with #659's trigger delay, this completes item 1).
What was wrong
Measured on main
0564cda0, keys typed one at a time:3[ignored],[], then[ignored × 3]back at row 2Both wizards passed every change of "Header row" and "Ignore last N rows" through
sanitizeRowCount, so a blank became the minimum at once. The import wizard also reparsed the paste on each change. A reparse resets the roles whenever the header row's cell count differs, and on the way the row passed through the one-cell note line.The change
In both wizards, both fields use
DraftNumberInputwithcommitOnConfirm, as Seed, Runs and Steps do. The value is set on Enter or on leaving the field:The rule that a confirmed header row with another cell count resets the import roles is unchanged.
sanitizeRowCountis removed from both files; nothing uses it now.Kept out, by agreement: the refresh wizard's Column changes choices reset by Back → Next. They reset even without touching the header row. It is listed in #615's follow-up scope.
Tests
e2e/import-row-fields.spec.ts(new, written first; run on main's code first):3shows 3 (not 13), roles as set; select all +2+ Enter: still 2, roles kept[ignored]; header row 2 by leaving the field (Tab) resets them to[ignored × 3]1+ Enter sets 1; a blank confirmed by Tab shows 1 againThe refresh wizard test checks:
3: the field never shows 1 or 13;1+ Enter is set, and a blank confirmed by Tab brings 1 back;itm_b, is ignored);0+ Tab: the review has no missing row, and the header row is still 2.On main's two wizard files (checked out temporarily, then restored from the branch head) this test fails three ways: the snapped field, the snapped 0, and the blank not bringing 1 back.
e2e/data-import-wizard.spec.ts:137filled the header row and picked a role straight away, relying on the per-key update. It now presses Enter after filling, as a person sets the field.Checks
npx tsc -b: clean.npm run lint: 88 warnings, the baseline.check:*scripts: pass.Local note
The first local e2e runs did not start. Vite re-optimised its dependencies ("vite config has changed"), and the first page request took about 48 s to answer, past Playwright's 60 s server wait including the start. No test ran in those attempts. Once the dependency cache was rebuilt, the runs above went normally. It came back after the first commit (the first request then took 89 s), and was handled the same way: the dev server was started once and left to answer before the run. This affects nothing in the PR.
What it touches