Text chat 32: DMs and group DMs (#282) #394
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-32-ui-dms"
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 this builds (Text chat spec §3.7, §9.8)
screens/main/dms/mod.rs, cloned fromDirectMessageList.tsx,DMListItem.tsx,DirectMessageList.module.css): "Direct messages" section header with the "Create DM" +, rows 2.625 rem fromselectors::dm_row(32 px picture, name, "{n} members" for groups), unread pill, the close X on hover (CloseDm).widgets/group_avatar.rs,GroupDMAvatar.tsx:228-473): 0.70 x the edge for two, 0.68 x for three (cluster at most 32 px), each later avatar cut out of the earlier ones 2 px wide, the group's status dot. A small custom widget draws it (each avatar in its own layer); the cut-outs are painted in the surface colour, asavatar::view_onalready does for the presence surround.header.rs): the 32 px DM / group picture, Pins (OpenPins), "Create group DM" in a DM with a friend (opens the picker with them picked), "Add friends to group" while a group has room, and the members toggle for group DMs ("Show members" / "Hide members", now the original's casing).dms::member_groups,ChannelMembers.tsx:533-570): the user and recipients, Online then Offline, owner crowned.dms/friend_picker.rs,CreateDMModal.tsx,AddFriendsToGroupModal.tsx,FriendSelector.module.css): search, friends by first letter, checkboxes, the cap (others dimmed oncemaxare picked), "Create DM" / "Create group DM" / "Add".dms/group_settings.rs,EditGroupModal.tsx): "Group icon" with "Upload icon"/"Change icon" (emitsOpenFileDialog(FileDialog::GroupIcon); the store holds the pick), "Remove icon", "Group name" capped at 100, "Save" emitsEditGroupDm.dms/welcome.rs,DMWelcomeSection,GroupDMWelcomeSection,PersonalNotesWelcomeSection+ CSS): heads the first row of the message list once the history reaches the start ("Say hi to {name}. Your DM starts here.", "Welcome to {name}. Add friends to get the group going." with "Edit group" and "Add friends to group").note-pencil-bold,user-plus-boldadded throughtheme::icons.Tests
crates/fluxer-ui/tests/dms.rs:dm_row_close_emits(headless click on the X, tiny-skia),cluster_geometry,picker_cap_and_buttons,group_settings_emits_edit,welcome_strings,header_buttons_by_kind, all on the devservertextchatREADY.dm_list,friend_picker,group_dm_welcome,group_settings(goldens rendered on lavapipe in thefluxer-native-shots:u2204image; copies indocs/screenshots/). No Electron reference was captured; dimensions come from the fork CSS files named above.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally.Deviations from the plan
screens/main/model.rs(the sidebar carriesdms: Option<Vec<DmRowModel>>from the store instead of its ownDmAvatar; group DM members toggle),screens/main/media.rs(request cluster / picker avatars),screens/main/messages.rs(welcome heads the first row,Message::Dms),app.rs(Local::dms),widgets/mod.rs, testsmain_model.rsandmedia.rs(follow the new DM row model; the DM row avatar URL is the store's 128 px one).calls/dm_header.rsneeded no change.Effect::OpenFileDialog(executed by the runtime, Text chat 21), not a UI-sideDialogscall; a picked icon is shown by file name (the UI never reads files).Stacked on: origin/textchat-19-core-dms-settings (already merged into textchat at the base,
188f780).Closes #282
🤖 Generated with Claude Code
The DM list ("Direct messages" with "Create DM", 2.625 rem rows from selectors::dm_row with the close X on hover and the unread pill), the group avatar cluster (#207), the header's DM picture and buttons (Pins, Create group DM / Add friends to group, the group members toggle), the group DM member list, the "Select friends" modal, the group settings modal and the DM / group welcome sections. Goldens rendered on lavapipe (fluxer-native-shots:u2204). Refs #282 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Independent review of Task 32 (ui-dms) at
049ebf8. I reviewed only this task's own changes, diffed against the merged textchat parent67da1c7.Findings
docs/screenshots/group-dm-welcome.pngandgroup-settings.pngstill hold the pre-regeneration images. Commit049ebf8redrew onlyfixtures/golden/, so the docs copies no longer match the goldens.calls/dm_header.rsandmember_list.rs, but neither was touched. The header buttons are inheader.rsand the group member list isdms::member_groupsthroughmodel.rs. The behaviour is present, so this is a deviation from the plan, not a defect.maxfromselectors::friend_picker/remaining_slots) and the "full group hides Add friends" rule are unchanged. If that is the cap Charles meant, it needs its own change in fluxer-core.Checked, no issues
crates/fluxer-ui/tests/dms.rsand assert the plan's values: 2.625 rem = 42 px rows, 0.70 / 0.68 ratios, 32 px three-member max, 2 px cut-out, name cut at 100 chars (maxLength={100}, EditGroupModal.tsx:183). The four screenshot tests are present.UserAction::OpenFileDialog(FileDialog::GroupIcon).group_avatar::slotshandles any count and size is clamped to be finite.Local CI: NOT completed. My
cargo xtask cirun ended during clippy (exit 144) while another review's build was sharing the machine. I can't confirm it is green from this review.Verdict: no blocking findings in the code. Not approved, because my local CI run did not finish.
Review round 1: what changed for each finding
dms/header.rs, and the group member list goes throughdms::member_groups. I left those two files alone because the work fitted the existing modules better there. Only the plan's file list is out of date.group_cap/remaining_slots, and the "Add friends" button hidden in a full group) is the server's ownmax_group_dm_recipientslimit. If the client drops it, the server still rejects oversized groups. I opened #423 (question) to ask Charles which cap he meant and how far to go, and the fluxer-core change will follow once he answers.Local
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: all steps passed.Independent review of Task 32 (ui-dms), round 2, at
6a707ad. I reviewed only this task's own commits (bbdde34,0cad139,1bdd163,049ebf8,6a707ad) and read the code cold.Findings
remaining_slots/group_cap, which reads the server'smax_group_dm_recipients) and the rule that hides "Add friends to group" in a full group are as before. This review run was started by the same request, "remove the cap", again with no detail, so question #423 (which cap, and whether to drop it completely or only stop hiding "Add friends") still needs Charles's answer. That change belongs in fluxer-core, outside this UI task, so it does not block this PR.calls/dm_header.rsandmember_list.rs, but the work is indms/mod.rs(header_model,member_groups). The behaviour is all there. Only the plan's list is out of date.Round 1 fix verified
docs/screenshots/group-dm-welcome.pngandgroup-settings.pngare now byte-for-byte the same asfixtures/golden/group_dm_welcome.pngandgroup_settings.png(checked with cmp).dm-list.pngandfriend-picker.pngalso match their goldens.Checked, no issues
crates/fluxer-ui/tests/dms.rs:dm_row_close_emits,cluster_geometry,picker_cap_and_buttons,group_settings_emits_edit,welcome_stringsandheader_buttons_by_kind. They check the spec values: rows of 42 px (2.625 rem), cluster ratios of 0.70 for two and 0.68 for three, a three-member cluster of at most 32 px, a 2 px cut-out, the name cut at 100 characters, and the original's strings. The four screenshot tests are there.UserAction::OpenFileDialog(FileDialog::GroupIcon), and the picked file reaches the core only as aFileRef. The new dms and group_avatar code has no unwrap, expect or indexing on server data, andslotshandles any count. There are no secrets, upload URLs or real paths. The only path is a made-up/tmp/beach.pngin a testFileRef.Local CI:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree: all steps passed (fmt, clippy, deny, core-isolation, parity, test, vendored-tests and screenshot-tests; livekit-interop was skipped because FLUXER_LIVEKIT_TESTS is not set).Verdict: approved. There are no blocking findings and CI is green. The cap change follows #423.