@taxman ledger polish: My Posts applet preview uses Line.display_text; tax debits read "My Sea's …" not "my_sea.html …" — TDD
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 `[<iso timestamp>] ` 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/<uuid>/ + 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 <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,11 +42,11 @@ from apps.lyric.models import get_or_create_taxman
|
|||||||
# `Line.display_text|safe` in post.html (the system-author branch).
|
# `Line.display_text|safe` in post.html (the system-author branch).
|
||||||
TAX_DEBIT_TEMPLATES = {
|
TAX_DEBIT_TEMPLATES = {
|
||||||
"free_draw_locked": (
|
"free_draw_locked": (
|
||||||
'Look!—my_sea.html <span class="btn-pri-name">FREE DRAW</span> '
|
'Look!—My Sea\'s <span class="btn-pri-name">FREE DRAW</span> '
|
||||||
'is locked. Next free draw available 24h from the production of this log.'
|
'is locked. Next free draw available 24h from the production of this log.'
|
||||||
),
|
),
|
||||||
"paid_draw_locked": (
|
"paid_draw_locked": (
|
||||||
'Look!—my_sea.html <span class="btn-pri-name">PAID DRAW</span> '
|
'Look!—My Sea\'s <span class="btn-pri-name">PAID DRAW</span> '
|
||||||
'is locked. Another may be unlocked by depositing a Token in '
|
'is locked. Another may be unlocked by depositing a Token in '
|
||||||
'<span class="btn-pri-name">GATE VIEW</span>.'
|
'<span class="btn-pri-name">GATE VIEW</span>.'
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,7 +4,11 @@
|
|||||||
<li class="applet-list-entry row-3col">
|
<li class="applet-list-entry row-3col">
|
||||||
<a href="{{ item.get_absolute_url }}" class="row-title">{{ item.title|truncate_title }}</a>
|
<a href="{{ item.get_absolute_url }}" class="row-title">{{ item.title|truncate_title }}</a>
|
||||||
{% if item.latest_line %}
|
{% if item.latest_line %}
|
||||||
<span class="row-body">{{ item.latest_line.text|striptags }}</span>
|
{# `display_text` strips the `[<iso timestamp>] ` 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. #}
|
||||||
|
<span class="row-body">{{ item.latest_line.display_text|striptags }}</span>
|
||||||
<time class="row-ts" datetime="{{ item.latest_line.created_at|date:'c' }}">{{ item.latest_line.created_at|relative_ts }}</time>
|
<time class="row-ts" datetime="{{ item.latest_line.created_at|date:'c' }}">{{ item.latest_line.created_at|relative_ts }}</time>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user