From bf79963fec6a0ddbdef3c1d1f797acf3e4ed30f8 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Tue, 26 May 2026 16:30:11 -0400 Subject: [PATCH] =?UTF-8?q?@taxman=20ledger=20polish:=20My=20Posts=20apple?= =?UTF-8?q?t=20preview=20uses=20Line.display=5Ftext;=20tax=20debits=20read?= =?UTF-8?q?=20"My=20Sea's=20=E2=80=A6"=20not=20"my=5Fsea.html=20=E2=80=A6"?= =?UTF-8?q?=20=E2=80=94=20TDD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two cleanups for the @taxman ledger sprint (f44a282) flagged in-flight by the user via visual inspection: 1. **My Posts applet preview missed the prefix-strip.** `_my_posts_applet_item.html` was rendering `item.latest_line.text|striptags`, which left the raw `[] ` prefix visible in the "Debits & credits" applet row body. Swapped to `item.latest_line.display_text|striptags` so the row preview matches the stripped rendering on /billboard/post// + in the slide-down Brief banner. Other Post kinds are unaffected (`display_text` is identity for non-TAX_LEDGER lines). 2. **Devspeak in user-facing copy.** TAX_DEBIT_TEMPLATES read "Look!—my_sea.html FREE/PAID DRAW is locked. …" — the filename is internal developer language. Swapped to "Look!—My Sea's FREE/PAID DRAW is locked. …" so the prose references the user-facing app name. Substring assertions in test_tax / test_tax_briefs / test_bill_post_debits_credits all pin "{FREE,PAID} DRAW is locked" + "depositing a Token in" + "24h from the production of this log" — unaffected by the leading-clause rename. All 25 affected tests still green; the broader 1340 IT+UT pass unchanged. Code architected by Disco DeDisco Git commit message Co-Authored-By: Claude Sonnet 4.6 --- src/apps/billboard/tax.py | 4 ++-- .../apps/billboard/_partials/_my_posts_applet_item.html | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/apps/billboard/tax.py b/src/apps/billboard/tax.py index 49ab734..9e51567 100644 --- a/src/apps/billboard/tax.py +++ b/src/apps/billboard/tax.py @@ -42,11 +42,11 @@ from apps.lyric.models import get_or_create_taxman # `Line.display_text|safe` in post.html (the system-author branch). TAX_DEBIT_TEMPLATES = { "free_draw_locked": ( - 'Look!—my_sea.html FREE DRAW ' + 'Look!—My Sea\'s FREE DRAW ' 'is locked. Next free draw available 24h from the production of this log.' ), "paid_draw_locked": ( - 'Look!—my_sea.html PAID DRAW ' + 'Look!—My Sea\'s PAID DRAW ' 'is locked. Another may be unlocked by depositing a Token in ' 'GATE VIEW.' ), diff --git a/src/templates/apps/billboard/_partials/_my_posts_applet_item.html b/src/templates/apps/billboard/_partials/_my_posts_applet_item.html index e8d89a9..5912fb1 100644 --- a/src/templates/apps/billboard/_partials/_my_posts_applet_item.html +++ b/src/templates/apps/billboard/_partials/_my_posts_applet_item.html @@ -4,7 +4,11 @@
  • {{ item.title|truncate_title }} {% if item.latest_line %} - {{ item.latest_line.text|striptags }} + {# `display_text` strips the `[] ` prefix that #} + {# TAX_LEDGER Lines carry to satisfy `unique_together = (post, text)` #} + {# — the per-line `created_at` slot below already renders the user- #} + {# facing timestamp (user-spec 2026-05-26). Identity for other kinds. #} + {{ item.latest_line.display_text|striptags }} {% endif %}