Text chat 33: Message list polish and chat settings (#283) #426

Manually merged
charles merged 0 commits from textchat-33-ui-message-list-settings into textchat 2026-11-13 10:58:22 +00:00
Owner

What was built

Message list (spec §9.9):

  • New-messages divider ("NEW", 1rem red line + badge) at the read marker (widgets/message_list/dividers.rs).
  • New-messages bar across the top of the list while the channel is unread: "{n} new messages since {M/D/YY, HH:MM}" (click jumps to the first unread) and "Mark as read" (MarkRead, preceded by JumpToPresent when away from the present, as onScrollToPresentAndAck).
  • "You're viewing older messages" / "Jump to present" pill at the bottom while the loaded messages do not reach the newest one.
  • MessageList::on_at_bottom: reports at-bottom once per change, on a redraw (AtBottom rule), mapped to UserAction::ViewportAtBottom (#60).
  • Typing avatars (#211): first 5 typing users, 12 px, 8 px step, "+N"; images requested through messages::content_images.
  • Double-click a message to edit (own) or reply (others), when the setting is on (ChannelMessage.handleDoubleClick).
  • ChatColumn now takes any number of overlays (popup, top bar, bottom pill).

Settings (spec §9.10, §11):

  • Chat tab: Display (Media display, Link previews, Reactions, Spoiler content radio) and Input ("Turn text smileys into emoji"), via Message::Chat(ChatSettingChange) → SetChatSetting.
  • Advanced → Chat (advanced_chat.rs): the original's chat rows in ChatSettingsIndex.ts order with descriptions; "Configure" opens switch-group dialogs (media buttons, message action bar with its disabled rules, expression autocomplete, input buttons). Escape closes a dialog.
  • docs/parity/settings.toml: §11 entries set to done; four new section-chat_settings-* entries.

Testing

  • New: tests/message_list_polish.rs (divider_at_marker, bar_mark_read_emits, jump_to_present_shown_when_not_at_newest, reports_viewport_at_bottom_once_per_change, typing_avatars_max_5, double_click_edits_own_message_or_replies) and tests/settings_chat.rs (chat_settings_bind, parity_check_passes).
  • Screenshots message_list_new_divider, jump_to_present, settings_chat, settings_advanced_chat, rendered on lavapipe in the Ubuntu 22.04 CI image (docker). Dimensions from ChannelDivider.module.css, ChannelMessages.module.css, NewMessagesBar.tsx, DisplayTab.tsx, AdvancedChatControls.tsx; no Electron reference image attached.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally; the screenshot suite also green on lavapipe in docker.

Deviations from the plan

  • 19 existing goldens regenerated: every #general screen now shows the unread bar (READY leaves #general unread and the tests never report the list at bottom with focus), most also the NEW divider.
  • Bar strings are the original desktop ones ("N new messages since …", "Mark as read"); the spec quoted the mobile variants. Times in 24-hour form like the rest of the native client.
  • Typing avatars live in screens/main/composer/status_rail.rs (the code moved there from widgets/composer.rs); composer::view_with_media added.
  • The Links controls are in Advanced → Chat, as in the fork (its Chat tab mounts only Display and Input). "Trust all external links" not built (no trusted domains in core): planned, #417. Search engines, translators and reverse image search stay planned under owner 4 with a note (the skeleton test ties tab-level settings to the tab owner, so moving them to 7 would need a settings_tabs change).
  • "Hide muted channels by default" is stored only; its confirm is left out (no channel muting yet).
  • No highlight fade: the original has no keyframes for .messageHighlight; the existing 2000 ms highlight is kept.
  • "Mark as read" does not scroll a scrolled-up list that already has the newest messages: #418.
  • textchat.md parity table and voice.md row updates left to Task 34.
  • Tests were written together with the implementation rather than run red first.
  • Small test-harness change: tests/headless/mod.rs gains Frame::node(); settings_nav.rs expects the new Advanced → Chat panel.

Closes #283

🤖 Generated with Claude Code

## What was built Message list (spec §9.9): - New-messages divider ("NEW", 1rem red line + badge) at the read marker (`widgets/message_list/dividers.rs`). - New-messages bar across the top of the list while the channel is unread: "{n} new messages since {M/D/YY, HH:MM}" (click jumps to the first unread) and "Mark as read" (`MarkRead`, preceded by `JumpToPresent` when away from the present, as `onScrollToPresentAndAck`). - "You're viewing older messages" / "Jump to present" pill at the bottom while the loaded messages do not reach the newest one. - `MessageList::on_at_bottom`: reports at-bottom once per change, on a redraw (`AtBottom` rule), mapped to `UserAction::ViewportAtBottom` (#60). - Typing avatars (#211): first 5 typing users, 12 px, 8 px step, "+N"; images requested through `messages::content_images`. - Double-click a message to edit (own) or reply (others), when the setting is on (`ChannelMessage.handleDoubleClick`). - `ChatColumn` now takes any number of overlays (popup, top bar, bottom pill). Settings (spec §9.10, §11): - Chat tab: Display (Media display, Link previews, Reactions, Spoiler content radio) and Input ("Turn text smileys into emoji"), via `Message::Chat(ChatSettingChange)` → `SetChatSetting`. - Advanced → Chat (`advanced_chat.rs`): the original's chat rows in `ChatSettingsIndex.ts` order with descriptions; "Configure" opens switch-group dialogs (media buttons, message action bar with its disabled rules, expression autocomplete, input buttons). Escape closes a dialog. - `docs/parity/settings.toml`: §11 entries set to done; four new `section-chat_settings-*` entries. ## Testing - New: `tests/message_list_polish.rs` (divider_at_marker, bar_mark_read_emits, jump_to_present_shown_when_not_at_newest, reports_viewport_at_bottom_once_per_change, typing_avatars_max_5, double_click_edits_own_message_or_replies) and `tests/settings_chat.rs` (chat_settings_bind, parity_check_passes). - Screenshots `message_list_new_divider`, `jump_to_present`, `settings_chat`, `settings_advanced_chat`, rendered on lavapipe in the Ubuntu 22.04 CI image (docker). Dimensions from `ChannelDivider.module.css`, `ChannelMessages.module.css`, `NewMessagesBar.tsx`, `DisplayTab.tsx`, `AdvancedChatControls.tsx`; no Electron reference image attached. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally; the screenshot suite also green on lavapipe in docker. ## Deviations from the plan - 19 existing goldens regenerated: every #general screen now shows the unread bar (READY leaves #general unread and the tests never report the list at bottom with focus), most also the NEW divider. - Bar strings are the original desktop ones ("N new messages since …", "Mark as read"); the spec quoted the mobile variants. Times in 24-hour form like the rest of the native client. - Typing avatars live in `screens/main/composer/status_rail.rs` (the code moved there from `widgets/composer.rs`); `composer::view_with_media` added. - The Links controls are in Advanced → Chat, as in the fork (its Chat tab mounts only Display and Input). "Trust all external links" not built (no trusted domains in core): planned, #417. Search engines, translators and reverse image search stay planned under owner 4 with a note (the skeleton test ties tab-level settings to the tab owner, so moving them to 7 would need a `settings_tabs` change). - "Hide muted channels by default" is stored only; its confirm is left out (no channel muting yet). - No highlight fade: the original has no keyframes for `.messageHighlight`; the existing 2000 ms highlight is kept. - "Mark as read" does not scroll a scrolled-up list that already has the newest messages: #418. - `textchat.md` parity table and `voice.md` row updates left to Task 34. - Tests were written together with the implementation rather than run red first. - Small test-harness change: `tests/headless/mod.rs` gains `Frame::node()`; `settings_nav.rs` expects the new Advanced → Chat panel. Closes #283 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Message list (spec §9.9): the new-messages divider ("NEW") at the read
marker, the new-messages bar over the list ("{n} new messages since
{time}", click jumps to the first unread, "Mark as read"), the "You're
viewing older messages" / "Jump to present" pill while the loaded
messages do not reach the newest one, the list's at-bottom report
(once per change, on a redraw) as UserAction::ViewportAtBottom (#60),
typing avatars (12 px, at most 5, "+N", #211), and double-click a
message to edit (own) or reply when the setting is on.

Settings (spec §9.10, §11): the Chat tab's Display and Input sections
bound to the synced display settings and the local chat settings, and
Advanced -> Chat with the original's rows, switches and "Configure"
switch-group dialogs. Parity entries of spec §11 set; four new
section entries. Goldens regenerated on lavapipe for the #general
screens, which now show the unread bar and divider.

Refs #283

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

Independent review: Text chat 33 (message list polish and chat settings)

Reviewed git diff 67da1c73..origin/textchat-33-ui-message-list-settings (df5c987) cold.

Plan tests: all present and asserting the planned behaviour: divider_at_marker, bar_mark_read_emits, jump_to_present_shown_when_not_at_newest, reports_viewport_at_bottom_once_per_change, typing_avatars_max_5 (5 avatars, 12 px, "+2"), chat_settings_bind, parity_check_passes; screenshots message_list_new_divider, jump_to_present, settings_chat, settings_advanced_chat.

Interfaces: the NEW divider, the bar with "Mark as read" (which also jumps to present first, as the original's onScrollToPresentAndAck), the "Jump to present" pill, UserAction::ViewportAtBottom through MessageList::on_at_bottom, typing avatars, the Chat tab (Display, Input), and Advanced -> Chat bound to ChatSettingChange are all there. No core or Cargo changes.

Invariants: no new I/O in fluxer-ui, no fluxer-core or dependency changes, no secrets, URLs or paths. The server timestamp in the bar falls back safely (checked_to_offset), so it cannot panic.

Review Focus 6 (#60): the list reports at-bottom only on RedrawRequested, once per change, and again after a key (channel) change because the list state is reset. The ack decision stays in core being_read (selected channel, window focused, no settings screen or lightbox, at present, not marked unread by hand). It cannot ack a channel the user is not looking at.

Findings

  • minor: "jump highlight fade" (Interfaces) has no fade. The base's message_row highlight is on/off with the 2 s timer. Not mentioned in the notes.
  • minor: spec section 11 says search-engines, translators and reverse-image-search move to owner 7. They stay under owner 4 with a note (the skeleton ties settings outside a section to their tab's owner). This is disclosed; Task 34 should settle it.
  • minor: the Chat tab has no Links section (spec 9.10). It lives in Advanced -> Chat as in the fork, and "Trust all external links" is deferred to #417. Disclosed.
  • minor: 19 existing goldens now show the unread bar or NEW divider because the headless tests never report at-bottom. Valid, but it couples unrelated goldens to read state. Consider marking #general read in the shared screenshot setup (Task 34).
  • minor: in the message_list_new_divider golden, the first message after the NEW divider still draws as a grouped continuation (no avatar or name). Check the original's grouping across the unread divider (Task 34 parity).

CI: cargo xtask ci in the review worktree: green (exit 0). Screenshot goldens were not re-rendered, because this host has no lavapipe.

Verdict: approve (0 blocking).

## Independent review: Text chat 33 (message list polish and chat settings) Reviewed `git diff 67da1c73..origin/textchat-33-ui-message-list-settings` (df5c987) cold. **Plan tests:** all present and asserting the planned behaviour: `divider_at_marker`, `bar_mark_read_emits`, `jump_to_present_shown_when_not_at_newest`, `reports_viewport_at_bottom_once_per_change`, `typing_avatars_max_5` (5 avatars, 12 px, "+2"), `chat_settings_bind`, `parity_check_passes`; screenshots `message_list_new_divider`, `jump_to_present`, `settings_chat`, `settings_advanced_chat`. **Interfaces:** the NEW divider, the bar with "Mark as read" (which also jumps to present first, as the original's `onScrollToPresentAndAck`), the "Jump to present" pill, `UserAction::ViewportAtBottom` through `MessageList::on_at_bottom`, typing avatars, the Chat tab (Display, Input), and Advanced -> Chat bound to `ChatSettingChange` are all there. No core or Cargo changes. **Invariants:** no new I/O in fluxer-ui, no fluxer-core or dependency changes, no secrets, URLs or paths. The server timestamp in the bar falls back safely (`checked_to_offset`), so it cannot panic. **Review Focus 6 (#60):** the list reports at-bottom only on `RedrawRequested`, once per change, and again after a key (channel) change because the list state is reset. The ack decision stays in core `being_read` (selected channel, window focused, no settings screen or lightbox, at present, not marked unread by hand). It cannot ack a channel the user is not looking at. **Findings** - minor: "jump highlight fade" (Interfaces) has no fade. The base's `message_row` highlight is on/off with the 2 s timer. Not mentioned in the notes. - minor: spec section 11 says search-engines, translators and reverse-image-search move to owner 7. They stay under owner 4 with a note (the skeleton ties settings outside a section to their tab's owner). This is disclosed; Task 34 should settle it. - minor: the Chat tab has no Links section (spec 9.10). It lives in Advanced -> Chat as in the fork, and "Trust all external links" is deferred to #417. Disclosed. - minor: 19 existing goldens now show the unread bar or NEW divider because the headless tests never report at-bottom. Valid, but it couples unrelated goldens to read state. Consider marking #general read in the shared screenshot setup (Task 34). - minor: in the `message_list_new_divider` golden, the first message after the NEW divider still draws as a grouped continuation (no avatar or name). Check the original's grouping across the unread divider (Task 34 parity). **CI:** `cargo xtask ci` in the review worktree: green (exit 0). Screenshot goldens were not re-rendered, because this host has no lavapipe. **Verdict: approve** (0 blocking).
charles manually merged commit 9cf9a6825c into textchat 2026-11-13 10:58:22 +00:00
Sign in to join this conversation.
No description provided.