You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code review: one definition per rule, ESLint gate, teardown fixes, docs reconciled
Full review per CODE.REVIEW.md (style, language conformity, doc/code
consistency, and shared-data redundancy).
Bugs fixed:
- ROIDrawer.destroy() now clears the baked overlay layer, so autoAttach's
destroy-then-attach no longer leaves an orphan #drawnrois layer + stale
svgo.layers entry (the adapter's comment claimed this already happened).
- One isTextEntry() rule (ui/dom-utils.js) for every keyboard guard: the
edit overlay's Delete guard blocked ALL inputs, so Delete went dead
while the Import file input held focus.
- LassoOverlay's 800 ms settle re-measure is tracked and cancelled on destroy.
- test fake's setOverlayLayer returns the contract's boolean.
Redundancy collapsed to single homes:
- Bezier segment topology (segCount/segControls/minAnchors/hasCurve in
core/bezier.js) now feeds both samplers, both nearest-point searches,
deleteAnchor, the edit overlay, and the adapter's SVG path writer;
test/bezier-topology.test.js pins that they agree.
- uvPxCorrespondences()+ALL_UV_BOUNDS (viewer-adapter.js) replaces two
copies; ndcToPixel replaces the adapter's _ndc; polygonBounds replaces
two bbox loops; TimerSet (core/timer-set.js) replaces two _later/Set
copies; CanvasOverlay (ui/overlay-canvas.js) is the shared overlay base;
MODE/TOOL/asTool name the mode+tool vocabulary; ShapeSet.defaultName
unifies prompt defaults with the import fallback; fitRingBezier,
_promptName, _export dedupe the controller; make_viewer.py imports
bake.bake(); test:py uses unittest discover.
Style gate: eslint flat config (recommended + repo conventions), run
first by npm test and CI; tree is lint-clean; README documents the
conventions. Docs reconciled across 13 stale claims (viewer-adapter
header, TESTING.md phantom test, ROI-only wording, the "Not here"
pointer at a private repo from this now-public one, etc.).
Tests 161 -> 174 JS + 12 Python, all green; bundle rebuilt and
smoke-tested headless (Firefox) against a real baked viewer, including
destroy + re-attach with no orphan layer.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments