Skip to content

Review fixes: PDF reading, part codes in any case, backups, small windows, dependency advisories - #44

Merged
bugragungoz merged 18 commits into
masterfrom
claude/confident-cannon-f4cbps
Oct 23, 2026
Merged

bugragungoz merged 18 commits into
masterfrom
claude/confident-cannon-f4cbps

Conversation

@bugragungoz

@bugragungoz bugragungoz commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Fixes from the review of 22–23 October. Each fix that changes behavior has a check that fails on the old code. The details are in CHANGELOG.md (Unreleased) and docs/STATE.md ("Cloud review, 2026-10-22").

Fixed

  • PDF import (B17). Not reproduced: the PDF import works in the built app in WebView2 (CI: 381 ms, 13 lines) and in the harness (three printed orders).
    • A read that takes over 45 s is now stopped, and the screen says what to do.
    • PDF schematics stayed blank in Chromium 141, because pdf.js's modern build calls Map.prototype.getOrInsertComputed. PDFs are now drawn and read with pdf.js's legacy build.
  • Part codes that differ only in case. "ne555" in an import made a second part next to NE555, although the review had shown the lines summed and the existing stock. Codes now match regardless of case, as the review shows (Rust and TypeScript tests).
  • Backup retention. Once thirty newer backups existed, retention could delete any other .db file in the backups folder. It now deletes only the backups this app writes.
  • Windows under 1100 px:
    • Sidebar names no longer break inside a word.
    • Notices no longer cover the import button, and the same notice no longer stacks.
    • The review's column headers wrap between words instead of being cut.
  • Filter chips. Screen readers no longer read "check mark" as part of a chosen chip's name.

Security

npm audit --omit=dev now reports 0 vulnerabilities (it reported 1 critical and 2 high before).

  • pdf.js 6.4.299 (GHSA-hq66-cqwq-w95j): versions 5.6.83 to 6.2.107 could run a script embedded in a PDF when it was opened. pdf.js 6 removed PDFDocumentProxy.destroy(), so documents are now closed through their loading task.
  • SheetJS 0.20.3 (GHSA-4r6h-8v6p-xvw6, GHSA-5pgg-2g8v-p4x9): the import reads Excel files from shops. SheetJS no longer publishes to npm, so the dependency is the tarball on cdn.sheetjs.com, pinned by its hash in the lockfile. npm ci now needs that host, which GitHub's runners can reach.
  • DOMPurify 3.4.17, which jsPDF brings along. The app never calls jsPDF's html(), the only path that loads it.

Checks

Verified (ran, saw the result) npm run verify (132 unit tests); cargo test --workspace (46 passed); npm run test:ui (146 of 147, see below); node tests/ui/visual.mjs; CI on the branch (the Linux harness, and the built app in WebView2 on Windows)
Timing note In one local full test:ui run in a busy container, the 2,000-line import took 3.8 s against its 3 s budget. Run alone, it took 2.1 s twice. It is a CSV import, unrelated to the dependency changes.
Not verified Any of this on the owner's laptop, including whether B17 is gone there

The branch is 18 commits ahead of master and 0 behind. The commits carry attribution lines, which CLAUDE.md does not allow in commits; "Squash and merge" with an edited message keeps them out of master.

