my-scrolls / my-games applet rows: prepend actor display_name to the body cell — the latest event's to_prose returns the action alone ("deposits a Carte Blanche…") because scroll.html splits the row across <strong>{{ event.actor|display_name }}</strong> + adjacent {{ to_prose|safe }}; the applet rows have a single middle column (<title> | <body> | <ts>) so they need both halves concatenated into .row-body; ROOM_CREATED welcome events (actor=None) keep rendering prose alone since to_prose already reads "Welcome to <name>!" — the {% if item.latest_event.actor %} guard skips the prefix, mirroring the same actor-guarded <strong> we added to _partials/_scroll.html + _applet-most-recent-scroll.html on c03fb2b so welcome lines don't carry a bogus empty actor; 2 ITs added — BillboardViewTest.test_my_scrolls_applet_row_body_includes_actor_display_name + GameboardViewTest.test_my_games_row_body_includes_actor_display_name — scoped to <span class="row-body">...stuart...deposits...</span> (regex match on the .row-body cell content) so the assertion can't pass on actor renders outside the row (the Most Recent Scroll applet on /billboard/ renders the same actor too, separately — initial pass missed this and assertIn("acto", body) matched there instead, hiding the bug); BillboardViewTest also gains test_my_scrolls_applet_row_body_no_actor_prefix_for_welcome to lock in the no-empty-prefix contract for ROOM_CREATED welcome events; 931 ITs green; settings.local.json fix-up — Bash(git add *) (literal * would only match the exact string "git add *", not git add -u) → Bash(git add:*) + companion read-only git patterns (status / diff / log / show) so the in-session commit flow stops prompting — TDD
Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
{% load lyric_extras %}
|
||||
{# My Scrolls applet row — room name | latest event prose | event ts. #}
|
||||
{# `item` is a Room w. `latest_event` attached by `annotate_latest_event`. #}
|
||||
{# Body cell concatenates actor + prose since the row has a single #}
|
||||
{# middle column (scroll.html splits them across <strong> + prose, but #}
|
||||
{# the applet row has no room for that). Welcome events (actor=None) #}
|
||||
{# render prose alone — `to_prose` already reads "Welcome to <name>!". #}
|
||||
<li class="applet-list-entry row-3col">
|
||||
<a href="{% url 'billboard:scroll' item.id %}" class="row-title">{{ item.name|truncate_title }}</a>
|
||||
{% if item.latest_event %}
|
||||
<span class="row-body">{{ item.latest_event.to_prose|striptags }}</span>
|
||||
<span class="row-body">{% if item.latest_event.actor %}{{ item.latest_event.actor|display_name }} {% endif %}{{ item.latest_event.to_prose|striptags }}</span>
|
||||
<time class="row-ts" datetime="{{ item.latest_event.timestamp|date:'c' }}">{{ item.latest_event.timestamp|relative_ts }}</time>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user