diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-27 01:01:18 +0100 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-27 01:01:18 +0100 |
| commit | bc4cc19df5f53519ca1aabd3cf161b6d78ffc16c (patch) | |
| tree | 3242a63f603882d723bd0d718d043c30a9f11784 /source/settings/CodeForm.mc | |
| parent | 34daecaa25e5bdd995179a2b4b9d922f8bbb3b54 (diff) | |
fix(pin): the work after a PIN and the change queue run in steps
After a correct or new PIN, promoting pending entries and applying waiting
"Require PIN" changes ran in the event of the last PBKDF2 step; 16 waiting
changes tripped the watchdog on the Forerunner 70. ChangeQueue.LockJob now
does it in steps while the PIN screen shows "Checking...", saves what it did
to the results and refreshes the glance after Set PIN too.
The list title decrypted every waiting change at each start. Queue items
are now [action, box] (aad OTPW-Q-2 + action code), so they are counted
without decrypting; 0.9.0 items are still read. A replacement is checked
when it arrives and its material is sealed apart (qm.<n>). Large buffers
are wiped and UTF-8-checked in pieces (Jobs.Wiper, Bytes.utf8Prefix,
SealedBox.openKeep/sealKeep). "Phone changes" reads behind "Reading...",
and Confirm all / Reject all act only on the changes shown. Storage full
no longer stops the app at the PIN.
Found by the review of b8addc8/096b5a4 and a new make watchdog test; the
diff was reviewed again and its findings fixed. fr70: make lint, make test
(176), make watchdog (19 cases at two steps per event), make screenshots
pass; list_locked and list_reset goldens show "Results ready (menu)".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/settings/CodeForm.mc')
| -rw-r--r-- | source/settings/CodeForm.mc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/settings/CodeForm.mc b/source/settings/CodeForm.mc index 810cd6e..0c3470c 100644 --- a/source/settings/CodeForm.mc +++ b/source/settings/CodeForm.mc @@ -89,8 +89,14 @@ module CodeForm { // The contents as stored (trimmed for linear codes, whose digits are // often typed with spaces around), or the problem. function contents(text as String, symbology as Number) as ByteArray or String { - var value = Codes.isLinear(symbology) ? Text.trim(text) : text; - if (Text.trim(value).length() == 0) { + return contentsOf(text, Text.trim(text), symbology); + } + + // As contents(), with the text already trimmed (ManageRun trims + // kilobytes in steps). + function contentsOf(text as String, trimmed as String, symbology as Number) as ByteArray or String { + var value = Codes.isLinear(symbology) ? trimmed : text; + if (trimmed.length() == 0) { return "Contents: missing"; } var bytes = Bytes.fromUtf8(value); |
