Daily use 17: core channel, category and guild menus (#503) #567

Closed
charles wants to merge 0 commits from dailyuse-17-core-channel-guild-menus into dailyuse
Owner

What

Daily use 17: the channel, voice channel, category and guild context menus as MenuModels in fluxer-core, bulk "Mark as read", and synced collapsed categories (spec §3.2 (a)–(d), §6.2 "Menus").

  • menus::channel(app, id) — text / announcement / voice / link / forum / media channels of a guild (threads, categories, DMs: empty). Rows, in the original's groups and order (ChannelContextMenu.tsx, ChannelMenuData.tsx:429-632): Open chat (voice) | Mark as read (unread) | Invite people (can_invite, not forum/media), Follow channel (announcement + can_follow), Open link / Copy link (link channel with URL), Copy channel link | Mute channel ▸ (not link channels) + Notification settings | Copy channel ID.
  • menus::category(app, id) (CategoryMenuData.tsx:263-339): Mark as read (always; Disabled when nothing in it is unread) | Collapse/Expand category, Collapse/Expand all categories | Copy category ID | Mute category ▸.
  • menus::guild(app, id) (GuildMenuData.tsx:314-497): Mark as read (unread channel, or joined-unread / mentioned thread), Invite members (invite_channel) | Notification settings | Hide muted channels (checkbox) | Leave community (not owner, danger) | Copy community ID | Mute community ▸.
  • read_state: MarkCategoryRead / MarkGuildRead → ApiRequest::AckReadStates (≤100 per request, newest message, read locally with mentions zeroed); category_has_unread, guild_has_unread.
  • notif_settings: is_collapsed = category override's collapsed; all_categories_collapsed; ToggleCategory, CollapseAllCategories (whole channel_overrides map) and SetHideMutedChannels (hide_muted_channels only, no-op if unchanged) are debounced 3 s like the modal, as UserGuildSettingsCommands.ts:150-246 (none is persistImmediately).
  • menus::channel::reduce (wired in app.rs): CopyId, CopyChannelLink ({webapp}/channels/{guild|@me}/{channel}), CopyLinkChannelUrl → Effect::Clipboard. Toasts are the UI's (Task 29).
  • fluxer-ui sidebar: the local collapsed set is gone; it reads notif_settings::is_collapsed and a category click emits UserAction::ToggleCategory.

Tests

  • New crates/fluxer-core/tests/menus_channel_guild.rs: channel_menu_items (text, announcement, voice, link, forum, thread, other guild × unread × can-invite), category_menu_items, guild_menu_items (owner vs member × unread), mute_row_submenu_and_unmute_hint, copy_ids_always_present, category_mark_read_acks_children, guild_mark_read_bulk (incl. joined/unjoined threads and 121 channels → 100 + 21), collapse_writes_override_collapsed, collapse_all_writes_every_category, hide_muted_channels_toggle_writes_scalar, open_modal_actions_leave_the_store_alone. Seen failing before the implementation.
  • crates/fluxer-ui/tests/channel_types_sidebar.rs: category_click_collapses_through_the_store; voice_sidebar.rs's collapse test now applies the emitted action to the store (golden voice_sidebar_collapsed unchanged).
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No FLUXER_DESKTOP_TESTS tests involved. No new screenshots.

Deviations / reviewer notes

  • UserAction had no way to open the notification settings modal, the follow modal, or copy a link channel's URL, so event.rs gains three variants: OpenNotificationSettings { guild_id }, OpenFollowChannel { channel_id } (both ignored by the store: the modals are UI view state, Tasks 29/30 intercept them) and CopyLinkChannelUrl(Snowflake).
  • app.rs gets one line to wire the copy reducer; CopyId is handled for every IdKind (including User, for Task 18).
  • dailyuse_ports.rs: actions now implemented are taken out of new_actions_are_ignored_until_implemented, and the channel/category/guild menus out of stubs_emit_nothing.
  • The forum "unread" for the guild's Mark as read uses the channel's own marker (the original's hasForumUnread has no native counterpart yet).
  • docs/parity/dailyuse.md does not exist yet; the later (7) rows for the omitted items are left to Task 40.

Stacked on: dailyuse-13-core-honour-mutes, dailyuse-16b-core-create-invites-guilds

Closes #503

🤖 Generated with Claude Code

## What Daily use 17: the channel, voice channel, category and guild context menus as `MenuModel`s in `fluxer-core`, bulk "Mark as read", and synced collapsed categories (spec §3.2 (a)–(d), §6.2 "Menus"). - `menus::channel(app, id)` — text / announcement / voice / link / forum / media channels of a guild (threads, categories, DMs: empty). Rows, in the original's groups and order (`ChannelContextMenu.tsx`, `ChannelMenuData.tsx:429-632`): Open chat (voice) | Mark as read (unread) | Invite people (`can_invite`, not forum/media), Follow channel (announcement + `can_follow`), Open link / Copy link (link channel with URL), Copy channel link | Mute channel ▸ (not link channels) + Notification settings | Copy channel ID. - `menus::category(app, id)` (`CategoryMenuData.tsx:263-339`): Mark as read (always; `Disabled` when nothing in it is unread) | Collapse/Expand category, Collapse/Expand all categories | Copy category ID | Mute category ▸. - `menus::guild(app, id)` (`GuildMenuData.tsx:314-497`): Mark as read (unread channel, or joined-unread / mentioned thread), Invite members (`invite_channel`) | Notification settings | Hide muted channels (checkbox) | Leave community (not owner, danger) | Copy community ID | Mute community ▸. - `read_state`: `MarkCategoryRead` / `MarkGuildRead` → `ApiRequest::AckReadStates` (≤100 per request, newest message, read locally with mentions zeroed); `category_has_unread`, `guild_has_unread`. - `notif_settings`: `is_collapsed` = category override's `collapsed`; `all_categories_collapsed`; `ToggleCategory`, `CollapseAllCategories` (whole `channel_overrides` map) and `SetHideMutedChannels` (`hide_muted_channels` only, no-op if unchanged) are debounced 3 s like the modal, as `UserGuildSettingsCommands.ts:150-246` (none is `persistImmediately`). - `menus::channel::reduce` (wired in `app.rs`): `CopyId`, `CopyChannelLink` (`{webapp}/channels/{guild|@me}/{channel}`), `CopyLinkChannelUrl` → `Effect::Clipboard`. Toasts are the UI's (Task 29). - `fluxer-ui` sidebar: the local collapsed set is gone; it reads `notif_settings::is_collapsed` and a category click emits `UserAction::ToggleCategory`. ## Tests - New `crates/fluxer-core/tests/menus_channel_guild.rs`: `channel_menu_items` (text, announcement, voice, link, forum, thread, other guild × unread × can-invite), `category_menu_items`, `guild_menu_items` (owner vs member × unread), `mute_row_submenu_and_unmute_hint`, `copy_ids_always_present`, `category_mark_read_acks_children`, `guild_mark_read_bulk` (incl. joined/unjoined threads and 121 channels → 100 + 21), `collapse_writes_override_collapsed`, `collapse_all_writes_every_category`, `hide_muted_channels_toggle_writes_scalar`, `open_modal_actions_leave_the_store_alone`. Seen failing before the implementation. - `crates/fluxer-ui/tests/channel_types_sidebar.rs`: `category_click_collapses_through_the_store`; `voice_sidebar.rs`'s collapse test now applies the emitted action to the store (golden `voice_sidebar_collapsed` unchanged). - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No `FLUXER_DESKTOP_TESTS` tests involved. No new screenshots. ## Deviations / reviewer notes - `UserAction` had no way to open the notification settings modal, the follow modal, or copy a link channel's URL, so `event.rs` gains three variants: `OpenNotificationSettings { guild_id }`, `OpenFollowChannel { channel_id }` (both ignored by the store: the modals are UI view state, Tasks 29/30 intercept them) and `CopyLinkChannelUrl(Snowflake)`. - `app.rs` gets one line to wire the copy reducer; `CopyId` is handled for every `IdKind` (including User, for Task 18). - `dailyuse_ports.rs`: actions now implemented are taken out of `new_actions_are_ignored_until_implemented`, and the channel/category/guild menus out of `stubs_emit_nothing`. - The forum "unread" for the guild's Mark as read uses the channel's own marker (the original's `hasForumUnread` has no native counterpart yet). - `docs/parity/dailyuse.md` does not exist yet; the `later (7)` rows for the omitted items are left to Task 40. Stacked on: dailyuse-13-core-honour-mutes, dailyuse-16b-core-create-invites-guilds Closes #503 🤖 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>
Fixtures used: fixtures/rest/invite_guild.json, invite_group_dm.json (shaped as
fork:packages/schema/src/domains/invite/InviteSchemas.ts:42-91, Daily use 2).

Refs #501

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

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>
Uses the existing server-shaped fixtures: rest/invite_metadata.json
(POST /channels/{id}/invites, S/invite/InviteSchemas.ts:42-91 plus the
metadata fields), rest/guild.json (POST /guilds, GuildResponse) and
gateway/guild_create.json.

Refs #502

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The invite modal (default invite at open, settings clamped to the
server's limits, link, expiry text, friends and group DMs with
Invite -> Sent through SendMessage), can_invite / invite_channel for the
menus, "Create or join a community" (name, static icon, create then
select the system channel once its GUILD_CREATE is in, join through the
accept flow), and "Leave community" (Confirm::LeaveGuild, no Shift
bypass, no delete_messages; hidden for the owner; on success the guild
goes as its GUILD_DELETE would, so a selected one leaves for the DMs).

Refs #502

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dailyuse_ports listed them among the stubs that do nothing.

Refs #502

Co-Authored-By: Claude Opus 5.5 <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>
menus::{channel, category, guild} build the original's desktop menus
(AM/ChannelContextMenu.tsx, ChannelMenuData.tsx:429-632,
CategoryMenuData.tsx:263-339, GuildMenuData.tsx:314-497) with the "B"
rows of spec 3.2 (a)-(d). MarkCategoryRead and MarkGuildRead ack in
bulk through POST /read-states/ack; CopyId, CopyChannelLink and the
link channel's "Copy link" write the clipboard. Collapsed categories
are synced as the category override's `collapsed`
(UserGuildSettingsCommands.ts:198-246), written debounced 3 s with the
whole override map; "Hide muted channels" likewise. The sidebar reads
notif_settings::is_collapsed and emits UserAction::ToggleCategory
instead of keeping a local set.

New UserAction variants: CopyLinkChannelUrl, OpenNotificationSettings,
OpenFollowChannel (the last two open UI-owned modals).

Refs #503

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

Independent review: Daily use 17 (diff 48fab7b..6db33ab)

Tests named by the plan: all 9 are in crates/fluxer-core/tests/menus_channel_guild.rs: channel_menu_items, category_menu_items, guild_menu_items, mute_row_submenu_and_unmute_hint, copy_ids_always_present, category_mark_read_acks_children, guild_mark_read_bulk, collapse_writes_override_collapsed, collapse_all_writes_every_category. Two more tests cover hide-muted and the open-modal actions. The UI collapse test is category_click_collapses_through_the_store, and voice_sidebar's collapse test now goes through the store.

Interfaces: menus::{channel, category, guild} are re-exported from menus/mod.rs with the plan's signatures. MarkCategoryRead and MarkGuildRead send bulk acks through AckReadStates, in batches of 100. notif_settings::is_collapsed reads the override's collapsed. The UI no longer keeps its own collapsed set.

Invariants: no new deps and no I/O in core. The new override is {collapsed, message_notifications: 3, muted, mute_config: null, unread_badges: null}, which matches ChannelOverrideSchema (UserRequestSchemas.ts). The whole channel_overrides map is carried, and the other overrides round-trip unchanged (tested). No secrets in the diff.

Parity checks against the fork:

  • Channel menu groups and conditions match ChannelMenuData.tsx:429-632 and ChannelContextMenu.tsx. Voice gets the mute row (GUILD_TEXT_BASED_CHANNEL_TYPES includes VOICE), link channels have no mute row but keep Notification settings, and forums have no Invite.
  • Category: Mark as read is always shown and disabled when nothing is unread, with mute last (CategoryMenuData.tsx, CategoryContextMenu.tsx).
  • Guild order: quick, notif, hide-muted, danger, ids, mute. This matches GuildMenuData.tsx + GuildContextMenu.tsx.
  • toggleAllCategoriesCollapsed, toggleChannelCollapsed and toggleHideMutedChannels all go through the 3 s scheduleUpdate, as in the fork.
  • bulkAckChannels uses a batch of 100. getUnreadThreadIds counts a thread when it is joined and unread, or has a mention.
  • buildChannelLink gives /channels/{guild|@me}/{id}.

Review Focus 4: the rows are exactly the spec's §3.2 (a)–(d) "B" rows, in order, with their conditions, and the strings are the original's.

Findings:

  • [minor] event.rs gains OpenNotificationSettings, OpenFollowChannel and CopyLinkChannelUrl, which are not in 11a's ports. This is additive and nothing breaks, but Tasks 29 and 30 must catch the two Open* actions in the UI. Please note this on #503 or the Task 29 issue.
  • [minor] Voice "Open chat" emits SelectChannel(voice). The original also collapses the compact call so that the chat shows (handleOpenChat). Natively, selecting a voice channel you are not in shows the call view or "Join voice", with chat behind local.call.chat_open. Task 29 (voice_row_open_chat) must open the chat itself.
  • [minor] The guild's Mark as read uses the forum channel's own marker instead of hasForumUnread, and skips the ThreadGuilds.isActive gate. The implementer documented this; it should become a follow-up issue.
  • [minor] The category's Mark as read acks only children that are unread or mentioned, through one bulk ack. The original calls ack(ch, true, true) on every child. The plan sanctions the bulk ack and the effect is the same.
  • [minor] menus::channel::reduce copies CopyId for every IdKind, User included. Task 18 must not add a second handler, or the clipboard is written twice.

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

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

## Independent review: Daily use 17 (diff 48fab7b..6db33ab) **Tests named by the plan:** all 9 are in `crates/fluxer-core/tests/menus_channel_guild.rs`: `channel_menu_items`, `category_menu_items`, `guild_menu_items`, `mute_row_submenu_and_unmute_hint`, `copy_ids_always_present`, `category_mark_read_acks_children`, `guild_mark_read_bulk`, `collapse_writes_override_collapsed`, `collapse_all_writes_every_category`. Two more tests cover hide-muted and the open-modal actions. The UI collapse test is `category_click_collapses_through_the_store`, and `voice_sidebar`'s collapse test now goes through the store. **Interfaces:** `menus::{channel, category, guild}` are re-exported from `menus/mod.rs` with the plan's signatures. `MarkCategoryRead` and `MarkGuildRead` send bulk acks through `AckReadStates`, in batches of 100. `notif_settings::is_collapsed` reads the override's `collapsed`. The UI no longer keeps its own collapsed set. **Invariants:** no new deps and no I/O in core. The new override is `{collapsed, message_notifications: 3, muted, mute_config: null, unread_badges: null}`, which matches `ChannelOverrideSchema` (`UserRequestSchemas.ts`). The whole `channel_overrides` map is carried, and the other overrides round-trip unchanged (tested). No secrets in the diff. **Parity checks against the fork:** - Channel menu groups and conditions match `ChannelMenuData.tsx:429-632` and `ChannelContextMenu.tsx`. Voice gets the mute row (`GUILD_TEXT_BASED_CHANNEL_TYPES` includes VOICE), link channels have no mute row but keep Notification settings, and forums have no Invite. - Category: Mark as read is always shown and disabled when nothing is unread, with mute last (`CategoryMenuData.tsx`, `CategoryContextMenu.tsx`). - Guild order: quick, notif, hide-muted, danger, ids, mute. This matches `GuildMenuData.tsx` + `GuildContextMenu.tsx`. - `toggleAllCategoriesCollapsed`, `toggleChannelCollapsed` and `toggleHideMutedChannels` all go through the 3 s `scheduleUpdate`, as in the fork. - `bulkAckChannels` uses a batch of 100. `getUnreadThreadIds` counts a thread when it is joined and unread, or has a mention. - `buildChannelLink` gives `/channels/{guild|@me}/{id}`. **Review Focus 4:** the rows are exactly the spec's §3.2 (a)–(d) "B" rows, in order, with their conditions, and the strings are the original's. **Findings:** - [minor] `event.rs` gains `OpenNotificationSettings`, `OpenFollowChannel` and `CopyLinkChannelUrl`, which are not in 11a's ports. This is additive and nothing breaks, but Tasks 29 and 30 must catch the two `Open*` actions in the UI. Please note this on #503 or the Task 29 issue. - [minor] Voice "Open chat" emits `SelectChannel(voice)`. The original also collapses the compact call so that the chat shows (`handleOpenChat`). Natively, selecting a voice channel you are not in shows the call view or "Join voice", with chat behind `local.call.chat_open`. Task 29 (`voice_row_open_chat`) must open the chat itself. - [minor] The guild's Mark as read uses the forum channel's own marker instead of `hasForumUnread`, and skips the `ThreadGuilds.isActive` gate. The implementer documented this; it should become a follow-up issue. - [minor] The category's Mark as read acks only children that are unread or mentioned, through one bulk ack. The original calls `ack(ch, true, true)` on every child. The plan sanctions the bulk ack and the effect is the same. - [minor] `menus::channel::reduce` copies `CopyId` for every `IdKind`, `User` included. Task 18 must not add a second handler, or the clipboard is written twice. **CI:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a fresh review worktree: all steps passed. **Verdict: APPROVED** (no blocking findings, CI green).
Author
Owner

Independent review: Daily use 17 (channel, category and guild menus) at 6db33ab

Scope: git diff 48fab7b..6db33ab.

Local gate: I ran FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a clean review worktree. Result: "all steps passed", exit 0.

Tests (plan step 1): all nine named tests exist and assert what the plan says:

  • channel_menu_items covers text, announcement, voice, link and forum channels, a thread, a category and a DM, with unread and can-invite cases.
  • category_menu_items and guild_menu_items (owner vs member, unread vs read) check rows in order, the original's labels and the actions.
  • mute_row_submenu_and_unmute_hint checks 9 presets, the parent click mutes forever, and "Muted until…" / "Muted".
  • copy_ids_always_present, category_mark_read_acks_children (exact request body) and guild_mark_read_bulk (muted channels included, joined vs unjoined threads, 120 channels sent as batches of 100 + 21).
  • collapse_writes_override_collapsed (3 s debounce, whole map written, other overrides kept byte for byte) and collapse_all_writes_every_category.

Interfaces: menus::{channel, category, guild}(&App, id) -> MenuModel, UserAction::{MarkCategoryRead, MarkGuildRead} as bulk acks in read_state.rs, CopyChannelLink (same {webapp}/channels/{guild|@me}/{channel} base as chat::actions::message_link), notif_settings::is_collapsed, and ToggleCategory / CollapseAllCategories through the Task 12 override writer. All present as written. The sidebar's local BTreeSet is gone, and clicks now emit ToggleCategory.

Invariants: core gains only fluxer_proto imports and does no I/O. The UI change only reads notif_settings::is_collapsed. No new fixtures. No unwrap or indexing on server data in the new code. No secrets.

Parity spot-checks against the fork:

  • ChannelContextMenu.tsx + ChannelMenuData.tsx: groups are voice / meta / invite / mute+notification / id. The mute row is left out for link channels (!state.isLinkChannel, showMuteMenuItem). There is no "Invite people" on thread-only channels. Matches.
  • CategoryContextMenu.tsx + CategoryMenuData.tsx:116-339: the order is mark read (always shown, disabled when !hasUnread), collapse / collapse all, copy ID, then mute last. allCategoriesCollapsed is false when the guild has no categories. Matches.
  • GuildContextMenu.tsx + GuildMenuData.tsx:115-497: the order is quick, settings, hide-muted (its own group, with the mute row rendered last), danger (leave when not owner), id, mute. handleMarkAsRead uses isUnreadOrMentioned plus getUnreadThreadIds (joined and unread, or mentioned), and bulkAckChannels sends chunks of 100. Matches.
  • UserGuildSettingsCommands.ts:150-154,198-200,230-252: toggleHideMutedChannels and the collapse writes go through scheduleUpdate (debounced), and collapse-all writes every category's override. Matches.

Findings:

  1. minor: the guild "Mark as read" visibility uses a forum's own read marker. The original uses hasForumUnread, which also requires the new-posts-unread flag. In the native client the row may therefore show where the original hides it. This is disclosed by the implementer, and there is no native counterpart yet.
  2. minor: the category "Mark as read" sends one bulk POST /read-states/ack, where the original calls ack(id, true, true) once per child. The plan's Interfaces block asks for bulk acks, so this is accepted.
  3. minor: no UI handles OpenNotificationSettings or OpenFollowChannel yet. That is expected, because the menus are drawn by Tasks 29/30, but those tasks need to wire them up.
  4. minor: channel_link repeats the base-URL logic of chat::actions::link instead of sharing it.
  5. minor: the forum, announcement and voice cases are covered only in the read state, not with unread or can't-invite combinations. The "× unread × can-invite" table is covered by the general channel and the lounge.

Verdict: approve. No blocking findings, and local CI is green.

🤖 Generated with Claude Code

## Independent review: Daily use 17 (channel, category and guild menus) at 6db33ab Scope: `git diff 48fab7b..6db33ab`. **Local gate:** I ran `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a clean review worktree. Result: "all steps passed", exit 0. **Tests (plan step 1):** all nine named tests exist and assert what the plan says: - `channel_menu_items` covers text, announcement, voice, link and forum channels, a thread, a category and a DM, with unread and can-invite cases. - `category_menu_items` and `guild_menu_items` (owner vs member, unread vs read) check rows in order, the original's labels and the actions. - `mute_row_submenu_and_unmute_hint` checks 9 presets, the parent click mutes forever, and "Muted until…" / "Muted". - `copy_ids_always_present`, `category_mark_read_acks_children` (exact request body) and `guild_mark_read_bulk` (muted channels included, joined vs unjoined threads, 120 channels sent as batches of 100 + 21). - `collapse_writes_override_collapsed` (3 s debounce, whole map written, other overrides kept byte for byte) and `collapse_all_writes_every_category`. **Interfaces:** `menus::{channel, category, guild}(&App, id) -> MenuModel`, `UserAction::{MarkCategoryRead, MarkGuildRead}` as bulk acks in `read_state.rs`, `CopyChannelLink` (same `{webapp}/channels/{guild|@me}/{channel}` base as `chat::actions::message_link`), `notif_settings::is_collapsed`, and `ToggleCategory` / `CollapseAllCategories` through the Task 12 override writer. All present as written. The sidebar's local `BTreeSet` is gone, and clicks now emit `ToggleCategory`. **Invariants:** core gains only `fluxer_proto` imports and does no I/O. The UI change only reads `notif_settings::is_collapsed`. No new fixtures. No `unwrap` or indexing on server data in the new code. No secrets. **Parity spot-checks against the fork:** - `ChannelContextMenu.tsx` + `ChannelMenuData.tsx`: groups are voice / meta / invite / mute+notification / id. The mute row is left out for link channels (`!state.isLinkChannel`, `showMuteMenuItem`). There is no "Invite people" on thread-only channels. Matches. - `CategoryContextMenu.tsx` + `CategoryMenuData.tsx:116-339`: the order is mark read (always shown, disabled when `!hasUnread`), collapse / collapse all, copy ID, then mute last. `allCategoriesCollapsed` is false when the guild has no categories. Matches. - `GuildContextMenu.tsx` + `GuildMenuData.tsx:115-497`: the order is quick, settings, hide-muted (its own group, with the mute row rendered last), danger (leave when not owner), id, mute. `handleMarkAsRead` uses `isUnreadOrMentioned` plus `getUnreadThreadIds` (joined and unread, or mentioned), and `bulkAckChannels` sends chunks of 100. Matches. - `UserGuildSettingsCommands.ts:150-154,198-200,230-252`: `toggleHideMutedChannels` and the collapse writes go through `scheduleUpdate` (debounced), and collapse-all writes every category's override. Matches. **Findings:** 1. minor: the guild "Mark as read" visibility uses a forum's own read marker. The original uses `hasForumUnread`, which also requires the new-posts-unread flag. In the native client the row may therefore show where the original hides it. This is disclosed by the implementer, and there is no native counterpart yet. 2. minor: the category "Mark as read" sends one bulk `POST /read-states/ack`, where the original calls `ack(id, true, true)` once per child. The plan's Interfaces block asks for bulk acks, so this is accepted. 3. minor: no UI handles `OpenNotificationSettings` or `OpenFollowChannel` yet. That is expected, because the menus are drawn by Tasks 29/30, but those tasks need to wire them up. 4. minor: `channel_link` repeats the base-URL logic of `chat::actions::link` instead of sharing it. 5. minor: the forum, announcement and voice cases are covered only in the read state, not with unread or can't-invite combinations. The "× unread × can-invite" table is covered by the general channel and the lounge. Verdict: **approve**. No blocking findings, and local CI is green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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:46 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.