Daily use 15: core friends, requests and blocking (#500) #572

Closed
charles wants to merge 0 commits from dailyuse-15-core-friends-blocking into dailyuse
Owner

What

Daily use 15 (spec §3.5, §6.2 "Friends"): relationships, the friends page and blocking in fluxer-core.

  • UserAction::Friend { action, surface, confirmed } acts or asks first per the original's per-action, per-surface table: social::confirm_rule(&FriendAction, FriendSurface) -> ConfirmRule::{None, Confirm, ConfirmShiftSkips}. Accept, Remove, Block and Unblock (menus, DM list, Blocked users) ask and Shift skips; Ignore and Cancel ask from a friends page row without a Shift bypass and act at once from the DM welcome and the menus; Send, Send by tag and Set nickname never ask. A confirm is the store's Confirm::Relationship, cancelled by CloseConfirm, accepted by re-sending confirmed (social::confirm_accept). social::confirm_text gives the original's strings (RelationshipActionUtils.tsx, FriendListItem.tsx:120-167).
  • Requests: SendFriendRequest, SendFriendRequestByTag, AcceptFriendRequest, BlockUser, RemoveRelationship (ignore, cancel, remove, unblock), SetFriendNickname (friends only, trimmed, blank clears, more than 32 characters refused with "Nickname must not exceed 32 characters"). The relationships change only when the answer arrives; failures open the original's error dialogs (RelationshipErrorModalUtils.tsx) in social.error, closed by CloseConfirm.
  • Add friend: social::parse_tag (trimmed, # split, 0000 without a tag, ^\d{4}$, #0…#0000 on unique-username instances) and social::add_friend_error (the API code strings of AddFriendForm.getErrorMessage / getSendFriendRequestErrorMessage; only NEW_CONVERSATIONS_LIMITED shows the server's message). Success: "Friend request sent", field emptied.
  • social::friends_page(&App) -> FriendsPageModel: tabs Online (default) / All / Pending (badge = incoming count) / Add friend (primary), search placeholders, case-insensitive search over "{nickname} {username}", sections ("Online", "All friends", "Incoming friend requests", "Outgoing friend requests") sorted by name, rows with tag, 36 px avatar, status, subtext (friend custom status, else "Incoming friend request" / "Friend request sent" / status label) and buttons (FriendButton::action(shift) applies the Shift rule), and all five empty states. No "Active now" sidebar (spec §17 Q7).
  • social::friend_more_menu (a friend row's "More"), social::blocked_users (Settings → Blocked users, sorted, "No blocked users" empty state), social::welcome_buttons → DmWelcome::Dm::friend_buttons (none / incoming / outgoing / friend / blocked / bot rules of DMWelcomeSection.tsx:130-205).
  • UserAction::LeaveGroup { channel_id, silent, confirmed } (in chat/dms.rs): asks with Confirm::LeaveGroup (no Shift bypass, "Leave silently" switch), then LeaveGroupDm { silent, delete_messages: false }; "Left group" toast, "Couldn't leave group" / "Try again in a moment." on failure.
  • Friend nicknames in names: selectors::members::display_name = guild nick, else friend nickname, else global name, else username (NicknameUtils.ts:85-115); dm_name already had it.

Tests

  • New: crates/fluxer-core/tests/social.rs (confirm_and_shift_rule_per_action_and_surface table, ignore_and_cancel_act_at_once_from_welcome_and_menus, confirm_strings_per_action, add_by_tag_parsing_table, send_by_tag_flow, error_codes_map_to_strings, welcome_buttons_by_relationship, leave_group_query_flags, leave_group_failure, friend_nickname_precedence, set_nickname_request, state_changes_only_after_the_server_answers, blocked_users_sorted_by_name, friend_row_more_menu, ...) and crates/fluxer-core/tests/friends_page.rs (tabs_and_counts, pending_badge_counts_incoming_only, sections_sorted_by_display_name, search_matches_nickname_and_username, empty_states_per_tab, search_placeholder_per_tab, ...). Relationship fixtures are shaped like RelationshipResponse (packages/schema/src/domains/user/UserResponseSchemas.ts:492 of the fork).
  • dailyuse_ports.rs: Friend, OpenFriends, FriendsSearch and LeaveGroup now have behaviour, so they left the "ignored until implemented" list; stubs_emit_nothing now expects the tab and search to be kept.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No desktop (FLUXER_DESKTOP_TESTS=1) tests touched or run; no UI change, no goldens.

Deviations / notes for review

  • Social::reduce now takes the session and the store's confirm (app.rs), and Dms::reduce the confirm (chat/mod.rs): the same pattern as Daily use 16b's Invites::reduce, so the merge with 16b in app.rs is mechanical.
  • Error dialogs (social.error, chat.dms.leave_error) close with CloseConfirm: no dismiss action exists among the Task 11a ports.
  • ApiResults carry no request id, so successes are matched to the requests by user id.
  • The friend row "More" menu has "Start voice call" only when the DM with the friend is known (StartCall takes a DM channel); "Start video call" is left out (camera, sub-project 5).
  • Not built: the original's staff "add immediately" checkbox, promptForAccountTier, RuntimeConfig.friendsDisabled / directMessagesDisabled gates.
  • Blocked users' Unblock checked against BlockedUsersTab.tsx:53-60: asks, Shift skips (bypassConfirm passed).

Stacked on: dailyuse-14-core-status-idle-presence

Closes #500
Refs #383

🤖 Generated with Claude Code

## What Daily use 15 (spec §3.5, §6.2 "Friends"): relationships, the friends page and blocking in `fluxer-core`. - `UserAction::Friend { action, surface, confirmed }` acts or asks first per the original's per-action, per-surface table: `social::confirm_rule(&FriendAction, FriendSurface) -> ConfirmRule::{None, Confirm, ConfirmShiftSkips}`. Accept, Remove, Block and Unblock (menus, DM list, Blocked users) ask and Shift skips; Ignore and Cancel ask from a friends page row without a Shift bypass and act at once from the DM welcome and the menus; Send, Send by tag and Set nickname never ask. A confirm is the store's `Confirm::Relationship`, cancelled by `CloseConfirm`, accepted by re-sending confirmed (`social::confirm_accept`). `social::confirm_text` gives the original's strings (`RelationshipActionUtils.tsx`, `FriendListItem.tsx:120-167`). - Requests: `SendFriendRequest`, `SendFriendRequestByTag`, `AcceptFriendRequest`, `BlockUser`, `RemoveRelationship` (ignore, cancel, remove, unblock), `SetFriendNickname` (friends only, trimmed, blank clears, more than 32 characters refused with "Nickname must not exceed 32 characters"). The relationships change only when the answer arrives; failures open the original's error dialogs (`RelationshipErrorModalUtils.tsx`) in `social.error`, closed by `CloseConfirm`. - Add friend: `social::parse_tag` (trimmed, `#` split, `0000` without a tag, `^\d{4}$`, `#0`…`#0000` on unique-username instances) and `social::add_friend_error` (the API code strings of `AddFriendForm.getErrorMessage` / `getSendFriendRequestErrorMessage`; only `NEW_CONVERSATIONS_LIMITED` shows the server's message). Success: "Friend request sent", field emptied. - `social::friends_page(&App) -> FriendsPageModel`: tabs Online (default) / All / Pending (badge = incoming count) / Add friend (primary), search placeholders, case-insensitive search over `"{nickname} {username}"`, sections ("Online", "All friends", "Incoming friend requests", "Outgoing friend requests") sorted by name, rows with tag, 36 px avatar, status, subtext (friend custom status, else "Incoming friend request" / "Friend request sent" / status label) and buttons (`FriendButton::action(shift)` applies the Shift rule), and all five empty states. No "Active now" sidebar (spec §17 Q7). - `social::friend_more_menu` (a friend row's "More"), `social::blocked_users` (Settings → Blocked users, sorted, "No blocked users" empty state), `social::welcome_buttons` → `DmWelcome::Dm::friend_buttons` (none / incoming / outgoing / friend / blocked / bot rules of `DMWelcomeSection.tsx:130-205`). - `UserAction::LeaveGroup { channel_id, silent, confirmed }` (in `chat/dms.rs`): asks with `Confirm::LeaveGroup` (no Shift bypass, "Leave silently" switch), then `LeaveGroupDm { silent, delete_messages: false }`; "Left group" toast, "Couldn't leave group" / "Try again in a moment." on failure. - Friend nicknames in names: `selectors::members::display_name` = guild nick, else friend nickname, else global name, else username (`NicknameUtils.ts:85-115`); `dm_name` already had it. ## Tests - New: `crates/fluxer-core/tests/social.rs` (`confirm_and_shift_rule_per_action_and_surface` table, `ignore_and_cancel_act_at_once_from_welcome_and_menus`, `confirm_strings_per_action`, `add_by_tag_parsing_table`, `send_by_tag_flow`, `error_codes_map_to_strings`, `welcome_buttons_by_relationship`, `leave_group_query_flags`, `leave_group_failure`, `friend_nickname_precedence`, `set_nickname_request`, `state_changes_only_after_the_server_answers`, `blocked_users_sorted_by_name`, `friend_row_more_menu`, ...) and `crates/fluxer-core/tests/friends_page.rs` (`tabs_and_counts`, `pending_badge_counts_incoming_only`, `sections_sorted_by_display_name`, `search_matches_nickname_and_username`, `empty_states_per_tab`, `search_placeholder_per_tab`, ...). Relationship fixtures are shaped like `RelationshipResponse` (`packages/schema/src/domains/user/UserResponseSchemas.ts:492` of the fork). - `dailyuse_ports.rs`: `Friend`, `OpenFriends`, `FriendsSearch` and `LeaveGroup` now have behaviour, so they left the "ignored until implemented" list; `stubs_emit_nothing` now expects the tab and search to be kept. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No desktop (`FLUXER_DESKTOP_TESTS=1`) tests touched or run; no UI change, no goldens. ## Deviations / notes for review - `Social::reduce` now takes the session and the store's confirm (`app.rs`), and `Dms::reduce` the confirm (`chat/mod.rs`): the same pattern as Daily use 16b's `Invites::reduce`, so the merge with 16b in `app.rs` is mechanical. - Error dialogs (`social.error`, `chat.dms.leave_error`) close with `CloseConfirm`: no dismiss action exists among the Task 11a ports. - `ApiResult`s carry no request id, so successes are matched to the requests by user id. - The friend row "More" menu has "Start voice call" only when the DM with the friend is known (`StartCall` takes a DM channel); "Start video call" is left out (camera, sub-project 5). - Not built: the original's staff "add immediately" checkbox, `promptForAccountTier`, `RuntimeConfig.friendsDisabled` / `directMessagesDisabled` gates. - Blocked users' Unblock checked against `BlockedUsersTab.tsx:53-60`: asks, Shift skips (`bypassConfirm` passed). Stacked on: dailyuse-14-core-status-idle-presence Closes #500 Refs #383 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every UserAction, CoreEvent, Effect, ApiRequest/ApiResult and chat::Confirm
variant of the Daily use plan (Task 11a), plus the menu types (menus::MenuModel,
MenuItem, MenuItemKind, MenuItemId, MenuModel::flatten). New actions and events
do nothing yet; the runtime answers each new request with 501 CLIENT_NOT_WIRED
and logs Effect::Window until Daily use 28. MessageUser and CloseDm take a
confirmed flag and act as before; Notification gains icon (always None).

Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #496

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
New domains notif_settings, social, invites, switcher, keynav and report with
their state, Default and stub reducers wired into App::apply; stub menu
builders (channel, category, guild, user, dm, mute::item); OwnPresence, profile
notes and modal state. Relationships move from chat::dms to app.social and are
read through social::relationship.

Refs #496

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings from READY, USER_GUILD_SETTINGS_UPDATE and the patch answers;
immediate menu mutes (guild scalars, whole channel_overrides map for
channels, categories and DMs in @me), mute_config in ms, local expiry
timers, 3 s debounced modal changes, revert on failure, selectors
is_muted / muted_until / level / guild_settings_modal, and the shared
mute menu row (MuteTargetMenuItem.tsx, MuteOptions.ts,
UserGuildSettings.ts, UserGuildSettingsCommands.ts).

Refs #497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
format_date_time shifted the end with to_offset, which panics when the
local date leaves year 9999 (a 9999-12-31T23:30Z end read east of UTC).
It now uses checked_to_offset and falls back to UTC. The
event_replaces_guild_settings test now checks the staff override is
really gone instead of an always-true assertion.

Refs #497

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Table tests for the notification decision (Notification.ts:187-256) and
tests for mute consumers: unread, guild pill, hide muted channels, DM
mentions. Stubs for SidebarSection.{category_muted,muted} and
notif_settings::hides_muted_channels so the tests compile.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- notif_settings::mentions_me as MessageUtils.isMentioned and
  Notification.isMessageMentionLike: blocked author no, user mention,
  @everyone unless suppressed or in an unjoined thread, own role unless
  suppressed, unmuted DM.
- notification_for follows Notification.ts:187-256: own, blocked, DND,
  SUPPRESS_NOTIFICATIONS, then thread levels (member level, parent level,
  forum new-post level, else only mentions) or mute at any level and the
  effective level.
- read_state::unread is false for a muted channel (mention counts kept);
  has_unread_messages keeps the raw answer for the new-messages bar and
  the thread menu's Mark as read.
- channel_tree: category_muted and muted rows; hide muted channels per
  guild (default_hide_muted_channels without an entry), unless selected,
  connected or with a mention; all-hidden categories hidden.
- DmRowModel.muted from the @me override; a thread is muted by its
  membership or its parent at any level.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #499

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Own presence from the user settings; SetStatus / SetCustomStatus write only
their fields (optimistic, reverted on failure); reset timer; idle and afk
from CoreEvent::Idle; op 3 whenever the computed presence changes; status
popout, custom status modal and custom status selectors.

Refs #499

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed reset PATCH was re-sent at once by the same refresh, with no
limit (a request storm while offline or on 4xx/429). Remember the reset
whose write failed and skip it until READY, USER_SETTINGS_UPDATE or a
patch answer brings new settings, as StatusExpiry.handleExpiry does not
retry. The custom status test now asserts the profile popout exists.

Refs #499

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Relationship fixtures are shaped like RelationshipResponse
(packages/schema/src/domains/user/UserResponseSchemas.ts:492 of the
fork): id, type, user, nickname (nullable, always sent),
share_voice_activity, friend_shares_voice_activity.

Refs #500

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #500

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

Independent review: Daily use 15 (core friends, requests, blocking)

Reviewed git diff fac6649..9f0269c (commits 9ce0034, 9f0269c) without relying on the implementer's notes.

Plan tests (1): all 13 named tests exist (tabs_and_counts, pending_badge_counts_incoming_only, sections_sorted_by_display_name, search_matches_nickname_and_username, empty_states_per_tab, add_by_tag_parsing_table, error_codes_map_to_strings, confirm_strings_per_action, confirm_and_shift_rule_per_action_and_surface, ignore_and_cancel_act_at_once_from_welcome_and_menus, welcome_buttons_by_relationship, leave_group_query_flags, friend_nickname_precedence). They check the spec §3.5 strings and the confirm table word for word. The table test also drives the reducer: it checks that the confirm opens, that confirmed: true acts and that the confirm closes.

Interfaces (2): friends_page -> FriendsPageModel { tab, pending_badge, search_placeholder, sections: [FriendSection { title, count, rows: [FriendRowModel { user, name, tag, subtext, status, buttons, .. }] }], empty }, blocked_users, DmWelcome::Dm::friend_buttons, LeaveGroup { silent } → Confirm::LeaveGroup, Confirm::Relationship closed by CloseConfirm, and social::confirm_rule(&action, surface) -> ConfirmRule::{None, Confirm, ConfirmShiftSkips} are all present. The Social::reduce / Dms::reduce signature changes are crate-private.

Invariants (3): fluxer-core only (std + fluxer_proto, no I/O). There is no unwrap or indexing on server data. Users the client has never seen are skipped, and a test covers it. The relationship fixtures match RelationshipResponse (UserResponseSchemas.ts:492) and UserPartialResponse, and the commit message names the source file. No secrets.

Parity spot-checks (4): I checked these against the fork:

  • FriendListItem.tsx:126-180: Ignore and Cancel open a danger confirm that uses getDisplayName and has no bypass. Accept passes bypassConfirm.
  • DMWelcomeSection.tsx:99-205: buttons by relationship, secondary variants, Ignore and Cancel act at once, Accept and Remove pass the bypass.
  • AddFriendForm.tsx:65-115: parseInput, /^0{1,4}$/ on username-only instances, ^\d{4}$, error mapping, NEW_CONVERSATIONS_LIMITED showing the server message.
  • getSendFriendRequestErrorMessage, where the message comes before the code.
  • RelationshipErrorModalUtils.tsx: titles and messages per action.
  • FriendsList.tsx / PendingFriendsView.tsx: empty-state order and strings ("Try a different name." for pending).
  • useLeaveGroup.tsx: strings, plus "Couldn't leave group" / "Try again in a moment.".
  • BlockedUsersTab.tsx:53-60: Unblock passes the bypass.

All of these match.

Review Focus 5: satisfied for this task's actions and surfaces. Accept, Remove, Block and Unblock confirm and Shift skips the confirm. Ignore and Cancel confirm on friend rows with no Shift skip, and act at once from the welcome and menus. Leave group confirms with no bypass. FriendButton::action(shift) sends confirmed only for ConfirmShiftSkips.

CI (6): FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a fresh review worktree: all steps passed.

Findings

  1. minor: NicknameUtils.ts:120 (getUntruncatedGuildMemberNickname, which the plan cites) puts the friend nickname above the guild nick. display_name applies the :85 order (guild nick first) everywhere. That matches the spec text and every surface this task touches. The fork uses the :120 order only in mention autocomplete (AutocompleteMention.tsx, AutocompleteOptionBuilders.ts), so whoever builds autocomplete names should use the friend-first order there.
  2. minor (documented deviation): the friend row's "More" menu shows "Start voice call" only when the DM is already known. The original opens the DM and then calls. "Start video call" is omitted (sub-project 5). Needs a later parity row if one is not already there.
  3. minor: a single CloseConfirm clears social.error, chat.dms.leave_error and the store confirm together. This is harmless today, because only one dialog shows at a time. Task 33 should know about it.
  4. minor (documented): not built: the staff "add immediately" checkbox, promptForAccountTier, and the friendsDisabled / directMessagesDisabled gates.

Verdict: APPROVED. No blocking findings, local CI green.

## Independent review: Daily use 15 (core friends, requests, blocking) Reviewed `git diff fac6649..9f0269c` (commits 9ce0034, 9f0269c) without relying on the implementer's notes. **Plan tests (1):** all 13 named tests exist (`tabs_and_counts`, `pending_badge_counts_incoming_only`, `sections_sorted_by_display_name`, `search_matches_nickname_and_username`, `empty_states_per_tab`, `add_by_tag_parsing_table`, `error_codes_map_to_strings`, `confirm_strings_per_action`, `confirm_and_shift_rule_per_action_and_surface`, `ignore_and_cancel_act_at_once_from_welcome_and_menus`, `welcome_buttons_by_relationship`, `leave_group_query_flags`, `friend_nickname_precedence`). They check the spec §3.5 strings and the confirm table word for word. The table test also drives the reducer: it checks that the confirm opens, that `confirmed: true` acts and that the confirm closes. **Interfaces (2):** `friends_page -> FriendsPageModel { tab, pending_badge, search_placeholder, sections: [FriendSection { title, count, rows: [FriendRowModel { user, name, tag, subtext, status, buttons, .. }] }], empty }`, `blocked_users`, `DmWelcome::Dm::friend_buttons`, `LeaveGroup { silent }` → `Confirm::LeaveGroup`, `Confirm::Relationship` closed by `CloseConfirm`, and `social::confirm_rule(&action, surface) -> ConfirmRule::{None, Confirm, ConfirmShiftSkips}` are all present. The `Social::reduce` / `Dms::reduce` signature changes are crate-private. **Invariants (3):** fluxer-core only (std + fluxer_proto, no I/O). There is no unwrap or indexing on server data. Users the client has never seen are skipped, and a test covers it. The relationship fixtures match `RelationshipResponse` (`UserResponseSchemas.ts:492`) and `UserPartialResponse`, and the commit message names the source file. No secrets. **Parity spot-checks (4):** I checked these against the fork: - `FriendListItem.tsx:126-180`: Ignore and Cancel open a danger confirm that uses `getDisplayName` and has no bypass. Accept passes `bypassConfirm`. - `DMWelcomeSection.tsx:99-205`: buttons by relationship, secondary variants, Ignore and Cancel act at once, Accept and Remove pass the bypass. - `AddFriendForm.tsx:65-115`: `parseInput`, `/^0{1,4}$/` on username-only instances, `^\d{4}$`, error mapping, `NEW_CONVERSATIONS_LIMITED` showing the server message. - `getSendFriendRequestErrorMessage`, where the message comes before the code. - `RelationshipErrorModalUtils.tsx`: titles and messages per action. - `FriendsList.tsx` / `PendingFriendsView.tsx`: empty-state order and strings ("Try a different name." for pending). - `useLeaveGroup.tsx`: strings, plus "Couldn't leave group" / "Try again in a moment.". - `BlockedUsersTab.tsx:53-60`: Unblock passes the bypass. All of these match. **Review Focus 5:** satisfied for this task's actions and surfaces. Accept, Remove, Block and Unblock confirm and Shift skips the confirm. Ignore and Cancel confirm on friend rows with no Shift skip, and act at once from the welcome and menus. Leave group confirms with no bypass. `FriendButton::action(shift)` sends `confirmed` only for `ConfirmShiftSkips`. **CI (6):** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a fresh review worktree: **all steps passed**. ### Findings 1. **minor**: `NicknameUtils.ts:120` (`getUntruncatedGuildMemberNickname`, which the plan cites) puts the friend nickname *above* the guild nick. `display_name` applies the `:85` order (guild nick first) everywhere. That matches the spec text and every surface this task touches. The fork uses the `:120` order only in mention autocomplete (`AutocompleteMention.tsx`, `AutocompleteOptionBuilders.ts`), so whoever builds autocomplete names should use the friend-first order there. 2. **minor** (documented deviation): the friend row's "More" menu shows "Start voice call" only when the DM is already known. The original opens the DM and then calls. "Start video call" is omitted (sub-project 5). Needs a `later` parity row if one is not already there. 3. **minor**: a single `CloseConfirm` clears `social.error`, `chat.dms.leave_error` and the store confirm together. This is harmless today, because only one dialog shows at a time. Task 33 should know about it. 4. **minor** (documented): not built: the staff "add immediately" checkbox, `promptForAccountTier`, and the `friendsDisabled` / `directMessagesDisabled` gates. **Verdict: APPROVED.** No blocking findings, local CI green.
Author
Owner

Independent review: Daily use 15 (diff fac6649..9f0269c)

Tests (plan Step 1): all 13 named tests exist (friends_page.rs: tabs_and_counts, pending_badge_counts_incoming_only, sections_sorted_by_display_name, search_matches_nickname_and_username, empty_states_per_tab; social.rs: the other 8). The confirm table test covers every row of spec §3.5 and also checks that the reducer asks, accepts and closes as the rule says.

Interfaces: friends_page, FriendsPageModel { tab, pending_badge, search_placeholder, sections, empty, .. }, FriendSection { title, count, rows }, FriendRowModel { user, name, tag, subtext, status, buttons, .. }, blocked_users, DmWelcome::Dm::friend_buttons, UserAction::LeaveGroup { silent } with Confirm::LeaveGroup, and social::confirm_rule -> ConfirmRule::{None, Confirm, ConfirmShiftSkips} are all present. confirm_rule takes &FriendAction; that is fine for its consumers.

Invariants: fluxer-core does no I/O and imports nothing forbidden. There are no unwraps on server data (the badge count uses try_from(..).unwrap_or). No fixtures, secrets or paths were added. Relationships change only when the API answers.

Parity spot-checks (fluxer-soundboard):

  • AddFriendForm.tsx:65-103: parseInput (split on the first #, /^0{1,4}$/ → 0000 when usernames are unique, ^\d{4}$) and getErrorMessage (the server message shown only for NEW_CONVERSATIONS_LIMITED) match.
  • RelationshipActionUtils.tsx:121-147: getSendFriendRequestErrorMessage (apiMessage first, then the codes) matches.
  • NicknameUtils.ts:85-117: the guild nick wins over the friend nickname, which wins over the global name. Line 120 (friend first) is used only by AutocompleteMention and AutocompleteOptionBuilders, so leaving it out of display_name is correct.
  • FriendListItem.tsx:126-180: Ignore and Cancel confirm with no bypassConfirm and use getDisplayName; Accept passes bypassConfirm. Matches.
  • DMWelcomeSection.tsx:100-131: Accept and Remove bypass, Ignore and Cancel act at once, bots get no buttons. Matches.

Review Focus 5: implemented as the table says for this task's actions. Close DM and Open DM while blocked belong to Task 18.

Findings:

  • minor: CloseConfirm clears chat.confirm, social.error and dms.leave_error together. Task 33 should draw at most one of these at a time (already noted by the implementer).
  • minor: nothing clears social.toast and dms.toast except the next action. The UI (Task 33) should time them out without writing to core state, or a later task should add a dismiss.
  • minor: SendByTag while one is already sending clears toast and error before it returns with no request. Harmless.
  • minor: the friend row's "More" menu has no "Start video call" and offers voice only when the DM is known. This is a deliberate deviation; it needs a later row in docs/parity/dailyuse.md (Task 40).

CI: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a fresh review worktree: all steps passed, exit 0.

Verdict: APPROVED (no blocking findings, CI green).

## Independent review: Daily use 15 (diff fac6649..9f0269c) **Tests (plan Step 1):** all 13 named tests exist (`friends_page.rs`: tabs_and_counts, pending_badge_counts_incoming_only, sections_sorted_by_display_name, search_matches_nickname_and_username, empty_states_per_tab; `social.rs`: the other 8). The confirm table test covers every row of spec §3.5 and also checks that the reducer asks, accepts and closes as the rule says. **Interfaces:** `friends_page`, `FriendsPageModel { tab, pending_badge, search_placeholder, sections, empty, .. }`, `FriendSection { title, count, rows }`, `FriendRowModel { user, name, tag, subtext, status, buttons, .. }`, `blocked_users`, `DmWelcome::Dm::friend_buttons`, `UserAction::LeaveGroup { silent }` with `Confirm::LeaveGroup`, and `social::confirm_rule -> ConfirmRule::{None, Confirm, ConfirmShiftSkips}` are all present. `confirm_rule` takes `&FriendAction`; that is fine for its consumers. **Invariants:** fluxer-core does no I/O and imports nothing forbidden. There are no unwraps on server data (the badge count uses `try_from(..).unwrap_or`). No fixtures, secrets or paths were added. Relationships change only when the API answers. **Parity spot-checks (fluxer-soundboard):** - `AddFriendForm.tsx:65-103`: `parseInput` (split on the first `#`, `/^0{1,4}$/` → `0000` when usernames are unique, `^\d{4}$`) and `getErrorMessage` (the server message shown only for NEW_CONVERSATIONS_LIMITED) match. - `RelationshipActionUtils.tsx:121-147`: `getSendFriendRequestErrorMessage` (apiMessage first, then the codes) matches. - `NicknameUtils.ts:85-117`: the guild nick wins over the friend nickname, which wins over the global name. Line 120 (friend first) is used only by AutocompleteMention and AutocompleteOptionBuilders, so leaving it out of `display_name` is correct. - `FriendListItem.tsx:126-180`: Ignore and Cancel confirm with no `bypassConfirm` and use `getDisplayName`; Accept passes `bypassConfirm`. Matches. - `DMWelcomeSection.tsx:100-131`: Accept and Remove bypass, Ignore and Cancel act at once, bots get no buttons. Matches. **Review Focus 5:** implemented as the table says for this task's actions. Close DM and Open DM while blocked belong to Task 18. **Findings:** - minor: `CloseConfirm` clears `chat.confirm`, `social.error` and `dms.leave_error` together. Task 33 should draw at most one of these at a time (already noted by the implementer). - minor: nothing clears `social.toast` and `dms.toast` except the next action. The UI (Task 33) should time them out without writing to core state, or a later task should add a dismiss. - minor: `SendByTag` while one is already sending clears `toast` and `error` before it returns with no request. Harmless. - minor: the friend row's "More" menu has no "Start video call" and offers voice only when the DM is known. This is a deliberate deviation; it needs a `later` row in docs/parity/dailyuse.md (Task 40). **CI:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a fresh review worktree: all steps passed, exit 0. **Verdict: APPROVED** (no blocking findings, CI green).
Author
Owner

Merged into dailyuse at f7972c3 (combined merge of 23 Daily use tasks plus textchat).

Merged into `dailyuse` at f7972c3 (combined merge of 23 Daily use tasks plus `textchat`).
charles closed this pull request 2026-11-15 06:08:42 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.