Skip to content

[WIP] Version 5.4#347

Draft
ankitrohatgi wants to merge 13 commits into
masterfrom
version_5_4
Draft

[WIP] Version 5.4#347
ankitrohatgi wants to merge 13 commits into
masterfrom
version_5_4

Conversation

@ankitrohatgi

Copy link
Copy Markdown
Member

WIP

ankitrohatgi and others added 11 commits June 14, 2026 13:47
Remove the on-load redirect to /login so users can access WPD without
being logged in. When a logged-out user clicks AI Assist, show a dialog
with a link to open the login page in a new tab instead of navigating away.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- bootstrap-icons: ^1.11.3 → ^1.13.1
- pdfjs-dist: ^4.2.67 → ^4.10.38 (staying on v4; v5/v6 has breaking API changes)
- sinon: >=13 → >=22, qunit: >=2.19 → >=2.26, karma: >=6.3 → >=6.4
- uglify-js, js-beautify, karma-chrome/firefox/qunit launchers also bumped
- npm audit fix: resolved 16 dev-dependency vulnerabilities

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v6 API is fully compatible with existing usage (getDocument, GlobalWorkerOptions,
getPage, getViewport, render, numPages, getPageLabels). Build file paths
pdf.min.mjs and pdf.worker.min.mjs are unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v6 no longer accepts a plain string; it requires an object with
a url, data, or range key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Asserts getDocument is called with an object { url } rather than a
plain string, catching the breaking API change introduced in pdfjs-dist v6.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extend math_functions_tests.js with tests for taninverse, distance
functions, 2x2 matrix ops, cspline, and normalizeAngleDeg. Add six new
test files covering ConnectedPoints/measurements, ColorGroup/colorAnalyzer,
InputParser, Calibration, PolarAxes coordinate transforms, and
AveragingWindowCore — all previously untested modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Convert IIFE-wrapped tool constructors to ES6 classes in
  manualDetectionTools, maskTools, colorPickerTools, gridDetectionTools,
  and measurementTools; closed-over vars become this._fields
- Replace var with let/const in method bodies across tool files,
  manualDetection controller, and core axes files (xy, bar, polar, ternary)
- Add static metadata (typeString, axesClass, calibrationSpec,
  calibrateButtonId) to all calibrator classes and replace four
  if-else chains in wpd.alignAxes with registry lookups
- Split axesCalibration.js: move calibrator classes to new
  axesCalibClasses.js, leaving the workflow coordinator in axesCalibration.js

All 127 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ankitrohatgi ankitrohatgi changed the title [WIP] Version 5 4 [WIP] Version 5.4 Jun 16, 2026
ankitrohatgi and others added 2 commits June 16, 2026 00:52
Four new test files covering outcome-based behavioral contracts:
- undo_manager_tests: state machine invariants (canUndo/canRedo before
  and after insert, undo, redo, branch, and clear)
- image_ops_tests: pixel correctness for hflip via runImageOp interception
- color_picker_tools_tests: transparent pixel → white fallback behavior
- calibrators_tests: metadata contract (typeString, axesClass,
  calibrationSpec, calibrateButtonId) for all 6 calibrator classes

146 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The mindex formula used (iheight - rowi - 2) instead of (iheight - 1 - rowi),
causing row 0 to mirror to the wrong row and producing a negative index for
height=1 (silently corrupting pixel data). Updated image_ops_tests to cover
the 1×2 swap case and the 1×1 no-op case that exposed the bug.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant