display_name → at_handle for every user-rendering point around the recent-activity surfaces: scroll.html actor <strong>, Most Recent Scroll applet actor <strong>, My Games row body actor prefix, My Scrolls row body actor prefix, My Buds page bud-name span, navbar identity, _bud_panel.html data-sharer-name (consumed by the dynamic post-line-author append on share success) — at_handle was always the right filter for these slots: it produces @<username> when the user has set one, falling back to the truncated email (which already carries an @) so we don't double-prefix; the _my_buds_applet_item.html row was already on at_handle from the 3-col sprint, so this commit just brings the rest of the surfaces in line; _navbar.html swap also drops the literal @ that prefixed {{ user|display_name }} — that literal predated at_handle + worked for users w. usernames (gave @disco) but produced @<email>@<domain> for users w. no username yet; navbar wait_to_be_logged_in(email) FT helper keeps working since the email still appears as a substring whether rendered as @disco@test.io (old, no username) or disco@test.io (new); _bud_add_panel.html's client-side _appendBudEntry JS gains an inline at_handle mirror — display.indexOf('@') >= 0 ? display : '@' + display — since the server's add_bud response packs username or email under the username key (semantic mismatch w. the key name but stable) so the JS has to detect the email case itself; test_bill_my_buds.py two .bud-name text assertions ("alice""@alice") updated for the new prefix; 931 ITs + targeted FT regression on test_bill_my_buds + test_core_navbar + test_core_login green
Some checks failed
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline failed

This commit is contained in:
Disco DeDisco
2026-05-13 01:09:43 -04:00
parent f7fa250804
commit db10f345e4
9 changed files with 18 additions and 11 deletions

View File

@@ -11,7 +11,7 @@
Logged in as
</span>
<span class="navbar-identity">
@{{ user|display_name }}
{{ user|at_handle }}
</span>
</div>
<form method="POST" action="{% url "logout" %}">

View File

@@ -3,7 +3,7 @@
{% for event in events %}
<div class="drama-event {% if event.actor == viewer %}mine{% elif event.actor %}theirs{% else %}system{% endif %}" data-label="{% if event.struck %}redact{% else %}frame{% endif %}">
<span class="drama-event-body{% if event.struck %} struck{% endif %}">
{% if event.actor %}<strong>{{ event.actor|display_name }}</strong>{% endif %}
{% if event.actor %}<strong>{{ event.actor|at_handle }}</strong>{% endif %}
{{ event.to_prose|safe }}
</span>
<time class="drama-event-time" datetime="{{ event.timestamp|date:'c' }}">