From f9a00708dbdc1d4ae16516c65d5f9c02050d9cea Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sat, 7 Feb 2026 16:39:59 -0500 Subject: [PATCH] Add AJAX comment submission with graceful fallback. Reply forms now submit via fetch() when JS is available, inserting the new comment into the DOM without a page reload. Falls back to the traditional POST + redirect when JS is disabled or on any error. Documents capability-driven presentation practice in CLAUDE.md. --- CLAUDE.md | 34 +++++++++++ remarkbox/static/js/custom.js | 107 ++++++++++++++++++++++++++++++++++ remarkbox/views/reply_node.py | 24 ++++++++ 3 files changed, 165 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 60df8b4..124d2e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -242,6 +242,40 @@ curl -s "https://git.unturf.com/api/v4/projects/engineering%2Fremarkbox%2Fremark The pipeline status will show `"status":"success"` when deployment is complete. +## Capability-Driven Presentation + +Follow Russell Ballestrini's capability-driven presentation practice +(russell.ballestrini.net/capability-driven-presentation/). A page need not look +identical across all browsers. Accommodate what the user's browser can do: + +1. **Single canonical URI** — one URL serves the content. +2. **Consistent content** — regardless of viewer capabilities. +3. **Graceful enhancement/degradation** — use available capabilities to enhance presentation. + +### The `js-only` / `