Summary
On mobile widths the channel list shows no unread badge. The unread count is kept in state (e.g. unread: 3 survives a refresh with #153), but the mobile row renderer never displays it. Found while reviewing #153; pre-existing on master.
Where (master e829d1ea)
public/channels.js:
Proposed fix
Render the same badge in the mobile row (e.g. in .ch-row-line1 next to the time, or on the avatar), with the same text (99+ cap), title and aria-label, escaped as on desktop and styled with existing CSS variables. Clear it when the channel is opened, as on desktop.
Acceptance criteria
- A channel with
unread > 0 shows the badge at mobile width (e.g. 390 px); none at 0.
- The badge updates when a live-decrypted message arrives for a channel that is not open, and clears when it is opened.
- Unit test for the mobile renderer and a Playwright check at mobile width; desktop unchanged.
Summary
On mobile widths the channel list shows no unread badge. The unread count is kept in state (e.g.
unread: 3survives a refresh with #153), but the mobile row renderer never displays it. Found while reviewing #153; pre-existing on master.Where (master
e829d1ea)public/channels.js:renderChannelRow()(around line 1909) renders<span class="ch-unread-badge" ...>whench.unread > 0(around line 1973).renderChannelRowMobile()(around line 2007, the regression(channels mobile): #1227 picker rows too cramped — restore prod's roomier layout (keep header wins) Kpa-clawbot/CoreScope#1367 chat-app layout) builds name, time and preview but has no unread badge.Proposed fix
Render the same badge in the mobile row (e.g. in
.ch-row-line1next to the time, or on the avatar), with the same text (99+cap),titleandaria-label, escaped as on desktop and styled with existing CSS variables. Clear it when the channel is opened, as on desktop.Acceptance criteria
unread > 0shows the badge at mobile width (e.g. 390 px); none at 0.