Skip to content

refactor(optical_flow_lk): de-duplicate the last module — thin aggregator reached (#47)#70

Merged
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-optical_flow_lk
Jul 8, 2026
Merged

refactor(optical_flow_lk): de-duplicate the last module — thin aggregator reached (#47)#70
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-optical_flow_lk

Conversation

@kalwalt

@kalwalt kalwalt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Ninth and final slice of #47. 🎉

What changed

  • src/optical_flow_lk/optical_flow_lk.ts — the last type-only stub replaced by the real implementation, verbatim from the monolith (track). Constructor instantiates imgproc via direct module import (established pattern).
  • src/jsfeatNext.ts — now a 59-line thin aggregator: imports the modules, attaches them to the public namespace, nothing else. Unused helper imports pruned (they're consumed by the modules themselves now).

What this completes

The full stub/monolith de-duplication (#47):

Verification

  • tsc --noEmit → clean
  • npm test57/57 (the optical_flow_lk parity test pins track() vs original jsfeat across pyramid levels)
  • UMD bundle checked: all 18 public modules attach (cacheoptical_flow_lk), instanceof chains hold, VERSION intact
  • dist//types/ untouched — to be rebuilt once in the integration→dev PR

After this merges

The integration branch feat/refactor-jsfeat-next is complete and ready for its final PR into dev (with a one-shot dist/+types/ rebuild and a final round of example testing). Closes out the implementation of #47.

🤖 Generated with Claude Code

…s is now a thin aggregator (#47)

Ninth and FINAL de-duplication step of #47.

- src/optical_flow_lk/optical_flow_lk.ts: replace the type-only stub with
  the REAL implementation moved verbatim from the monolith (track). The
  constructor instantiates imgproc via direct module import instead of the
  jsfeatNext.imgproc static slot.
- src/jsfeatNext.ts: now a 59-line THIN AGGREGATOR - it only imports the
  modules and attaches them to the public namespace. Unused helper imports
  (resample/convol kernels, linalg_base, fast_private, orb/yape06 utils,
  point_t, JSFEAT_CONSTANTS) pruned; they are consumed by the modules
  themselves now.

This completes the stub/monolith de-duplication: every algorithm lives in
its own real module under src/<module>/, extending the shared base from
src/core/core.ts. No type-only stubs remain; the audit's section-4 target
architecture (thin aggregator) is reached for the module layer.

Verified behavior-preserving: tsc --noEmit clean; npm test 57/57 (the
optical_flow_lk parity test pins track() vs original jsfeat across pyramid
levels); UMD bundle checked - all 18 public modules attach and instanceof
chains hold.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kalwalt kalwalt added this to the Parity & Modernization milestone Jul 8, 2026
@kalwalt kalwalt self-assigned this Jul 8, 2026
@kalwalt kalwalt added enhancement New feature or request Typescript all about Typescript code design javascript tests labels Jul 8, 2026
@kalwalt kalwalt merged commit 04f1be0 into feat/refactor-jsfeat-next Jul 8, 2026
4 checks passed
kalwalt added a commit that referenced this pull request Jul 8, 2026
One-shot artifact rebuild for the integration of the stub/monolith
de-duplication (#62-#70) into dev, per the agreed convention (refactor PRs
ship source only; artifacts are rebuilt at integration/release points).

- dist/jsfeatNext.js (UMD) + dist/jsfeatNext.mjs (ESM) rebuilt from the
  refactored source
- types/ regenerated: now mirrors the new module layout, including
  types/src/core/core.d.ts and types/src/motion_model/motion_model.d.ts

Verified: npm test 57/57; all 18 public modules attach on the fresh UMD
bundle; VERSION 0.7.6 intact; no .d.ts files leak into dist/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kalwalt added a commit that referenced this pull request Jul 9, 2026
One-shot artifact rebuild for the integration of the stub/monolith
de-duplication (#62-#70) into dev, per the agreed convention (refactor PRs
ship source only; artifacts are rebuilt at integration/release points).

- dist/jsfeatNext.js (UMD) + dist/jsfeatNext.mjs (ESM) rebuilt from the
  refactored source
- types/ regenerated: now mirrors the new module layout, including
  types/src/core/core.d.ts and types/src/motion_model/motion_model.d.ts

Verified: npm test 57/57; all 18 public modules attach on the fresh UMD
bundle; VERSION 0.7.6 intact; no .d.ts files leak into dist/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kalwalt kalwalt deleted the refactor/47-dedup-optical_flow_lk branch July 10, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code design enhancement New feature or request javascript tests Typescript all about Typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant