Text chat 29: Message hover bar, context menu, confirm and forward modals (#279) #437

Manually merged
charles merged 0 commits from textchat-29-ui-message-actions into textchat 2026-11-13 10:58:10 +00:00
Owner

Stacked on: textchat-27-ui-expression-picker

What

Text chat spec §3.6 / §9.6 and #129, in crates/fluxer-ui/src/screens/main/message_actions/:

  • Hover bar (hover_bar.rs, MessageActionBar.{tsx,module.css}, ActionToolbar.module.css): 1.75 rem buttons, 20 px Phosphor icons, tooltips, three quick reactions. Its items are the store's ActionsModel::bar. Shift expands it. The settings work: bar off, only More, no quick reactions, Shift expand off. It floats over the row's top edge as an iced float overlay, inside a small Overhang widget so that it keeps its full height over one-line grouped rows. While the pointer is on the bar it counts as hovered.
  • Context menu (menu.rs, MessageContextMenu.tsx) on widgets::context_menu, opened by a right click or the bar's More (left-start of the button):
    • four quick reactions;
    • "Add reaction" with up to 16 (frecent emoji, then the 4 defaults, as getQuickReactionEmojis) and "Other reaction…" (the emoji picker);
    • "Remove reactions" with one row per emoji;
    • the rest of the store's groups. Disabled items are hidden, as the original does.
  • Confirms (confirm.rs, ConfirmModal, Modal.module.css .root.small, 440 px):
    • Delete, Pin, Unpin and Suppress embeds come from app.chat.confirm. "Remove all reactions" is held in this view's state because the store has no confirm for it.
    • Each uses the original's strings. Delete, Pin and Unpin show the message preview and the "Pro tip: Hold Shift…" line.
    • Shift-click skips them.
  • Forward modal (forward.rs, ForwardModal): search, DMs and group DMs (latest first) then guild text and announcement channels the user can send in, ≤5 destinations, comment, "Send (n/5)". It sends UserAction::Forward.
  • Other actions: the failed message's "Try again"/Delete. Double-click edits your own message or replies to anyone else's (messageDoubleClickActions). Shift-click on Reply leaves the mention off, and on Copy message ID it copies {channel}-{message}. "View reactions" opens the reactors modal.

Tests

  • tests/message_actions.rs (headless): hover_bar_items_and_shift, menu_matches_actions_model, shift_click_delete_skips_confirm, confirm_modal_strings, forward_limit_5, double_click_edit_or_reply_setting.
  • Screenshots: message_hover_bar, message_context_menu, delete_confirm, forward_modal. Their goldens were generated locally (no lavapipe on this machine).
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci passes locally. All existing goldens are unchanged.
  • No real-desktop tests are needed for this task.

Deviations / notes for review

  • Changes outside the task's file list:
    • theme/palette.rs gains a float catalog, which iced's Float needs.
    • testing/offscreen.rs now draws overlays after the base, as iced's UI does. Without it the floating bar is invisible in screenshots. No existing golden changed.
    • docs/parity/settings.toml gets notes on the action-bar and double-click settings.
  • Create thread does nothing yet. It is waiting on Text chat 31's create pane.
  • Suppress embeds from the menu toggles without asking, as requestToggleSuppressEmbeds does. The embed's X still asks.
  • Forward destinations are not ordered by the original's forward history or frecency, which this client doesn't keep. The original shows the first 15 by those; here all destinations are listed and searchable.
  • Confirm modals have no 12.5 rem minimum height. Short ones (Suppress embeds) are a little lower than in the original.
  • Hover bar shadow is left out, as the tooltips' shadow is (software renderer).
  • The context menu rows have no icons, because widgets::context_menu has none yet.
  • Icons: five Phosphor SVGs (@phosphor-icons/core@2.1.1): arrow-bend-up-right-fill, chats-fill, snowflake-regular, arrows-clockwise-fill, envelope-open-fill.

Closes #279

🤖 Generated with Claude Code

Stacked on: textchat-27-ui-expression-picker ## What Text chat spec §3.6 / §9.6 and #129, in `crates/fluxer-ui/src/screens/main/message_actions/`: - **Hover bar** (`hover_bar.rs`, `MessageActionBar.{tsx,module.css}`, `ActionToolbar.module.css`): 1.75 rem buttons, 20 px Phosphor icons, tooltips, three quick reactions. Its items are the store's `ActionsModel::bar`. Shift expands it. The settings work: bar off, only More, no quick reactions, Shift expand off. It floats over the row's top edge as an iced `float` overlay, inside a small `Overhang` widget so that it keeps its full height over one-line grouped rows. While the pointer is on the bar it counts as hovered. - **Context menu** (`menu.rs`, `MessageContextMenu.tsx`) on `widgets::context_menu`, opened by a right click or the bar's More (left-start of the button): - four quick reactions; - "Add reaction" with up to 16 (frecent emoji, then the 4 defaults, as `getQuickReactionEmojis`) and "Other reaction…" (the emoji picker); - "Remove reactions" with one row per emoji; - the rest of the store's groups. Disabled items are hidden, as the original does. - **Confirms** (`confirm.rs`, `ConfirmModal`, `Modal.module.css .root.small`, 440 px): - Delete, Pin, Unpin and Suppress embeds come from `app.chat.confirm`. "Remove all reactions" is held in this view's state because the store has no confirm for it. - Each uses the original's strings. Delete, Pin and Unpin show the message preview and the "Pro tip: Hold Shift…" line. - Shift-click skips them. - **Forward modal** (`forward.rs`, `ForwardModal`): search, DMs and group DMs (latest first) then guild text and announcement channels the user can send in, ≤5 destinations, comment, "Send (n/5)". It sends `UserAction::Forward`. - **Other actions:** the failed message's "Try again"/Delete. Double-click edits your own message or replies to anyone else's (`messageDoubleClickActions`). Shift-click on Reply leaves the mention off, and on Copy message ID it copies `{channel}-{message}`. "View reactions" opens the reactors modal. ## Tests - `tests/message_actions.rs` (headless): `hover_bar_items_and_shift`, `menu_matches_actions_model`, `shift_click_delete_skips_confirm`, `confirm_modal_strings`, `forward_limit_5`, `double_click_edit_or_reply_setting`. - Screenshots: `message_hover_bar`, `message_context_menu`, `delete_confirm`, `forward_modal`. Their goldens were generated locally (no lavapipe on this machine). - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` passes locally. All existing goldens are unchanged. - No real-desktop tests are needed for this task. ## Deviations / notes for review - **Changes outside the task's file list:** - `theme/palette.rs` gains a `float` catalog, which iced's `Float` needs. - `testing/offscreen.rs` now draws overlays after the base, as iced's UI does. Without it the floating bar is invisible in screenshots. No existing golden changed. - `docs/parity/settings.toml` gets notes on the action-bar and double-click settings. - **Create thread** does nothing yet. It is waiting on Text chat 31's create pane. - **Suppress embeds from the menu** toggles without asking, as `requestToggleSuppressEmbeds` does. The embed's X still asks. - **Forward destinations** are not ordered by the original's forward history or frecency, which this client doesn't keep. The original shows the first 15 by those; here all destinations are listed and searchable. - **Confirm modals** have no 12.5 rem minimum height. Short ones (Suppress embeds) are a little lower than in the original. - **Hover bar shadow** is left out, as the tooltips' shadow is (software renderer). - The context menu rows have no icons, because `widgets::context_menu` has none yet. - **Icons:** five Phosphor SVGs (`@phosphor-icons/core@2.1.1`): arrow-bend-up-right-fill, chats-fill, snowflake-regular, arrows-clockwise-fill, envelope-open-fill. Closes #279 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Text chat 21-24 landed. The inline edit box now replaces only the text in
the new message row (attachments, embeds, stickers, forward and reactions
stay below it); the row's new events are routed next to the editor's. The
13 goldens Text chat 22-24 added were regenerated on lavapipe: only the
list's position moved, the composer box being taller.

Refs #275

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-ui/README.md
#	crates/fluxer-ui/src/screens/main/media.rs
#	crates/fluxer-ui/src/screens/main/messages.rs
#	crates/fluxer-ui/src/theme/icons.rs
#	crates/fluxer-ui/src/widgets/message_row.rs
#	crates/fluxer-ui/tests/screenshots.rs
#	docs/screenshots/README.md
#	fixtures/golden/attachment_file_card.png
#	fixtures/golden/attachment_spoiler.png
#	fixtures/golden/attachments_mosaic_4.png
#	fixtures/golden/attachments_mosaic_7.png
#	fixtures/golden/embed_article.png
#	fixtures/golden/embed_gifv.png
#	fixtures/golden/embed_rich_fields.png
#	fixtures/golden/embed_youtube.png
#	fixtures/golden/message_forwarded.png
#	fixtures/golden/message_reactions.png
#	fixtures/golden/message_reply.png
#	fixtures/golden/message_system_pin.png
#	fixtures/golden/reactors_modal.png
The expression picker popout of Text chat spec §3.4/§9.5
(ExpressionPickerPopout.tsx, EmojiPicker.tsx, StickersPicker.tsx,
pickers/memes/*): 592 x 690, resizable from its top and left edges with
the width snapped to 64 + n x 48 (min 360), tabs GIFs/Media/Stickers/
Emojis, a virtualised emoji grid (48 px cells, >= 5 columns) with the
category rail and guild icons, search, the inspector footer, the skin
tone selector and the premium banner; the sticker grid (120 px tracks)
and the saved media masonry. Opened from the composer's buttons,
Ctrl+E/Ctrl+S and (Text chat 29) Message::Open with a reaction target;
Shift keeps it open. Only the cells in view request images.

Refs #277

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Text chat spec §3.6/§9.6 and #129: the hover bar over the hovered row
(MessageActionBar.tsx, 1.75 rem buttons, 20 px icons; Shift expands it;
the bar, only-More, quick-reaction and Shift-expand settings apply), the
message context menu on widgets::context_menu (MessageContextMenu.tsx:
four quick reactions, "Add reaction" with up to 16 + "Other reaction…",
"Remove reactions" per emoji, the store's ActionsModel groups without
the items the user may not use), the confirm modals (Delete with the
message preview, Pin, Unpin, Suppress embeds, plus the view's own
"Remove all reactions"; the Shift tip; Shift-click skips them), the
forward modal (search over DMs and sendable text channels, at most 5,
comment, "Send (n/5)"), the failed message's "Try again"/Delete and the
double-click edit-or-reply setting.

Also: a float catalog for the theme, offscreen renders draw overlays
(the floating bar), five Phosphor icons.

Refs #279

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Independent review: Text chat 29 (ui-message-actions)

Reviewed 31e58b3..origin/textchat-29-ui-message-actions (6ed05ec) cold.

Checks

  1. Plan tests: all six headless tests exist in crates/fluxer-ui/tests/message_actions.rs and assert the plan/spec values: bar order + Shift expansion, the 1.75 rem (28 px) items and 20 px icons, the quick-reaction / Shift-expand / only-More / bar-off settings, the menu equal to selectors::message_actions with 4 quick reactions, a 16-item "Add reaction" submenu and "Other reaction…", the Shift bypass for Delete/Pin (and Remove all reactions), the exact confirm strings from spec §3.6, forward limit 5 with "Send ({n}/{limit})" and "Add a comment (optional)", and the double-click setting. All 4 screenshots (message_hover_bar, message_context_menu, delete_confirm, forward_modal) exist and pass.
  2. Interfaces: the hover bar, the context menu on widgets::context_menu, the confirm modals with preview and the Shift tip, the forward modal and the failed-message menu ("Try again" → RetrySend with the nonce, which matches how the core keys provisional messages) are all present. The core types it uses (ActionsModel, Confirm, UserAction::Forward, CopyWhat::IdPair) are used as merged.
  3. Invariants: fluxer-core and every Cargo.toml are untouched. No new I/O in fluxer-ui: text copies go through UserAction::CopyMessage → Effect::Clipboard. No fixtures added, no secrets or paths. I found no panics on server data: lookups use Option, and indexing is only on fixed iced tree children.
  4. Review Focus: none of the items belongs to Task 29.
  5. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in the review worktree is green (all steps passed, including the 4 new goldens).

Findings

  • [minor] forward::LIMIT (5) copies fluxer_core::chat::actions::MAX_FORWARD_DESTINATIONS instead of using it, so the two could drift apart.
  • [minor] No test covers the failed message's menu ("Try again", Delete) or the Retry → RetrySend { nonce } mapping. The interface names it, but no plan test asks for it.
  • [minor] The goldens were made on a local GPU, not on lavapipe. The integrator should check them on the Linux runner, because a mismatch there would turn CI red.
  • [minor] These deviations are documented and acceptable for now, but each should become a follow-up issue before merge: Create thread does nothing until Task 31, suppress embeds from the menu does not ask first, forward destinations are not ordered by frecency, the confirm cards have no 12.5 rem minimum height, and the Remove all reactions confirm lives in UI state.

Verdict: approved (no blocking findings, local CI green).

## Independent review: Text chat 29 (ui-message-actions) Reviewed `31e58b3..origin/textchat-29-ui-message-actions` (6ed05ec) cold. **Checks** 1. Plan tests: all six headless tests exist in `crates/fluxer-ui/tests/message_actions.rs` and assert the plan/spec values: bar order + Shift expansion, the 1.75 rem (28 px) items and 20 px icons, the quick-reaction / Shift-expand / only-More / bar-off settings, the menu equal to `selectors::message_actions` with 4 quick reactions, a 16-item "Add reaction" submenu and "Other reaction…", the Shift bypass for Delete/Pin (and Remove all reactions), the exact confirm strings from spec §3.6, forward limit 5 with "Send ({n}/{limit})" and "Add a comment (optional)", and the double-click setting. All 4 screenshots (`message_hover_bar`, `message_context_menu`, `delete_confirm`, `forward_modal`) exist and pass. 2. Interfaces: the hover bar, the context menu on `widgets::context_menu`, the confirm modals with preview and the Shift tip, the forward modal and the failed-message menu ("Try again" → `RetrySend` with the nonce, which matches how the core keys provisional messages) are all present. The core types it uses (`ActionsModel`, `Confirm`, `UserAction::Forward`, `CopyWhat::IdPair`) are used as merged. 3. Invariants: `fluxer-core` and every Cargo.toml are untouched. No new I/O in `fluxer-ui`: text copies go through `UserAction::CopyMessage` → `Effect::Clipboard`. No fixtures added, no secrets or paths. I found no panics on server data: lookups use `Option`, and indexing is only on fixed iced tree children. 4. Review Focus: none of the items belongs to Task 29. 5. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in the review worktree is **green** (all steps passed, including the 4 new goldens). **Findings** - [minor] `forward::LIMIT` (5) copies `fluxer_core::chat::actions::MAX_FORWARD_DESTINATIONS` instead of using it, so the two could drift apart. - [minor] No test covers the failed message's menu ("Try again", Delete) or the `Retry` → `RetrySend { nonce }` mapping. The interface names it, but no plan test asks for it. - [minor] The goldens were made on a local GPU, not on lavapipe. The integrator should check them on the Linux runner, because a mismatch there would turn CI red. - [minor] These deviations are documented and acceptable for now, but each should become a `follow-up` issue before merge: Create thread does nothing until Task 31, suppress embeds from the menu does not ask first, forward destinations are not ordered by frecency, the confirm cards have no 12.5 rem minimum height, and the Remove all reactions confirm lives in UI state. **Verdict: approved** (no blocking findings, local CI green).
charles manually merged commit 9cf9a6825c into textchat 2026-11-13 10:58:10 +00:00
Sign in to join this conversation.
No description provided.