8000 feat(iiif): notes and comments as W3C Web Annotations by adeelahmad · Pull Request #696 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(iiif): notes and comments as W3C Web Annotations - #696

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn
Oct 19, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: an asset's IIIF Manifest carried its media and chapters, but none of the shared notes and comments people left on it, so IIIF viewers couldn't show them.

After: with notes turned on in iiif.layers (off by default, a switch in Settings), the Manifest lists the asset's shared notes and comments as a W3C Web Annotation AnnotationPage at /iiif/<id>/annotations/notes. Notes and threads are commenting annotations on their moment or the whole canvas, replies are replying to their thread, and on documents they sit on their page.

Only people with a role on the asset get the page (their sign-in or the IIIF cookie). Unshared notes are never included, and the public, share, signed and IP-group links never get it. Chapters were already Ranges and are unchanged.

Motivation and Context

Personal feature plan: notes in open, standard annotation form.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

Done questions (AGENTS.md)

  • Goal: delivers what the user wanted, merged on green CI.
  • Agents: the annotation page is a plain JSON-LD endpoint; the layer setting is in the settings API.
  • Zero setup: no new prerequisite, .env edit or manual step.
  • Fewest clicks and keystrokes: one switch.
  • Configurable: iiif.layers gains notes, editable in Settings, off by default.
  • Light: no new dependency.
  • Private and secure: members only, shared notes only; threat model row added (md + yaml), validator agrees.
  • Cost: no model calls.
  • User decides: off until turned on; defaults unchanged.
  • Upgrades: n/a, no stored-data change.
  • Honest: README built list and docs/requirements.md updated.
  • Tests, docs and generated files updated.
  • Open standards: IIIF Presentation 3 and W3C Web Annotation.
  • Result reported; nothing left to refine.
  • Reuse: existing IIIF layer and notes code reused.

Local CI: pytest tests/api/test_iiif.py tests/api/test_documents.py (16 passed, 1 skipped), ruff, mypy, ci/check_requirements.py, ci/validate_threat_model.py all clean.


Generated by Claude Code

With `notes` in iiif.layers (off by default), an asset's Manifest lists its
shared notes and comments as an AnnotationPage at /iiif/<id>/annotations/notes:
notes and threads `commenting` on their moment or the whole canvas, replies
`replying` to their thread; on documents, per page. Only people with a role
on the asset get it (their sign-in or the IIIF cookie), never unshared notes,
never the public or share, signed and IP-group links. Chapters were already
structures Ranges and are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
@adeelahmad adeelahmad self-assigned this Oct 19, 2026
@adeelahmad
adeelahmad merged commit 07cee67 into main Oct 19, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-xfmkzn branch October 19, 2026 18:05
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.

2 participants

0