From db10f345e4975d03df1bb04828ecdef1429026f0 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Wed, 13 May 2026 01:09:43 -0400 Subject: [PATCH] =?UTF-8?q?display=5Fname=20=E2=86=92=20at=5Fhandle=20for?= =?UTF-8?q?=20every=20user-rendering=20point=20around=20the=20recent-activ?= =?UTF-8?q?ity=20surfaces:=20scroll.html=20actor=20``,=20Most=20Re?= =?UTF-8?q?cent=20Scroll=20applet=20actor=20``,=20My=20Games=20row?= =?UTF-8?q?=20body=20actor=20prefix,=20My=20Scrolls=20row=20body=20actor?= =?UTF-8?q?=20prefix,=20My=20Buds=20page=20bud-name=20span,=20navbar=20ide?= =?UTF-8?q?ntity,=20=5Fbud=5Fpanel.html=20`data-sharer-name`=20(consumed?= =?UTF-8?q?=20by=20the=20dynamic=20post-line-author=20append=20on=20share?= =?UTF-8?q?=20success)=20=E2=80=94=20`at=5Fhandle`=20was=20always=20the=20?= =?UTF-8?q?right=20filter=20for=20these=20slots:=20it=20produces=20`@`=20when=20the=20user=20has=20set=20one,=20falling=20back?= =?UTF-8?q?=20to=20the=20truncated=20email=20(which=20already=20carries=20?= =?UTF-8?q?an=20`@`)=20so=20we=20don't=20double-prefix;=20the=20`=5Fmy=5Fb?= =?UTF-8?q?uds=5Fapplet=5Fitem.html`=20row=20was=20already=20on=20at=5Fhan?= =?UTF-8?q?dle=20from=20the=203-col=20sprint,=20so=20this=20commit=20just?= =?UTF-8?q?=20brings=20the=20rest=20of=20the=20surfaces=20in=20line;=20`?= =?UTF-8?q?=5Fnavbar.html`=20swap=20also=20drops=20the=20literal=20`@`=20t?= =?UTF-8?q?hat=20prefixed=20`{{=20user|display=5Fname=20}}`=20=E2=80=94=20?= =?UTF-8?q?that=20literal=20predated=20`at=5Fhandle`=20+=20worked=20for=20?= =?UTF-8?q?users=20w.=20usernames=20(gave=20`@disco`)=20but=20produced=20`?= =?UTF-8?q?@@`=20for=20users=20w.=20no=20username=20yet;=20?= =?UTF-8?q?navbar=20`wait=5Fto=5Fbe=5Flogged=5Fin(email)`=20FT=20helper=20?= =?UTF-8?q?keeps=20working=20since=20the=20email=20still=20appears=20as=20?= =?UTF-8?q?a=20substring=20whether=20rendered=20as=20`@disco@test.io`=20(o?= =?UTF-8?q?ld,=20no=20username)=20or=20`disco@test.io`=20(new);=20`=5Fbud?= =?UTF-8?q?=5Fadd=5Fpanel.html`'s=20client-side=20`=5FappendBudEntry`=20JS?= =?UTF-8?q?=20gains=20an=20inline=20at=5Fhandle=20mirror=20=E2=80=94=20`di?= =?UTF-8?q?splay.indexOf('@')=20>=3D=200=20=3F=20display=20:=20'@'=20+=20d?= =?UTF-8?q?isplay`=20=E2=80=94=20since=20the=20server's=20add=5Fbud=20resp?= =?UTF-8?q?onse=20packs=20`username=20or=20email`=20under=20the=20`usernam?= =?UTF-8?q?e`=20key=20(semantic=20mismatch=20w.=20the=20key=20name=20but?= =?UTF-8?q?=20stable)=20so=20the=20JS=20has=20to=20detect=20the=20email=20?= =?UTF-8?q?case=20itself;=20`test=5Fbill=5Fmy=5Fbuds.py`=20two=20`.bud-nam?= =?UTF-8?q?e`=20text=20assertions=20(`"alice"`=20=E2=86=92=20`"@alice"`)?= =?UTF-8?q?=20updated=20for=20the=20new=20prefix;=20931=20ITs=20+=20target?= =?UTF-8?q?ed=20FT=20regression=20on=20test=5Fbill=5Fmy=5Fbuds=20+=20test?= =?UTF-8?q?=5Fcore=5Fnavbar=20+=20test=5Fcore=5Flogin=20green?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/functional_tests/test_bill_my_buds.py | 8 +++++--- .../billboard/_partials/_applet-most-recent-scroll.html | 2 +- .../apps/billboard/_partials/_bud_add_panel.html | 7 ++++++- src/templates/apps/billboard/_partials/_bud_panel.html | 2 +- src/templates/apps/billboard/_partials/_my_buds_item.html | 2 +- .../apps/billboard/_partials/_my_scrolls_item.html | 2 +- .../apps/gameboard/_partials/_my_games_item.html | 2 +- src/templates/core/_partials/_navbar.html | 2 +- src/templates/core/_partials/_scroll.html | 2 +- 9 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/functional_tests/test_bill_my_buds.py b/src/functional_tests/test_bill_my_buds.py index 759c202..ac7f06a 100644 --- a/src/functional_tests/test_bill_my_buds.py +++ b/src/functional_tests/test_bill_my_buds.py @@ -25,7 +25,9 @@ class MyBudsPageTest(FunctionalTest): entry = self.wait_for( lambda: self.browser.find_element(By.CSS_SELECTOR, ".bud-entry .bud-name") ) - self.assertEqual(entry.text, "alice") + # Bud names render via `at_handle` filter — `@` w. an + # `@` prefix on users w. a username; truncated email otherwise. + self.assertEqual(entry.text, "@alice") def test_empty_state_when_no_buds(self): self.browser.get(self.live_server_url + "/billboard/my-buds/") @@ -44,12 +46,12 @@ class MyBudsPageTest(FunctionalTest): ok = self.browser.find_element(By.CSS_SELECTOR, "#id_bud_panel .btn.btn-confirm") ok.click() - # New entry appears w. alice's username (not the bare email) + # New entry appears w. alice's @-prefixed handle (not the bare email) self.wait_for(lambda: self.assertEqual( self.browser.find_element( By.CSS_SELECTOR, f".bud-entry[data-bud-id='{self.alice.id}'] .bud-name" ).text, - "alice", + "@alice", )) # Server-side persisted self.wait_for(lambda: self.assertIn( diff --git a/src/templates/apps/billboard/_partials/_applet-most-recent-scroll.html b/src/templates/apps/billboard/_partials/_applet-most-recent-scroll.html index de596cc..193a0b4 100644 --- a/src/templates/apps/billboard/_partials/_applet-most-recent-scroll.html +++ b/src/templates/apps/billboard/_partials/_applet-most-recent-scroll.html @@ -11,7 +11,7 @@ {% for event in recent_events %}
- {% if event.actor %}{{ event.actor|display_name }}{% endif %} + {% if event.actor %}{{ event.actor|at_handle }}{% endif %} {{ event.to_prose|safe }}