Text chat 24: Message row: reply preview, forwards, system messages, highlights, reactions row (#274) #380

Manually merged
charles merged 0 commits from textchat-24-ui-message-row into textchat 2026-11-13 02:14:26 +00:00
Owner

What

Text chat 24 (spec §3.5, §9.3): the message row gains

  • reply line (widgets/message_content/reply_preview.rs): spine from the avatar centre (2 px, 0.625 rem corner, 82 % --text-chat-muted), 16 px avatar (#211), name at 64 % role colour with "@" when the reply pings, one line of the target; "Original message was deleted" / "Original message failed to load" / "Message contains attached media"; click → JumpToMessage. ReplyPreview.tsx, Message.module.css .replied*.
  • forwards (forward.rs): 4 px --interactive-muted bar, "↪ Forwarded", the snapshot text and its "(edited)", "Forwarded from › #channel" (jumps). MessageAttachments.{tsx,module.css}.
  • system messages (system.rs): join (17 welcomes, timestamp % 17), pin with its two links (JumpToMessage, OpenPins), recipient add/remove/leave, name/icon change, call, follow add (12), thread created (thread name → OpenThread, "See all threads"); type 21 returns None (Text chat 44). Icons and colours from the components and their CSS.
  • mention highlight (rgb(234 197 50 / .1) + 2 px bar; user, role, @everyone outside DMs) and jump highlight (--message-reply-bg + --brand-primary-light bar, from chat.nav.jump); "(edited)" tooltip with the edit date after 750 ms.
  • reactions row (reactions.rs): pills (radius 0.5 rem, 1 px border, 0.125/0.375 rem padding, 1.25 rem emoji, count 600), mine in --brand-tint/--brand-tint-border/--text-on-brand-tint, click → ToggleReaction, add-reaction button, hidden when render_reactions is false. The 500 ms tooltip ("{:emoji:} reacted by A, B, and N others" + "Click to view all reactions") is a small clickable hover card; its click opens the reactors modal.
  • reactors modal (screens/main/modals/reactors.rs): 36.25 × 27.5 rem, 6 rem emoji column (selected ringed), reactor rows (24 px avatar, name, tag), X to remove (own, or anyone for MANAGE_MESSAGES) with "Remove reaction", loads the next page past 80 % scroll, backdrop/Escape close.
  • grouping (fluxer-core/src/selectors/messages.rs, minimal core change): the suppress-notifications rule of MessageGroupingUtils.ts:77-89; REPLY already started a group.

Tests

  • crates/fluxer-ui/tests/message_row_content.rs: all nine tests of the plan (models only, run on Windows too).
  • Screenshots message_reply, message_reactions, message_system_pin, message_forwarded, reactors_modal built from Text chat 20's textchat_ready.json + textchat/history.json; goldens drawn on lavapipe in the Ubuntu 22.04 image (fluxer-native-shots:u2204); the whole screenshot suite (37) passes there, existing goldens unchanged.
  • cargo xtask ci green locally (screenshot step run in the lavapipe container, not on the host GPU).
  • No Electron side-by-side attached: dimensions come from the fork components/CSS named above.

Deviations

  • Join rotation is timestamp % 17, not % 11 as the spec says: the fork's SystemMessageUtils has 17 strings and takes messageList.length.
  • Call messages always read "{user} started a call." because Message.call is not modelled: follow-up #375.
  • Reaction tooltip names come from what the core knows (ReactionModel.tooltip_names); the core does not fetch 3 reactors on hover as the original does, so before that it shows only :emoji:.
  • Animated reaction emoji stay still (the original plays them only while the pill is hovered; per-pill hover is not tracked).
  • Add-reaction button and "See all threads" emit nothing yet (picker = Text chat 27, OpenThreadBrowser = Text chat 38). Mods' right-click "Remove reaction" on a modal tab is not built; the per-row X covers removals.
  • Forward snapshot attachments/embeds/stickers are placeholder lines until Text chat 22/23.
  • Guild "suppress @everyone / role mentions" settings are not modelled, so they do not affect the mention highlight.
  • Files outside the list, kept minimal: widgets/message_content/mod.rs (Text chat 22 also creates it; mechanical merge), screens/main/modals/mod.rs, screens/main/mod.rs (draws the modal), model.rs (channel_name crate-visible), screenshare/picker.rs (on_escape crate-visible), theme/icons.rs + 8 Phosphor SVGs, fluxer-core grouping rule.

Closes #274

🤖 Generated with Claude Code

## What Text chat 24 (spec §3.5, §9.3): the message row gains - **reply line** (`widgets/message_content/reply_preview.rs`): spine from the avatar centre (2 px, 0.625 rem corner, 82 % `--text-chat-muted`), 16 px avatar (#211), name at 64 % role colour with "@" when the reply pings, one line of the target; "Original message was deleted" / "Original message failed to load" / "Message contains attached media"; click → `JumpToMessage`. `ReplyPreview.tsx`, `Message.module.css` `.replied*`. - **forwards** (`forward.rs`): 4 px `--interactive-muted` bar, "↪ Forwarded", the snapshot text and its "(edited)", "Forwarded from <guild> › #channel" (jumps). `MessageAttachments.{tsx,module.css}`. - **system messages** (`system.rs`): join (17 welcomes, `timestamp % 17`), pin with its two links (`JumpToMessage`, `OpenPins`), recipient add/remove/leave, name/icon change, call, follow add (12), thread created (thread name → `OpenThread`, "See all threads"); type 21 returns `None` (Text chat 44). Icons and colours from the components and their CSS. - **mention highlight** (`rgb(234 197 50 / .1)` + 2 px bar; user, role, @everyone outside DMs) and **jump highlight** (`--message-reply-bg` + `--brand-primary-light` bar, from `chat.nav.jump`); "(edited)" tooltip with the edit date after 750 ms. - **reactions row** (`reactions.rs`): pills (radius 0.5 rem, 1 px border, 0.125/0.375 rem padding, 1.25 rem emoji, count 600), mine in `--brand-tint`/`--brand-tint-border`/`--text-on-brand-tint`, click → `ToggleReaction`, add-reaction button, hidden when `render_reactions` is false. The 500 ms tooltip ("{:emoji:} reacted by A, B, and N others" + "Click to view all reactions") is a small clickable hover card; its click opens the reactors modal. - **reactors modal** (`screens/main/modals/reactors.rs`): 36.25 × 27.5 rem, 6 rem emoji column (selected ringed), reactor rows (24 px avatar, name, tag), X to remove (own, or anyone for MANAGE_MESSAGES) with "Remove reaction", loads the next page past 80 % scroll, backdrop/Escape close. - **grouping** (`fluxer-core/src/selectors/messages.rs`, minimal core change): the suppress-notifications rule of `MessageGroupingUtils.ts:77-89`; REPLY already started a group. ## Tests - `crates/fluxer-ui/tests/message_row_content.rs`: all nine tests of the plan (models only, run on Windows too). - Screenshots `message_reply`, `message_reactions`, `message_system_pin`, `message_forwarded`, `reactors_modal` built from Text chat 20's `textchat_ready.json` + `textchat/history.json`; goldens drawn on lavapipe in the Ubuntu 22.04 image (`fluxer-native-shots:u2204`); the whole screenshot suite (37) passes there, existing goldens unchanged. - `cargo xtask ci` green locally (screenshot step run in the lavapipe container, not on the host GPU). - No Electron side-by-side attached: dimensions come from the fork components/CSS named above. ## Deviations - Join rotation is `timestamp % 17`, not `% 11` as the spec says: the fork's `SystemMessageUtils` has 17 strings and takes `messageList.length`. - Call messages always read "{user} started a call." because `Message.call` is not modelled: follow-up #375. - Reaction tooltip names come from what the core knows (`ReactionModel.tooltip_names`); the core does not fetch 3 reactors on hover as the original does, so before that it shows only `:emoji:`. - Animated reaction emoji stay still (the original plays them only while the pill is hovered; per-pill hover is not tracked). - Add-reaction button and "See all threads" emit nothing yet (picker = Text chat 27, `OpenThreadBrowser` = Text chat 38). Mods' right-click "Remove reaction" on a modal tab is not built; the per-row X covers removals. - Forward snapshot attachments/embeds/stickers are placeholder lines until Text chat 22/23. - Guild "suppress @everyone / role mentions" settings are not modelled, so they do not affect the mention highlight. - Files outside the list, kept minimal: `widgets/message_content/mod.rs` (Text chat 22 also creates it; mechanical merge), `screens/main/modals/mod.rs`, `screens/main/mod.rs` (draws the modal), `model.rs` (`channel_name` crate-visible), `screenshare/picker.rs` (`on_escape` crate-visible), `theme/icons.rs` + 8 Phosphor SVGs, `fluxer-core` grouping rule. Closes #274 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reply line (spine, 16 px avatar, "@" when pinging, deleted/failed/media
strings, click jumps), forwarded snapshot with "Forwarded from", system
messages with icons and the original's strings (joins by timestamp % 17),
mention and jump highlights, "(edited)" tooltip after 750 ms, reactions row
with a clickable 500 ms tooltip, reactors modal, and the grouping rule for
the suppress-notifications change.

Refs #274

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Owner

Independent review: Text chat 24 (76a7098)

Scope: git diff 12e0695..origin/textchat-24-ui-message-row.

(1) Plan tests: all 9 exist in crates/fluxer-ui/tests/message_row_content.rs and check what the plan names, with the spec's values: modal 580 × 440 (36.25 × 27.5 rem), tooltip after 500 ms, "(edited)" after 750 ms, mention bar rgb(234 197 50), the reply strings, the reaction pill colours (mine and other), and the render_reactions toggle. All 5 screenshot goldens are present.
(2) Interfaces: every behaviour the Produces line names is there. This task's block names no type or signature that other tasks consume.
(3) Invariants: fluxer-core gains only the grouping rule, which uses MessageFlags from fluxer-proto. There are no new dependencies and no I/O in fluxer-ui (images go through media::wanted). There are no new fixtures and nothing secret. I found no panics on server data: indexes are bounded, and tree.children[0] always has 2 children.
(4) Review Focus: no item belongs to this task.
(5) cargo xtask ci: green in the review worktree ("all steps passed", exit 0). It ran without FLUXER_SCREENSHOT_TESTS.

Findings

  • minor (deviation, accepted): joins rotate by % 17, not the spec's % 11. I checked the fork's SystemMessageUtils.tsx: it has 17 strings and uses extractTimestamp(id) % messageList.length, and Snowflake::timestamp_millis adds the epoch the same way. The code is right. The spec §3.5 text should be corrected.
  • minor: a CALL message always reads "started a call." because Message.call is not modelled. #375 tracks this.
  • minor: HoverCard (reactions.rs) builds its "bridge" upward from the card (y: card.y, height: card.height + GAP). When the card flips below the pill (not enough room above), the gap sits above the card and is not covered. Moving the pointer from the pill down to the card then closes it, so the "Click to view all reactions" card cannot be reached near the top of the window.
  • minor: Spine (reply_preview.rs) draws below its own layout bounds (height: HEIGHT + SPACING + SPINE_GAP - top), in a with_layer clip it computes itself. Check that it stays clipped by the message list's scrollable at the top edge.
  • minor: in system::content, each word is padded on its left (SPACE), so a wrapped line can start with a 4.4 px indent (the implementer flagged this). Cosmetic.
  • minor: highlighted() prefers the mention style over the jump style when both apply. Please confirm the original does the same (.messageMentioned vs .messageHighlight order).
  • minor: the tooltip names come only from reactors the core already knows (there is no fetch on hover), the add-reaction button and "See all threads" do nothing, and there is no moderator right-click "Remove reaction" on modal tabs. All of this is deferred to Tasks 27 and 38. These should get follow-up issues linked before merge.

Verdict: approve. There are no blocking findings, and local CI is green.

## Independent review: Text chat 24 (76a7098) Scope: `git diff 12e0695..origin/textchat-24-ui-message-row`. **(1) Plan tests:** all 9 exist in `crates/fluxer-ui/tests/message_row_content.rs` and check what the plan names, with the spec's values: modal 580 × 440 (36.25 × 27.5 rem), tooltip after 500 ms, "(edited)" after 750 ms, mention bar rgb(234 197 50), the reply strings, the reaction pill colours (mine and other), and the `render_reactions` toggle. All 5 screenshot goldens are present. **(2) Interfaces:** every behaviour the Produces line names is there. This task's block names no type or signature that other tasks consume. **(3) Invariants:** fluxer-core gains only the grouping rule, which uses `MessageFlags` from fluxer-proto. There are no new dependencies and no I/O in fluxer-ui (images go through `media::wanted`). There are no new fixtures and nothing secret. I found no panics on server data: indexes are bounded, and `tree.children[0]` always has 2 children. **(4) Review Focus:** no item belongs to this task. **(5) `cargo xtask ci`:** green in the review worktree ("all steps passed", exit 0). It ran without `FLUXER_SCREENSHOT_TESTS`. ### Findings - **minor (deviation, accepted):** joins rotate by `% 17`, not the spec's `% 11`. I checked the fork's `SystemMessageUtils.tsx`: it has 17 strings and uses `extractTimestamp(id) % messageList.length`, and `Snowflake::timestamp_millis` adds the epoch the same way. The code is right. The spec §3.5 text should be corrected. - **minor:** a CALL message always reads "started a call." because `Message.call` is not modelled. #375 tracks this. - **minor:** `HoverCard` (reactions.rs) builds its "bridge" upward from the card (`y: card.y`, `height: card.height + GAP`). When the card flips below the pill (not enough room above), the gap sits above the card and is not covered. Moving the pointer from the pill down to the card then closes it, so the "Click to view all reactions" card cannot be reached near the top of the window. - **minor:** `Spine` (reply_preview.rs) draws below its own layout bounds (`height: HEIGHT + SPACING + SPINE_GAP - top`), in a `with_layer` clip it computes itself. Check that it stays clipped by the message list's scrollable at the top edge. - **minor:** in `system::content`, each word is padded on its left (`SPACE`), so a wrapped line can start with a 4.4 px indent (the implementer flagged this). Cosmetic. - **minor:** `highlighted()` prefers the mention style over the jump style when both apply. Please confirm the original does the same (`.messageMentioned` vs `.messageHighlight` order). - **minor:** the tooltip names come only from reactors the core already knows (there is no fetch on hover), the add-reaction button and "See all threads" do nothing, and there is no moderator right-click "Remove reaction" on modal tabs. All of this is deferred to Tasks 27 and 38. These should get follow-up issues linked before merge. Verdict: **approve.** There are no blocking findings, and local CI is green.
charles manually merged commit a8c9c3f4fd into textchat 2026-11-13 02:14:26 +00:00
Sign in to join this conversation.
No description provided.