The Export report can print undefined #43
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mobrule/kurageyomi#43
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?
What to build
The Export panel reports a failed sync as:
undefinedis a JavaScript value that reached the screen — the sync failure's reason is not being read off the wire, so whatever AnkiWeb actually said is lost between the server and the panel.Two things to fix, and the second is the one that keeps it fixed:
Read the reason. Find where the sync failure crosses the wire and carry its reason the way the per-Capture failures already carry theirs.
Make
undefinedunrenderable. A field that can arrive missing and be printed anyway is a shape problem, not a typo. Whatever the panel prints should come from a value the wire mapping has already turned into a string — a missing reason should read as an honest "no reason given", not as the name of a JavaScript value. Nothing the reader sees should be able to sayundefinedagain.Worth checking the other report lines while in there: the same pattern would produce the same result for a failure reason, a count, or a Headword that did not arrive.
Acceptance criteria
undefinedornullundefinedBlocked by
None - can start immediately.
Added after filing: one word, one line
The first real Export reported three failures, two of them the same Headword:
That is honest — two Captures of 茶番 really did fail, with different Cues and different files — but it reads as two problems when it is one word that failed twice, and it invites the reader to think Export is about to make duplicate Notes. It is not: those two collapse to one Note at Export, oldest winning, and both leave the queue.
Group the report's failures by Headword and say how many Captures each covers, so one word reads as one line:
Where the Captures failed for different reasons, the line must not pretend they failed for one. Same shaping code as the
undefinedfix, which is why it belongs here rather than in an issue of its own.Added acceptance criteria