remarkbox/docs/tickets/7.md
russell@unturf.com f1cffe2e79 Resolve all 14 tracked tickets (T0-T13)
High priority fixes:
- T0: Profile page now filters comments by namespace (was leaking cross-site)
- T1: URI hostnames and namespace names normalized to lowercase (was causing
  duplicate threads and "stock comments" bug). Includes merge script.
- T2: Thread detail API now paginated with SQL-side filtering (was 502 on
  267+ reply threads)

Features:
- T3: GDPR account deletion (tombstone user with scrubbed PII) and data export
- T4: Customizable button text and comment labels per namespace
- T5: Self-service namespace deletion for owners
- T6: @mention notifications with profile links
- T7: Webmention receiving endpoint with h-card extraction
- T8: Configurable max nesting depth and collapse depth per namespace
- T9: AJAX thread title search to prevent duplicates
- T10: Browser push notification support (VAPID/service worker)

Docs and housekeeping:
- T11: Documented thread_uri behavior when moving embeds
- T12/T13: Drafted community replies for resolved feature requests
- Collapse depth defaults to infinite (load-more disabled unless configured)

364 tests pass, 4 skipped.
2026-02-01 20:02:47 -05:00

2.7 KiB

T7: Webmentions / IndieWeb support

Status: resolved Priority: low Source: meta bd7112ff-486b-11ec-aee0-21646204cc72 Filed: 2026-02-01

Problem

A user requested Webmention support (an IndieWeb standard for cross-site comment notifications). Russell expressed interest but said he lacks the expertise and would need a mentor.

Context

Webmentions allow sites to notify each other when content is linked. For Remarkbox, this would mean:

  • Receiving webmentions when someone links to a Remarkbox thread from their own site
  • Sending webmentions when a Remarkbox comment links to an external URL
  • Displaying received webmentions alongside regular comments

Reference: https://indieweb.org/Webmention

Resolution

Implemented W3C Webmention receiving endpoint with verification, author extraction, and display.

New files

  • remarkbox/models/webmention.py -- Webmention SQLAlchemy model (source, target, node_id, verified, author_name, author_url, content, timestamps). Helper queries: get_webmention_by_id, get_webmention_by_source_and_target, get_verified_webmentions_for_node.
  • remarkbox/views/webmention.py -- POST endpoint for receiving webmentions. Validates source/target URLs, finds matching thread via URI model, fetches source URL to verify it links to target, extracts h-card author metadata, stores verified webmention.

Modified files

  • remarkbox/models/meta.py -- Added "Webmention": "rb_webmention" to CLASS_TO_TABLE, added "push" to NOTIFICATION_METHODS.
  • remarkbox/models/__init__.py -- Added from .webmention import *.
  • remarkbox/routes.py -- Added webmention route at /webmention.
  • remarkbox/api/__init__.py -- Added api-webmention route at /api/v1/webmention.
  • remarkbox/__init__.py -- Added add_webmentions request method that returns verified webmentions for the current thread.
  • remarkbox/templates/show-node.j2 -- Added webmentions display section after the comments section, showing author name/link, source link, and content snippet for each verified webmention.

How it works

  1. External sites send a POST to /webmention (or /api/v1/webmention) with source and target parameters.
  2. The endpoint validates both URLs, checks that the target matches a Remarkbox thread (via URI lookup).
  3. The source URL is fetched and verified to contain a link to the target.
  4. Author info is extracted from h-card microformats in the source HTML.
  5. A content snippet is extracted from around the target link.
  6. The webmention is stored and marked as verified.
  7. Verified webmentions are displayed at the bottom of the thread page.

Acceptance Criteria

  • Research completed on webmention protocol requirements
  • Receiving endpoint implemented
  • Webmentions displayed alongside comments