Skip to content

feat: add the paper-gloss annotation layer to the glossed page - #31

Merged
ksdisch merged 1 commit into
mainfrom
feat/annotation-layer
Jul 29, 2026
Merged

feat: add the paper-gloss annotation layer to the glossed page#31
ksdisch merged 1 commit into
mainfrom
feat/annotation-layer

Conversation

@ksdisch

@ksdisch ksdisch commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Adds the highlight-and-note annotation layer (select-to-highlight, notes, Notes panel, Markdown/JSON export, JSON import) to the glossed page, injected mechanically by paper-gloss/scripts/inject_annotations.py.

Content-neutral, verified: <p> 58→58, .gloss-term 56→56, per-term tally byte-identical, --check clean, second run byte-identical, 101 block markers stamped, existing ids untouched. Self-containment / theming / math / well-formedness all pass.

Republished in place to the existing Artifact URL, so any annotations a reader already stored survive the redeploy.

The runtime itself landed in claude-config PR #62 behind a 4-round adversarial review; this diff applies it mechanically, so it takes the trivial-diff escape hatch.

Injected via paper-gloss/scripts/inject_annotations.py (ANNOTATE mode): select-to-
highlight, per-highlight notes, a Notes panel, Markdown/JSON export and JSON import,
persisted in localStorage under pg-annotations:forge-gap.

Injection is content-neutral and was verified as such:
  <p> count           58 -> 58 (unchanged)
  gloss-term buttons  56 -> 56 (unchanged)
  per-term tally      byte-identical before/after
  --check             clean; second run byte-identical (idempotent)
  101 data-pg-block markers stamped; existing ids untouched
  self-containment / theming / math / well-formedness all pass

Republished in place to the existing Artifact URL (https://claude.ai/code/artifact/5595b09c-d8f0-4d93-8488-ac3e8966b1f9) — keeping the URL keeps the
origin, which is what lets any annotations a reader already stored survive.

The injected runtime is not new code here: it landed in claude-config PR #62 behind a
4-round adversarial review (1 critical + 6 should-fix found and fixed, all
independently verified). This diff is that reviewed runtime applied mechanically by a
tested injector, so it takes the trivial-diff escape hatch rather than its own round.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TBPk1b1UkoVqSCBpeMib3f
@ksdisch
ksdisch merged commit 419f745 into main Jul 29, 2026
@ksdisch
ksdisch deleted the feat/annotation-layer branch July 29, 2026 09:26
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