claude added 18 commits October 22, 2026 21:59
The owner's PDF import showed nothing in the app (B17) while the unit tests passed. The unit
tests read the printed orders with pdf.js's legacy build in Node; the app loads the modern build
and its worker in the WebView, which nothing tested. The UI harness now imports the three printed
orders through the page, and the Windows run imports one in the built app, printing the WebView's
console warnings when no review appears.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
When pdf.js never answered, the import screen kept "Reading order.pdf" on screen with no
message (B17). A read now has 45 seconds; after that pdf.js and its worker are told to stop and
the screen says the PDF could not be read and what to do instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
The check on a chosen filter chip was CSS generated content, which browsers read as part of the
button's name ("check mark Low stock, pressed"). aria-pressed already says it is chosen, so the
check now has empty alternative text and stays visual only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
In the narrow sidebar (windows under 1100 px) category names broke inside a word: "Capacit/ors"
with five-digit counts, and "Verbrauchsmaterial" or "Микросхемы" even with small ones. The
hidden rename button kept 28 px empty on every row; it now takes the count's place while the row
is hovered or the button has focus. A name that still does not fit beside its count keeps its
words and the count moves under it. The visual check finds words split across lines in every
language, and with 10,000 parts a category in Turkish and German; it fails on the old layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Under 1100 px the review's import button spans the window, and the notices at the bottom
covered it: three lists from the extension gave three notices, two of them the same "another
list is waiting". The same notice now replaces itself instead of stacking, the review leaves
room under its button to scroll clear of two notices, and the stack starts beside the narrow
sidebar (it was placed for the wide one, 64 px off). The new UI check fails on the old code on
all three counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
The review screen treats "ne555" and "NE555" as one code: it says the lines are summed and shows
the stock of the part already there. The core matched codes exactly, so it wrote a second part
"ne555" (or two, for two spellings) next to the NE555 the owner had reviewed, and in sync mode
the last spelling's count won instead of the sum. Lines are now summed and matched regardless of
case, the exact code first, else the oldest part whose code differs only in case; the review's
stock column uses the same rule. Saving a part by hand is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
In a 960 px window the Turkish header "Birimdeki adet" was wider than its column and was cut to
"Birimdeki ac". Review headers now break between words and the column is a little wider. The
visual check now also looks at the review's headers, and failed on the old layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Retention kept the newest automatic backups and deleted the rest, but it counted every .db file
in the backups folder whose name it could not read as a prunable "legacy" backup. A database
put there by hand, a Drive conflict copy, or a backup of the old app was deleted once thirty
newer backups existed. Retention now deletes only the automatic kinds this app writes (auto and
the copies before imports, undos, bulk changes, restores and deletes); legacy, manual, migration
and unknown files stay. The new test fails on the old code (notes.db was deleted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
pdf.js's modern build calls JavaScript that browsers added only recently
(Map.prototype.getOrInsertComputed). Chromium 141 does not have it, and in it the schematic tab
drew every PDF page blank, with that error on the page. WebView2 follows Edge's release, so the
owner's app may well be the same, and a read that stops on such an error is one way the PDF import
could hang (B17). The legacy build brings what it needs; the unit tests already used it. A new UI
check opens a PDF schematic and looks for ink on the canvas: it fails on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
pdfjs-dist from 5.6.83 to 6.2.107 can run a script embedded in a PDF
when the file is opened (GHSA-hq66-cqwq-w95j). The app opens PDFs the
owner downloads from shops and schematics from anywhere, so it takes
the fixed version.

pdf.js 6 removed PDFDocumentProxy.destroy(); a document is now closed
through its loading task, which also stops a read in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
jspdf pulls in DOMPurify 3.4.16, which has a critical advisory
(GHSA-cg2g-xh64-v4q7 and two related ones). The app does not call
jspdf's html(), the only path that loads it, so it was not reachable,
but the fixed version is within jspdf's range and costs nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
The import reads Excel files that the owner downloads from shops with
SheetJS 0.18.5, which has two advisories for reading crafted files:
prototype pollution (GHSA-4r6h-8v6p-xvw6, fixed in 0.19.3) and a
regular expression that can freeze the window (GHSA-5pgg-2g8v-p4x9,
fixed in 0.20.2). 0.18.5 is the last version on npm; SheetJS publishes
newer ones only on cdn.sheetjs.com, so the dependency points there and
the lockfile pins the tarball's hash. 0.20.3 bundles the helper
packages it used to pull in.

Nothing tested the Excel import itself; a unit test now writes a
two-sheet workbook and checks that only the sheet with known headers
is read, with numbers as typed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjSvfibxNrHGDoM4mZSfdB
Copilot AI balanced review requested due to automatic review settings October 23, 2026 12:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bugragungoz
bugragungoz merged commit 9632b67 into master Oct 23, 2026
4 checks passed
@bugragungoz bugragungoz mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants