feat(ui): highlight messages that @-mention the viewer (LC-284) #320
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-284-self-mention-highlight"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Messages that directly
@-mention the viewer now stand out in the timeline (LC-284) - a layout-neutral left accent bar plus a faint accent wash - so a ping is easy to spot while scrolling instead of blending in.How
MessageView::mentions_viewer()= the resolved mention set already loaded for chip rendering containsviewer_id. Cheap membership check, no extra query.message.htmladds anlc-mentionedclass to the message row when that is true. Every room render path (page bulk render, single-message rebuild, WS new/edited renders) already populatesmentions+viewer_id, so the highlight is correct both live and on reload with no new plumbing.main.css:.lc-mentioneduses an insetbox-shadowfor the left bar (no layout shift) and acolor-mixaccent wash, theme-aware via--accent. Hover still shows the existing sunken background.Webhook/email/bridge and DM messages carry no viewer mention, so their rendering is unchanged - and the LC-77 fixtures are unaffected (confirmed: no fixture diff). v1 covers direct mentions;
@here/@channelbroadcasts (no per-user mention row) are out of scope. No new DB/route/env. Not operator-visible.Tests
routes_drafts: a message with a mention row for the viewer renderslc-mentioned; a plain message does not.just testandjust test-saaspass; no fixture changes.QA note
Visual, so worth a glance: post
@youfrom another account and confirm the row gets the left bar + tint live; confirm a message mentioning someone else is highlighted for that person but not for you; check both light and dark themes; confirm hovering the row still works.