diff --git a/CHANGELOG.md b/CHANGELOG.md index 872829e..7c05e2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.14.2] - 2026-11-10 + +### Added + +- Quotes have a count in the line under each note (❝) and in the counts on the home, tag and Likes pages. It includes quotes a silo reports without names (Threads, and people who opted out of backfeed), which were stored but shown nowhere + +### Removed + +- The editor pages no longer load `marked` from a CDN and an empty `static/js/preview.js`; nothing used them +- The empty `templates/feed.xml`, the v1 `static/indielogin-test.html`, and the `THREADS_API` setting that crossposting read but nothing could set + ## [2.14.1] - 2026-11-10 ### Fixed diff --git a/docs/architecture/indieweb-protocols.md b/docs/architecture/indieweb-protocols.md index 185a093..049d289 100644 --- a/docs/architecture/indieweb-protocols.md +++ b/docs/architecture/indieweb-protocols.md @@ -266,7 +266,7 @@ tombstone, so a re-sent webmention or backfeed doesn't bring it back. Changes that alter what is shown also re-send the note's webmentions. Note pages show approved, valid responses. Under the note, a line of counts -(♥ likes, 🔁 reposts, 💬 replies, bookmarks) opens a card on hover or focus +(♥ likes, 🔁 reposts, 💬 replies, ❝ quotes (v2.14.2), bookmarks) opens a card on hover or focus listing who responded and where from, including anonymous silo counts. Each like, repost and reply count holds an `` web action whose fallback links to the note's crossposts (v2.13.2). The Responses diff --git a/docs/design/INDEX.md b/docs/design/INDEX.md index 395295c..f248f64 100644 --- a/docs/design/INDEX.md +++ b/docs/design/INDEX.md @@ -21,7 +21,7 @@ is in `../architecture/`; decisions are in `../decisions/` (ADRs). ## Contents -[v0.x](#v0x) · [v1.0.0](#v100) · [v1.1.1](#v111) · [v1.1.2](#v112) · [v1.2.0](#v120) · [v1.3.0](#v130) · [v1.3.1](#v131) · [v1.4.0](#v140) · [v1.4.1](#v141) · [v1.4.2](#v142) · [v1.5.0](#v150) · [v1.6.0](#v160) · [v2.0.0](#v200) · [v2.0.1](#v201) · [v2.0.2](#v202) · [v2.1.0](#v210) · [v2.2.0](#v220) · [v2.3.0](#v230) · [v2.3.1](#v231) · [v2.3.2](#v232) · [v2.3.3](#v233) · [v2.4.0](#v240) · [v2.5.0](#v250) · [v2.6.0](#v260) · [v2.6.1](#v261) · [v2.6.2](#v262) · [v2.6.3](#v263) · [v2.6.4](#v264) · [v2.6.5](#v265) · [v2.6.6](#v266) · [v2.6.7](#v267) · [v2.6.8](#v268) · [v2.6.9](#v269) · [v2.7.0](#v270) · [v2.7.1](#v271) · [v2.7.2](#v272) · [v2.8.0](#v280) · [v2.8.1](#v281) · [v2.9.0](#v290) · [v2.10.0](#v2100) · [v2.10.1](#v2101) · [v2.10.2](#v2102) · [v2.11.0](#v2110) · [v2.12.0](#v2120) · [v2.12.1](#v2121) · [v2.13.0](#v2130) · [v2.13.1](#v2131) · [v2.13.2](#v2132) · [v2.13.3](#v2133) · [v2.13.4](#v2134) · [v2.14.0](#v2140) · [v2.14.1](#v2141) · [hotfix](#hotfix) +[v0.x](#v0x) · [v1.0.0](#v100) · [v1.1.1](#v111) · [v1.1.2](#v112) · [v1.2.0](#v120) · [v1.3.0](#v130) · [v1.3.1](#v131) · [v1.4.0](#v140) · [v1.4.1](#v141) · [v1.4.2](#v142) · [v1.5.0](#v150) · [v1.6.0](#v160) · [v2.0.0](#v200) · [v2.0.1](#v201) · [v2.0.2](#v202) · [v2.1.0](#v210) · [v2.2.0](#v220) · [v2.3.0](#v230) · [v2.3.1](#v231) · [v2.3.2](#v232) · [v2.3.3](#v233) · [v2.4.0](#v240) · [v2.5.0](#v250) · [v2.6.0](#v260) · [v2.6.1](#v261) · [v2.6.2](#v262) · [v2.6.3](#v263) · [v2.6.4](#v264) · [v2.6.5](#v265) · [v2.6.6](#v266) · [v2.6.7](#v267) · [v2.6.8](#v268) · [v2.6.9](#v269) · [v2.7.0](#v270) · [v2.7.1](#v271) · [v2.7.2](#v272) · [v2.8.0](#v280) · [v2.8.1](#v281) · [v2.9.0](#v290) · [v2.10.0](#v2100) · [v2.10.1](#v2101) · [v2.10.2](#v2102) · [v2.11.0](#v2110) · [v2.12.0](#v2120) · [v2.12.1](#v2121) · [v2.13.0](#v2130) · [v2.13.1](#v2131) · [v2.13.2](#v2132) · [v2.13.3](#v2133) · [v2.13.4](#v2134) · [v2.14.0](#v2140) · [v2.14.1](#v2141) · [v2.14.2](#v2142) · [hotfix](#hotfix) ## v0.x @@ -456,6 +456,10 @@ OIDC admin login and built-in IndieAuth server. - [2026-11-10-tags-and-captions.md](v2.14.1/2026-11-10-tags-and-captions.md) — Clearing tags in the editor; captions escaped in feeds +## v2.14.2 + +- [2026-11-10-quotes-cleanup.md](v2.14.2/2026-11-10-quotes-cleanup.md) — Quote counts; dead files removed + ## hotfix Not a release folder. diff --git a/docs/design/v2.14.2/2026-11-10-quotes-cleanup.md b/docs/design/v2.14.2/2026-11-10-quotes-cleanup.md new file mode 100644 index 0000000..115c8ef --- /dev/null +++ b/docs/design/v2.14.2/2026-11-10-quotes-cleanup.md @@ -0,0 +1,31 @@ +# v2.14.2: Quote counts; dead files removed + +The two remaining items from the v2.14.0 documentation review. + +## Quote counts + +Backfeed stored anonymous quote counts (`syndications.quotes_count`: all +Threads quotes, and quotes by people who opted out elsewhere) that nothing +displayed. The counts line (`partials/responses.html` `reactions`) now has a +quote count after replies: named quotes plus those counts. Its card shows +only the anonymous part ("2 on Threads"); named quotes stay listed under +Responses. Quotes have no web action (there is no standard verb). +`webmention_queries.response_counts` adds `quotes`, so lists of notes show +them too. + +## Removed + +- `static/js/preview.js` (empty since the first commit) and the jsDelivr + `marked` script the editor pages loaded with it. +- `templates/feed.xml` (empty, never rendered) and `static/indielogin-test.html` + (a v1 IndieLogin test page). +- `syndication.get_targets()` read `THREADS_API` from the config, which + `config.py` never loads; the client now always uses the `THREADS_API` + constant. + +## Verification + +`tests/test_backfeed.py::test_quote_counts_include_anonymous_ones`; backfeed, +syndication, admin, template, public-route, microformats, notification, +webmention and feed tests pass. Rendered the counts line with the quote card +open in headless Chromium. diff --git a/docs/projectplan/BACKLOG.md b/docs/projectplan/BACKLOG.md index df643f8..22e8442 100644 --- a/docs/projectplan/BACKLOG.md +++ b/docs/projectplan/BACKLOG.md @@ -73,16 +73,6 @@ None open. ## Low -### Quote counts without names are not shown -- **Description**: Backfeed stores anonymous quote counts (`syndications.quotes_count`: Threads quotes, and quotes by people who opted out elsewhere), but the counts line only adds likes and reposts, so these quotes are counted nowhere on the page. -- **Where**: `templates/partials/responses.html` (`reactions`), `starpunk/webmention_queries.py` (`response_counts`) -- **Source**: Documentation review 2026-11-10 - -### Dead files and settings -- **Description**: `static/js/preview.js` is empty, yet the editor pages load it and `marked` from jsDelivr for nothing. `templates/feed.xml` is empty and `static/indielogin-test.html` is a v1 leftover. `syndication.get_targets()` reads a `THREADS_API` setting that `config.py` never loads, so it can't be set. -- **Where**: `templates/admin/new.html`, `templates/admin/edit.html`, `static/`, `templates/feed.xml`, `starpunk/syndication.py` -- **Source**: Documentation review 2026-11-10 - ### Micropub: `location` / `checkin` ignored - **Description**: These properties are accepted but dropped, which spec 3.3.5 allows. - **Where**: `starpunk/micropub.py` @@ -175,6 +165,7 @@ None open. These items were removed from the backlog because they have shipped: +- v2.14.2: quote counts (with anonymous ones) shown; dead editor scripts, files and the `THREADS_API` read removed - v2.14.1: the editor can clear all tags; image captions escaped in RSS, Atom and JSON Feed HTML - v2.14.0: notifications of new responses and crosspost/backfeed problems through Apprise (ADR-074) diff --git a/docs/projectplan/INDEX.md b/docs/projectplan/INDEX.md index 9af7ff5..6f79614 100644 --- a/docs/projectplan/INDEX.md +++ b/docs/projectplan/INDEX.md @@ -57,3 +57,4 @@ Future work and per-release plans. See `../DOCUMENTATION.md` (PROJECTPLAN). - **[v2.13.4](v2.13.4/RELEASE.md)** - Counts on lists of notes, reply cards link out (Released 2026-11-10) - **[v2.14.0](v2.14.0/RELEASE.md)** - Notifications through Apprise (Released 2026-11-10) - **[v2.14.1](v2.14.1/RELEASE.md)** - Clearing tags in the editor; captions escaped in feeds (Released 2026-11-10) +- **[v2.14.2](v2.14.2/RELEASE.md)** - Quote counts; dead files removed (Released 2026-11-10) diff --git a/docs/projectplan/v2.14.2/RELEASE.md b/docs/projectplan/v2.14.2/RELEASE.md new file mode 100644 index 0000000..b0527f6 --- /dev/null +++ b/docs/projectplan/v2.14.2/RELEASE.md @@ -0,0 +1,18 @@ +# v2.14.2 + +- **Date**: 2026-11-10 +- **Status**: Released +- **Focus**: Quote counts; dead files removed + +## Added + +- Quote counts (with anonymous ones) in the counts line and on lists of notes + +## Removed + +- Unused editor scripts (`marked` from a CDN, empty `preview.js`), `templates/feed.xml`, `static/indielogin-test.html`, the `THREADS_API` config read + +## Related + +- [CHANGELOG](../../../CHANGELOG.md) +- [Design note](../../design/v2.14.2/2026-11-10-quotes-cleanup.md) diff --git a/starpunk/__init__.py b/starpunk/__init__.py index 9aac3cc..8a5582c 100644 --- a/starpunk/__init__.py +++ b/starpunk/__init__.py @@ -465,5 +465,5 @@ def create_app(config=None): # Package version (Semantic Versioning 2.0.0) # See docs/standards/versioning-strategy.md for details -__version__ = "2.14.1" -__version_info__ = (2, 14, 1) +__version__ = "2.14.2" +__version_info__ = (2, 14, 2) diff --git a/starpunk/syndication.py b/starpunk/syndication.py index 853e440..51d7f86 100644 --- a/starpunk/syndication.py +++ b/starpunk/syndication.py @@ -1074,8 +1074,7 @@ def get_targets() -> Dict[str, Target]: if token: client = _client_cache.get("threads") if client is None or client.config_token != token: - client = ThreadsClient(token, Path(config["DATA_PATH"]) / "threads_token.json", - api=config.get("THREADS_API") or THREADS_API) + client = ThreadsClient(token, Path(config["DATA_PATH"]) / "threads_token.json") _client_cache["threads"] = client username = (config.get("THREADS_USERNAME") or "").lstrip("@") targets["threads"] = Target( diff --git a/starpunk/webmention_queries.py b/starpunk/webmention_queries.py index 6046d1e..2d86194 100644 --- a/starpunk/webmention_queries.py +++ b/starpunk/webmention_queries.py @@ -112,7 +112,8 @@ def get_webmentions_for_note(note_id: int) -> Dict[str, List[Dict[str, Any]]]: def response_counts(note_ids: List[int]) -> Dict[int, Dict[str, int]]: """ - Likes, reposts and replies per note, for lists of notes (v2.13.4). + Likes, reposts, replies and quotes per note, for lists of notes + (v2.13.4; quotes v2.14.2). Shown responses (valid and approved) plus the counts silos give without names (Threads; people who opted out of backfeed) on synced crossposts. @@ -126,21 +127,22 @@ def response_counts(note_ids: List[int]) -> Dict[int, Dict[str, int]]: def add(note_id, key, n): if n: - counts.setdefault(note_id, {'likes': 0, 'reposts': 0, 'replies': 0})[key] += n + counts.setdefault(note_id, {'likes': 0, 'reposts': 0, 'replies': 0, 'quotes': 0})[key] += n for row in db.execute( f""" SELECT target_note_id, mention_type, COUNT(*) FROM webmentions WHERE target_note_id IN ({marks}) AND validation_status = 'valid' - AND moderation_status = 'approved' AND mention_type IN ('like', 'repost', 'reply') + AND moderation_status = 'approved' AND mention_type IN ('like', 'repost', 'reply', 'quote') GROUP BY target_note_id, mention_type """, note_ids, ): - add(row[0], {'like': 'likes', 'repost': 'reposts', 'reply': 'replies'}[row[1]], row[2]) + add(row[0], {'like': 'likes', 'repost': 'reposts', 'reply': 'replies', 'quote': 'quotes'}[row[1]], row[2]) for row in db.execute( f""" - SELECT note_id, SUM(COALESCE(likes_count, 0)), SUM(COALESCE(reposts_count, 0)) + SELECT note_id, SUM(COALESCE(likes_count, 0)), SUM(COALESCE(reposts_count, 0)), + SUM(COALESCE(quotes_count, 0)) FROM syndications WHERE note_id IN ({marks}) AND state = 'synced' GROUP BY note_id """, @@ -148,6 +150,7 @@ def response_counts(note_ids: List[int]) -> Dict[int, Dict[str, int]]: ): add(row[0], 'likes', row[1]) add(row[0], 'reposts', row[2]) + add(row[0], 'quotes', row[3]) return counts diff --git a/static/indielogin-test.html b/static/indielogin-test.html deleted file mode 100644 index 3067a91..0000000 --- a/static/indielogin-test.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - IndieLogin Test Form - - -

IndieLogin Test Form

-

This is the exact form from IndieLogin.com API docs

- -
- - -

- - - - - -
- -
-

Note: This uses a fixed code_challenge for testing. In production, this should be generated fresh each time.

-

Form will submit to: https://indielogin.com/authorize

- - diff --git a/static/js/preview.js b/static/js/preview.js deleted file mode 100644 index e69de29..0000000 diff --git a/templates/admin/edit.html b/templates/admin/edit.html index 5b7e1b3..40b1618 100644 --- a/templates/admin/edit.html +++ b/templates/admin/edit.html @@ -116,8 +116,3 @@ {% endblock %} -{% block head %} -{{ super() }} - - -{% endblock %} diff --git a/templates/admin/new.html b/templates/admin/new.html index fcc33e8..604a7b1 100644 --- a/templates/admin/new.html +++ b/templates/admin/new.html @@ -88,8 +88,6 @@ {% block head %} {{ super() }} - -