Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

10 — Interaction Specification (Bulk Module)

Precise interaction rules per screen and the long-running import interaction. Motion tokens per 00-shared/08; components in 07.


1. SS1 — Upload interactions

#InteractionRule
1.1File pickFileDropZone click/drop; .csv filter; immediately isolate-parse (15 §4)
1.2Parse failinline AppAlert; file card shows error; Next disabled; live-region announce
1.3Parse successfile card confirms (name, rows, headers); Next enabled; m-fast check-in
1.4Non-UTF-8 / BOMBOM stripped silently; non-UTF-8 → warning card with re-encode guidance (14 §2)
1.5Re-pickreplaces previous file; wizard state (preview/confirm) reset to preview

2. SS2 — Preview interactions

#InteractionRule
2.1Header classificationColumnChip per header (required/optional/unknown)
2.2Blocking warningContractAlert blocking; Import N rows disabled; lists exact missing column names (08 §1)
2.3Sample rowsfirst 10; row # = physical line (header=1)
2.4Backreturns to SS1 with file retained
2.5Unknown columnswarning only; never blocks (server ignores, bulk-import.service.ts:26-30)

3. SS3 — Confirm interactions

#InteractionRule
3.1Start importfires POST /bulk/import/students (multipart field file, bulk.controller.ts:35-48); navigates immediately to SS4 in-flight; CTA disabled to block double-fire
3.2Backallowed until fired; no server side effects before firing

4. SS4 — Result interactions

#InteractionRule
4.1In-flightImportProgressPanel indeterminate; no progress events exist (bulk-import.service.ts:22-65); panel explains and warns
4.2Successsummary card; View students; Download report
4.3Partialgrouped error table; pagination 50; row tap → expand detail
4.4Row actioncopy error string; per-row "open file at line N" hint (rowNumber = line, :46)
4.5Error CSVclient-synthesized: original row + error column; no server endpoint
4.6Fix errors→ SS1 with failed row numbers queued; preview highlights them when the corrected file parses (03 J3)
4.7Pre-row server rejection400/404 rendered as failure card with exact copy (08 §2.1)
4.8429countdown Retry in Ns, no auto-retry (00-shared/07 §4)
4.9Network droppartial-upload guidance; re-upload is duplicate-safe (06 §4.1a)

5. SS5 — Export interactions

#InteractionRule
5.1DownloadGET /bulk/export/students (bulk.controller.ts:50-60); browser attachment students.csv; loading state on button
5.2Emptyheader-only CSV still downloads; toast "No rows exported"
5.3Export ≠ templatedisclaimer on card (04 §6)

6. The long-running import interaction (deep treatment)

The one request-holding interaction is import execution, and everything about it must be honest about the synchronous backend:

AspectDesign
Duration reality~1000 rows × (2 dup checks + 3-4 ref lookups + 2-3 writes) of sequential awaits inside one request (bulk-import.service.ts:45-63; students-import.adapter.ts:38-85)
Feedbackindeterminate progress + copy: "validated and created server-side in one request; keep this tab open"
Duration guardclient request timeout ≥ 120 s (configurable); on timeout → partial-upload guidance (4.9)
File cap1000 rows / ~2 MB at pick time; warning above, block above hard cap (configurable (forward-looking))
Rate budgetone import can be a large chunk of the 100/min api tier (00-shared/07 §4) — warn on very large files
Cancelno server cancel exists; cancel only abandons the response — copy states rows may still be created
Future seamwhen async workers land ((planned), IMPLEMENTATION_PLAN.md:172), the panel switches to determinate + polling; cubit keeps progress + jobId fields ready (13 §4)

7. Motion & micro-feedback

MomentMotion (00-shared/08)
file acceptedm-fast (check icon pop)
parse error / blockm-fast shake + live-region
wizard step advancem-base slide, stepper check pop
result countsm-base count-up on imported/failed
error row expandm-fast height collapse

8. Keyboard / focus

  • SS1 entity select + browse: full keyboard path; drop zone reachable via Tab
    • Enter.
  • SS2/SS4 tables: row # column is focusable; row actions Tab-able.
  • SS3: single CTA, Enter fires; Back via Escape.
  • No text inputs exist anywhere in the wizard except the (forward-looking) entity search — keyboard-avoidance trivial.