Commit graph

6 commits

Author SHA1 Message Date
bbeba96173 EANCH-WP-0004: HtmlViewer scroll parity and viewer-shell workplan
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Export HtmlViewerAdapter from package root, add scrollRequestKey parity,
register finished workplan, update SCOPE.
2026-07-09 09:58:41 +02:00
a1af0c6a45 Implement EANCH-WP-0002 and EANCH-WP-0003 anchor hardening and DOM selectors
All checks were successful
CI Smoke / host-smoke (push) Successful in 4s
CI Smoke / container-smoke (push) Successful in 31s
WP-0002: stale vs unresolved resolution, orphaned flag/helper, bounded
fuzzy quote recovery, and PdfViewerAdapter promotion with resolveSelectors
integration. WP-0003: DomSelectionCapture, DOM create/resolve ladder,
HtmlViewerAdapter under evidence-anchor/dom, and finished workplans.

Verification: 42 anchor tests, citation-evidence typecheck + 51 tests green.
2026-07-09 09:18:42 +02:00
d5c5155df8 EANCH-WP-0001 T05 (prep): make root a full barrel for umbrella cutover
The umbrella's DOM tests vi.mock the single @anchor/index barrel (spreading
the original and overriding PdfSpikeViewer). To keep the cutover a mechanical
specifier swap and preserve those mocks, the evidence-anchor root re-exports
the full surface (pure core + PDF adapter), matching the prior @anchor/index.
evidence-anchor/pdf remains a focused viewer entry. Viewer code still lives
only under src/pdf/ (eslint-enforced). Repo stays green: 30 tests, tc, lint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 21:02:06 +02:00
5b77dbd314 EANCH-WP-0001 T04: extract PDF adapter + scroll/highlight helpers
Move pdf-viewer-adapter-spike.tsx, scroll-job.ts (+test), highlight-styles.css
and debug-textlayer.css into src/pdf/ (the adapter boundary). Rewrite the
spike's @shared import to @citation-evidence/engine/shared and its ./types to
../types. Add src/css.d.ts so tsc accepts side-effect .css imports.

Decisions:
- adapter stays the explicitly-named PdfSpikeViewer spike; promotion to a
  production PDFViewerAdapter is registered as T06 follow-on work
- viewer libs (pdfjs-dist, react, react-pdf-highlighter-plus) confined to
  src/pdf/ and exposed only via the evidence-anchor/pdf subpath; the root
  entrypoint stays pure. Boundary enforced by eslint no-restricted-imports.
- ported unit suites (pdf-selector-math round-trip + scroll-job retry) serve
  as the inspectable harness for capture->selectors->resolve->scroll.

Verified: pnpm test (30 passed), typecheck, lint all green. README layout updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:44:52 +02:00
bd7f56c111 EANCH-WP-0001 T03: extract pure selector creation + resolution core
Move types.ts, selectors/{index,create,resolve}.ts, and pdf-selector-math.ts
out of citation-evidence/src/anchor/ into src/ (pdf math under src/pdf/).
Rewrite all @shared/* imports to @citation-evidence/engine/shared; wire the
public entrypoint (src/index.ts) and the ./pdf subpath. Port the three unit
suites. Confidence ladder and selector-redundancy rules preserved verbatim.

Verified: pnpm test (29 passed), typecheck, and lint all green.
Also adds Node/TS .gitignore entries and the pnpm lockfile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:41:54 +02:00
0e93b68982 EANCH-WP-0001 T02: bootstrap standalone TS package + test harness
Add package.json (name evidence-anchor, exports . and ./pdf, scripts
test/typecheck/lint), tsconfig.json (mirrors engine, DOM+jsx), vitest.config.ts
(happy-dom + react plugin), eslint.config.js (confines viewer libs to src/pdf/),
.nvmrc, and placeholder src entrypoints. Depends on @citation-evidence/engine
via sibling-checkout link only; no citation-evidence internals.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:37:59 +02:00