Daily use 37b: Composer barriers and blocked-message groups (#528) #592

Closed
charles wants to merge 0 commits from dailyuse-37b-ui-composer-barriers-blocked into dailyuse
Owner

Stacked on: dailyuse-22b-core-composer-barriers-blocked, dailyuse-31-ui-user-dm-menus

What this builds (spec §3.9, #400)

  • Composer barriers (screens/main/composer/barrier.rs, cloned from barriers/BarrierComponents.{tsx,module.css}): from the core's composer_barrier, a bar in the composer's box replaces it: blocked DM ("You have blocked {username}. Unblock them to send messages." + Unblock, which unblocks at once as unblockUser does), system DM, timeout (with the M:SS countdown, .timer styling), announcement without SEND_MESSAGES ("Follow"). New Phosphor icons Timer and MegaphoneSimple (fill). Without SEND_MESSAGES the composer stays, disabled, with "You can't send messages in this channel.". A locked thread keeps the existing thread notice in the composer's place.
  • ComposerOptions from the core's context: composer::options(&App, channel) / ComposerOptions::from_context(&ComposerContext) replace ComposerOptions::default() in composer::{update, wanted, wanted_animated}, messages::{model, view_with_media} and the main screen's plus menu.
  • Blocked-message groups (widgets/message_list/blocked_group.rs, BlockedMessageGroups.{tsx,module.css}): the message view now uses the core's message_list (MessageListItem); a group row "{count} blocked message(s)" on --background-secondary, a click sends RevealBlockedGroup (reveals, or hides when revealed, like onReveal(null)). MessagesModel gains blocked_groups.

Tests

  • tests/composer_barriers.rs: barrier_variants, composer_options_from_context.
  • tests/message_list.rs: blocked_group_row_reveals (the dailyuse history: mallory's 2 + 1 messages).
  • Goldens (rendered with lavapipe in the Ubuntu 22.04 image): composer_blocked_barrier, composer_no_permission, message_list_blocked_group; references in docs/screenshots/.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No FLUXER_DESKTOP_TESTS tests are involved.

Deviations / notes for review

  • widgets/message_list.rs changes more than a mod line: the widget's item type moved from TimelineItem to MessageListItem (a RowKey::BlockedGroup key, measured as a non-message row). This is needed for the group row to exist in the virtualised list.
  • When a group is revealed, its messages follow as ordinary rows. Only the toggle row has the --background-secondary shading; the original also shades the revealed messages (.container). The countdown updates when the view redraws.
  • threads/panel.rs and forum/composer.rs (outside this task's files) still set up their own options.
  • No Electron side-by-side was captured; dimensions are from BarrierComponents.module.css, BlockedMessageGroups.module.css and globals.css (--textarea-*).

Closes #528
Closes #400

🤖 Generated with Claude Code

Stacked on: dailyuse-22b-core-composer-barriers-blocked, dailyuse-31-ui-user-dm-menus ## What this builds (spec §3.9, #400) - **Composer barriers** (`screens/main/composer/barrier.rs`, cloned from `barriers/BarrierComponents.{tsx,module.css}`): from the core's `composer_barrier`, a bar in the composer's box replaces it: blocked DM ("You have blocked {username}. Unblock them to send messages." + Unblock, which unblocks at once as `unblockUser` does), system DM, timeout (with the `M:SS` countdown, `.timer` styling), announcement without SEND_MESSAGES ("Follow"). New Phosphor icons `Timer` and `MegaphoneSimple` (fill). Without SEND_MESSAGES the composer stays, disabled, with "You can't send messages in this channel.". A locked thread keeps the existing thread notice in the composer's place. - **`ComposerOptions` from the core's context**: `composer::options(&App, channel)` / `ComposerOptions::from_context(&ComposerContext)` replace `ComposerOptions::default()` in `composer::{update, wanted, wanted_animated}`, `messages::{model, view_with_media}` and the main screen's plus menu. - **Blocked-message groups** (`widgets/message_list/blocked_group.rs`, `BlockedMessageGroups.{tsx,module.css}`): the message view now uses the core's `message_list` (`MessageListItem`); a group row "{count} blocked message(s)" on `--background-secondary`, a click sends `RevealBlockedGroup` (reveals, or hides when revealed, like `onReveal(null)`). `MessagesModel` gains `blocked_groups`. ## Tests - `tests/composer_barriers.rs`: `barrier_variants`, `composer_options_from_context`. - `tests/message_list.rs`: `blocked_group_row_reveals` (the `dailyuse` history: mallory's 2 + 1 messages). - Goldens (rendered with lavapipe in the Ubuntu 22.04 image): `composer_blocked_barrier`, `composer_no_permission`, `message_list_blocked_group`; references in `docs/screenshots/`. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No `FLUXER_DESKTOP_TESTS` tests are involved. ## Deviations / notes for review - `widgets/message_list.rs` changes more than a `mod` line: the widget's item type moved from `TimelineItem` to `MessageListItem` (a `RowKey::BlockedGroup` key, measured as a non-message row). This is needed for the group row to exist in the virtualised list. - When a group is revealed, its messages follow as ordinary rows. Only the toggle row has the `--background-secondary` shading; the original also shades the revealed messages (`.container`). The countdown updates when the view redraws. - `threads/panel.rs` and `forum/composer.rs` (outside this task's files) still set up their own options. - No Electron side-by-side was captured; dimensions are from `BarrierComponents.module.css`, `BlockedMessageGroups.module.css` and `globals.css` (`--textarea-*`). Closes #528 Closes #400 🤖 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>
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>
Refs #505

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The switcher of spec §3.7: default sections from the recent visits, mentions and
unread channels; prefixes @ @@ # ! *; the original's scoring
(SearchTextMatching.ts:41-47, ForwardDestinationSearch.ts) and listing scores
(QuickSwitcherResultGenerators.ts:84-90,410-416); wraparound; links first.
Every change of the selected channel is recorded as a visit and persisted in
[navigation] (SelectedChannel.ts recentlyVisitedChannels).

Refs #505

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>
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>
Selecting the channel already open (listed in a search) left heading_to set,
because follow_selection returned on an unchanged selection before clearing
it; every later visit was then dropped, in memory and in [navigation].
heading_to is now cleared whenever the target is the selected channel.

Refs #505

Co-Authored-By: Claude Opus 5.5 <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>
# Conflicts:
#	crates/fluxer-core/src/app.rs
#	crates/fluxer-core/tests/dailyuse_ports.rs
The navigation keybinds of spec §3.7 as core actions (NavAction): guild
slots and cycle, channel/DM/unread/mention walks, back/forward history,
Escape and Shift+Escape, copy channel link, group DM, add guild, current
call, top inbox channel and oldest unread message. The last channel per
guild is loaded from and written to [navigation] selected_channels.

Refs #506

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-core/src/app.rs
# Conflicts:
#	crates/fluxer-core/src/app.rs
Refs #504

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generic confirm draws every daily-use confirm of the store; the
leave confirm (group with "Leave silently", community without); the
friends page with its tabs, search, rows, More menu, empty states and
Add friend form; Settings -> Blocked users; the DM welcome's friend
buttons; the DM list's Friends entry; the group X asks Leave group; the
group settings preview the picked icon (#383).

Refs #522

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six new goldens from the dailyuse scenario's READY
(fixtures/gateway/dailyuse_ready.json): friends_online, friends_pending,
friends_add, friends_empty, blocked_users and leave_group_confirm, with
their reference images and README rows. dm_list, friend_picker,
group_dm_welcome, group_settings and personal_notes_welcome are redrawn:
the DM list now starts with the Friends entry. Rendered on lavapipe in
the fluxer-native-shots:u2204 (Ubuntu 22.04) image like the Linux
runner; the whole suite (129 tests) passes there.

Refs #522

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

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
menus::user and menus::dm with the rows of GuildMemberContextMenu,
UserContextMenu, DMContextMenu and GroupDMContextMenu that this client
builds; Mention into the composer; Pin DM; Close DM and Open DM (blocked)
confirms; Invite to community; Report message in the message menu.

Refs #504

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-core/README.md
#	crates/fluxer-core/src/app.rs
#	crates/fluxer-core/tests/dailyuse_ports.rs
# Conflicts:
#	crates/fluxer-ui/src/screens/main/dms/mod.rs
Fixture shapes: relationships as RelationshipResponse
(fluxer_api S/user/UserResponseSchemas.ts:492), channels and threads as
ChannelResponse; no new fixture file.

Refs #509

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- selectors::composer::composer_barrier: system DM, blocked DM (Unblock),
  timeout (M:SS countdown), locked thread, announcement Follow, no
  SEND_MESSAGES (disabled, "You can't send messages in this channel."),
  in the order of DMChannelView.tsx / GuildChannelView.tsx.
- composer_context: what the UI's ComposerOptions are built from.
- typing::composer_typing, the original's decideComposerTyping (no typing
  while editing, disabled, for +:emoji:, /..., s/a/b; empty text stops),
  used by the composer and the Foundation DraftChanged path.
- Draft echo race (#400): after a send, the sent text told again with
  another cursor (or a DraftChanged with it) is ignored.
- selectors::message_list: consecutive messages from blocked users
  collapse into MessageListItem::BlockedGroup { first_id, count, revealed },
  revealed by UserAction::RevealBlockedGroup or a jump into the group.

Refs #509
Refs #400

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A right press on a member row, a message author's avatar or name, a
user mention or a DM row opens the user, member or DM menu that
fluxer_core::menus builds (spec 3.2 (e), (f)). Relationship rows ask
through the generic confirm; Shift sends them confirmed only where
social::confirm_rule lets it (block, unblock, remove, accept), never
for Close DM, Open DM or Leave group. "Change friend nickname" opens
its modal ("Change nickname", "Clear nickname", 32 characters). The
voice participant menu gains Mention and Message from the same builder
(#476).

Refs #520

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
member_menu, member_menu_moderator, dm_menu, group_dm_menu and
block_confirm; participant_menu and its entrance submenu redrawn with
Mention and Message first (#476).

Refs #520

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
barrier_variants, composer_options_from_context, blocked_group_row_reveals;
goldens composer_blocked_barrier, composer_no_permission,
message_list_blocked_group (images to follow).

Refs #528

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- composer::barrier: the bar that replaces the composer
  (BarrierComponents.{tsx,module.css}): blocked DM with Unblock, system
  DM, timeout with its M:SS countdown, announcement Follow; the Timer and
  MegaphoneSimple icons. Without SEND_MESSAGES the composer stays,
  disabled, with "You can't send messages in this channel.".
- composer::options / ComposerOptions::from_context: the channel
  composer's options from the core's composer_context instead of
  ComposerOptions::default() (composer update/wanted, messages model and
  view, the main screen's plus menu).
- widgets::message_list over MessageListItem; message_list::blocked_group
  draws "{count} blocked messages" (BlockedMessageGroups.module.css), a
  click sends RevealBlockedGroup (reveal, or hide when revealed).

Refs #528
Refs #400

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
composer_blocked_barrier, composer_no_permission and
message_list_blocked_group, rendered in the Ubuntu 22.04 image with
Mesa's lavapipe; their references in docs/screenshots/.

Refs #528

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

Independent review: Daily use 37b (reviewed cold, diff 765bb43e..8f48edb)

Verdict: changes requested (1 blocking, 3 minor). FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green on 8f48edb (EXIT=0, run locally in the review worktree).

Checked and OK

  • Tests: barrier_variants, composer_options_from_context (tests/composer_barriers.rs) and blocked_group_row_reveals (tests/message_list.rs) exist and assert the spec §3.9 strings exactly ("You have blocked {username}. Unblock them to send messages.", "System announcements from Fluxer staff. You can't reply here.", the timeout text, "You can't send messages in this channel.", "1 blocked message" / "2 blocked messages", M:SS "2:05"). The goldens composer_blocked_barrier, composer_no_permission and message_list_blocked_group are in screenshots.rs, fixtures/golden and docs/screenshots.
  • Interfaces: builds on 22b's composer_barrier/Barrier/BarrierAction/composer_context/message_list_with_offset/MessageListItem::BlockedGroup/RevealBlockedGroup as they are on the base. Every ComposerOptions::default() the plan names (composer update/wanted, messages model/view, main mod.rs) is replaced.
  • Invariants: no I/O, no new deps, no new fixtures (the tests build on the existing dailyuse READY and history), no secrets.
  • Parity spot-checks against the fork: (1) BarrierComponents.tsx: icons Prohibit/Info/Timer/MegaphoneSimple (fill), Unblock is Button small (primary), Follow is variant="secondary", the countdown is shown only when the remaining time is > 0, and formatTime rounds up. All match. (2) unblockUser (RelationshipActionUtils.tsx:309) calls removeRelationship with no confirm, which matches confirmed: true (Review Focus 5). (3) BlockedMessageGroups.tsx: the plural descriptor matches, and the .toggle 0.75rem/500 weight, 0.25rem 1rem padding, text-primary-muted with text-secondary on hover, and --background-secondary match the CSS. (4) .icon svg uses --textarea-button-icon-size (22px), so it overrides remFromPx(18). The native size is correct.
  • message_list.rs: the item type changed from TimelineItem to MessageListItem, more than the plan's "mod line". This is acceptable because messages.rs is the only MessageList::new caller, so no other task's interface breaks.

Findings

  1. [blocking] The timeout countdown never ticks and the barrier does not lift when the timeout ends. composer/barrier.rs reads remaining_ms once per view, and app.rs subscription() has no timer while a Barrier::TimedOut shows (window::frames runs only for animations). So "2:05" stays on screen until some unrelated message causes a redraw, and when the timeout expires the barrier stays and the user cannot type until something else redraws. In the original, CountdownTimer (BarrierComponents.tsx:103-118) ticks every 1000 ms, and spec §3.9 requires the M:SS countdown. The 22b core doc also says "the UI counts it down". Fix: while composer_barrier is TimedOut for the open channel, run a 1 s subscription (the RetryAt/retry_due thread-timer pattern in app.rs works on iced's executor). Add a test that the subscription is active only in that state.
  2. [minor] Revealed blocked messages are not shaded. In the original, .container shades the revealed messages as well as the toggle. The PR discloses this. Track it as a follow-up issue.
  3. [minor] The thread panel and forum composer still build their own ComposerOptions, so a timeout barrier does not replace the thread panel's composer. Those files are outside this task's list; open a follow-up issue linked from this PR.
  4. [minor, process] The implementer reports two leftover entries in the shared git stash ("du-37b: copy of the 34b stash…" and "37b-wip"). The orchestrator should drop them once the 34b owner confirms. I did not touch them.

Verdict: changes requested. Fix finding 1, then this is ready.

## Independent review: Daily use 37b (reviewed cold, diff 765bb43e..8f48edb) **Verdict: changes requested** (1 blocking, 3 minor). `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green on 8f48edb (EXIT=0, run locally in the review worktree). ### Checked and OK - Tests: `barrier_variants`, `composer_options_from_context` (tests/composer_barriers.rs) and `blocked_group_row_reveals` (tests/message_list.rs) exist and assert the spec §3.9 strings exactly ("You have blocked {username}. Unblock them to send messages.", "System announcements from Fluxer staff. You can't reply here.", the timeout text, "You can't send messages in this channel.", "1 blocked message" / "2 blocked messages", M:SS "2:05"). The goldens `composer_blocked_barrier`, `composer_no_permission` and `message_list_blocked_group` are in screenshots.rs, fixtures/golden and docs/screenshots. - Interfaces: builds on 22b's `composer_barrier`/`Barrier`/`BarrierAction`/`composer_context`/`message_list_with_offset`/`MessageListItem::BlockedGroup`/`RevealBlockedGroup` as they are on the base. Every `ComposerOptions::default()` the plan names (composer update/wanted, messages model/view, main mod.rs) is replaced. - Invariants: no I/O, no new deps, no new fixtures (the tests build on the existing dailyuse READY and history), no secrets. - Parity spot-checks against the fork: (1) `BarrierComponents.tsx`: icons Prohibit/Info/Timer/MegaphoneSimple (fill), Unblock is `Button small` (primary), Follow is `variant="secondary"`, the countdown is shown only when the remaining time is > 0, and `formatTime` rounds up. All match. (2) `unblockUser` (RelationshipActionUtils.tsx:309) calls `removeRelationship` with no confirm, which matches `confirmed: true` (Review Focus 5). (3) `BlockedMessageGroups.tsx`: the plural descriptor matches, and the `.toggle` 0.75rem/500 weight, 0.25rem 1rem padding, text-primary-muted with text-secondary on hover, and `--background-secondary` match the CSS. (4) `.icon svg` uses `--textarea-button-icon-size` (22px), so it overrides `remFromPx(18)`. The native size is correct. - message_list.rs: the item type changed from TimelineItem to MessageListItem, more than the plan's "mod line". This is acceptable because `messages.rs` is the only `MessageList::new` caller, so no other task's interface breaks. ### Findings 1. **[blocking] The timeout countdown never ticks and the barrier does not lift when the timeout ends.** `composer/barrier.rs` reads `remaining_ms` once per view, and `app.rs` `subscription()` has no timer while a `Barrier::TimedOut` shows (`window::frames` runs only for animations). So "2:05" stays on screen until some unrelated message causes a redraw, and when the timeout expires the barrier stays and the user cannot type until something else redraws. In the original, `CountdownTimer` (BarrierComponents.tsx:103-118) ticks every 1000 ms, and spec §3.9 requires the M:SS countdown. The 22b core doc also says "the UI counts it down". Fix: while `composer_barrier` is `TimedOut` for the open channel, run a 1 s subscription (the `RetryAt`/`retry_due` thread-timer pattern in app.rs works on iced's executor). Add a test that the subscription is active only in that state. 2. **[minor] Revealed blocked messages are not shaded.** In the original, `.container` shades the revealed messages as well as the toggle. The PR discloses this. Track it as a follow-up issue. 3. **[minor] The thread panel and forum composer still build their own `ComposerOptions`,** so a timeout barrier does not replace the thread panel's composer. Those files are outside this task's list; open a follow-up issue linked from this PR. 4. **[minor, process]** The implementer reports two leftover entries in the shared git stash ("du-37b: copy of the 34b stash…" and "37b-wip"). The orchestrator should drop them once the 34b owner confirms. I did not touch them. Verdict: changes requested. Fix finding 1, then this is ready.
Author
Owner

Second independent review: Daily use 37b (reviewed cold, own diff 765bb43e..8f48edb3)

Verdict: changes requested (1 blocking, 2 minor). FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green on 8f48edb3 (EXIT=0, "all steps passed"). The three goldens ran on Vulkan and passed. They were not skipped.

The head has not changed since comment 6726. This review was done separately, and it reaches the same blocking finding.

Checked and OK

  • Plan tests: barrier_variants and composer_options_from_context (tests/composer_barriers.rs), and blocked_group_row_reveals (tests/message_list.rs), are present and pass. They assert the spec §3.9 strings exactly. The goldens composer_blocked_barrier, composer_no_permission and message_list_blocked_group are in screenshots.rs, fixtures/golden and docs/screenshots.
  • Interfaces: the barrier is built from 22b's composer_barrier, Barrier and BarrierAction, and the options from composer_context. The group row uses MessageListItem::BlockedGroup and RevealBlockedGroup as they are on the base. All five ComposerOptions::default() sites named in the plan are replaced. TimelineItem becomes MessageListItem in widgets/message_list.rs, which is more than a mod line. messages.rs is the only caller, so no other task's interface breaks.
  • Invariants: no I/O, no new dependencies, no new fixtures, no secrets. Every change is in the task's files or the registration files.
  • Parity spot-checks against the fork:
    • BlockedMessageGroups.tsx: the plural descriptor matches. A click on a revealed group sends onReveal(null), otherwise the group's first id. The .toggle CSS matches: 0.75rem, weight 500, padding 0.25rem 1rem, text-primary-muted with text-secondary on hover, on --background-secondary.
    • BarrierComponents.tsx: the icons are Prohibit, Info, Timer and MegaphoneSimple. Unblock is Button small and Follow is secondary small. The countdown shows only when time remains, rounded up. The .icon svg size comes from --textarea-button-icon-size and overrides remFromPx(18).
    • unblockUser (RelationshipActionUtils.tsx:309) does not confirm, which matches confirmed: true (Review Focus 5).

Findings

  1. [blocking] The timeout barrier is never redrawn on a timer. barrier::model reads remaining_ms from the core's wall clock (notif_settings.now()) only when the view is built. While Barrier::TimedOut shows, App::subscription (crates/fluxer-ui/src/app.rs, about line 855) runs no timer. window::frames runs only for animations, videos and the update button.
    • Result: "M:SS" stays frozen until some unrelated message redraws the screen. When the timeout ends, the barrier stays in place of the composer until the next redraw.
    • The original's CountdownTimer (BarrierComponents.tsx:103-118) ticks every 1000 ms, and spec §3.9 requires the countdown.
    • Fix: add a 1 s subscription while the open channel's composer_barrier is TimedOut, for example on the RetryAt/retry_due pattern. Add a test that it runs only in that state.
  2. [minor] Revealed blocked messages are not shaded. The original's .container puts --background-secondary behind the revealed messages too. The PR discloses this. Track it as a follow-up.
  3. [minor] The thread panel and forum composer still build their own ComposerOptions. Those files are outside this task's list. Open a follow-up issue.

Verdict: changes requested. Fix finding 1, and the rest can be approved.

## Second independent review: Daily use 37b (reviewed cold, own diff 765bb43e..8f48edb3) **Verdict: changes requested** (1 blocking, 2 minor). `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green on 8f48edb3 (EXIT=0, "all steps passed"). The three goldens ran on Vulkan and passed. They were not skipped. The head has not changed since comment 6726. This review was done separately, and it reaches the same blocking finding. ### Checked and OK - **Plan tests:** `barrier_variants` and `composer_options_from_context` (tests/composer_barriers.rs), and `blocked_group_row_reveals` (tests/message_list.rs), are present and pass. They assert the spec §3.9 strings exactly. The goldens `composer_blocked_barrier`, `composer_no_permission` and `message_list_blocked_group` are in screenshots.rs, fixtures/golden and docs/screenshots. - **Interfaces:** the barrier is built from 22b's `composer_barrier`, `Barrier` and `BarrierAction`, and the options from `composer_context`. The group row uses `MessageListItem::BlockedGroup` and `RevealBlockedGroup` as they are on the base. All five `ComposerOptions::default()` sites named in the plan are replaced. `TimelineItem` becomes `MessageListItem` in `widgets/message_list.rs`, which is more than a `mod` line. `messages.rs` is the only caller, so no other task's interface breaks. - **Invariants:** no I/O, no new dependencies, no new fixtures, no secrets. Every change is in the task's files or the registration files. - **Parity spot-checks against the fork:** - `BlockedMessageGroups.tsx`: the plural descriptor matches. A click on a revealed group sends `onReveal(null)`, otherwise the group's first id. The `.toggle` CSS matches: 0.75rem, weight 500, padding 0.25rem 1rem, text-primary-muted with text-secondary on hover, on `--background-secondary`. - `BarrierComponents.tsx`: the icons are Prohibit, Info, Timer and MegaphoneSimple. Unblock is `Button small` and Follow is `secondary small`. The countdown shows only when time remains, rounded up. The `.icon svg` size comes from `--textarea-button-icon-size` and overrides `remFromPx(18)`. - `unblockUser` (RelationshipActionUtils.tsx:309) does not confirm, which matches `confirmed: true` (Review Focus 5). ### Findings 1. **[blocking] The timeout barrier is never redrawn on a timer.** `barrier::model` reads `remaining_ms` from the core's wall clock (`notif_settings.now()`) only when the view is built. While `Barrier::TimedOut` shows, `App::subscription` (crates/fluxer-ui/src/app.rs, about line 855) runs no timer. `window::frames` runs only for animations, videos and the update button. - Result: "M:SS" stays frozen until some unrelated message redraws the screen. When the timeout ends, the barrier stays in place of the composer until the next redraw. - The original's `CountdownTimer` (BarrierComponents.tsx:103-118) ticks every 1000 ms, and spec §3.9 requires the countdown. - Fix: add a 1 s subscription while the open channel's `composer_barrier` is `TimedOut`, for example on the `RetryAt`/`retry_due` pattern. Add a test that it runs only in that state. 2. **[minor] Revealed blocked messages are not shaded.** The original's `.container` puts `--background-secondary` behind the revealed messages too. The PR discloses this. Track it as a follow-up. 3. **[minor] The thread panel and forum composer still build their own `ComposerOptions`.** Those files are outside this task's list. Open a follow-up issue. Verdict: changes requested. Fix finding 1, and the rest can be approved.
# Conflicts:
#	crates/fluxer-ui/README.md
#	crates/fluxer-ui/assets/icons/megaphone-simple-fill.svg
#	crates/fluxer-ui/tests/screenshots.rs
#	docs/screenshots/README.md
The shell runs a timer while the open channel's composer shows the timeout
bar (barrier::countdown), waking when the shown M:SS second changes and once
the timeout is over, so the countdown redraws and the composer returns. No
timer runs while no such bar shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merged invite cards (still loading, unanswered) now show above the
blocked groups in the shared dailyuse history; the groups are unchanged.

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

Fix for the review's blocking finding (the timeout countdown never redrew), head 72ca9d26.

What changed

  • crates/fluxer-ui/src/screens/main/composer/barrier.rs:75 countdown(&App, channel) -> Option<Timestamp>: when the timeout ends, but only while the timeout bar shows over that channel's composer (None for every other bar).
  • barrier.rs:85 until_next_second(remaining_ms) -> Duration: how long until the shown whole seconds change. It rounds up, as the original's Math.ceil in CountdownTimer does (BarrierComponents.tsx:103-131, "M:SS", which the core's countdown already matched).
  • crates/fluxer-ui/src/app.rs:311-335,946: a Subscription::run_with(CountdownUntil(until), countdown_ticks) that exists only while the open channel shows the timeout bar, so there are no idle wake-ups otherwise. Its thread wakes just after each second boundary and once more just after the timeout ends. Each wake sends UiMessage::BarrierTick (message.rs:34), which redraws: the core re-reads the clock, so the M:SS counts down and the bar lifts at the end, which brings the composer back.
  • Test timeout_countdown_ticks (tests/composer_barriers.rs:235): no timer without a timeout or over the blocked DM's bar. With a timeout the timer is due at until, and the wake-ups fall on second boundaries. Moving the clock forward shows "2:04" and then "0:01". At until the bar and the timer are gone and the composer returns, enabled, without the "can't send" placeholder. Without the fix this test does not compile, because the functions it calls do not exist.

Merge of origin/dailyuse
Conflicts and how they were resolved:

  • megaphone-simple-fill.svg: the two sides differed only by a trailing newline; dailyuse's copy is kept.
  • theme/icons.rs: both sides added MegaphoneSimple, so the duplicate is merged into one variant whose comment covers both uses.
  • crates/fluxer-ui/README.md: the settings line is dailyuse's; the message_list line is this branch's.
  • docs/screenshots/README.md and tests/screenshots.rs: both sides kept.
  • app.rs and message.rs: ToastDue and BarrierTick are both kept.

The message_list_blocked_group golden was redrawn on lavapipe. The merged invite cards (still loading) now appear above the groups in the shared history. The groups themselves are unchanged, and the README row is updated.

Gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci ends with "xtask ci: all steps passed".

Not verified: the live ticking was not watched in the running app; only the model and the timer's schedule are tested. The plan's other requirements for this task are present: barrier_variants, composer_options_from_context, blocked_group_row_reveals and the three goldens.

Fix for the review's blocking finding (the timeout countdown never redrew), head `72ca9d26`. **What changed** - `crates/fluxer-ui/src/screens/main/composer/barrier.rs:75` `countdown(&App, channel) -> Option<Timestamp>`: when the timeout ends, but only while the timeout bar shows over that channel's composer (`None` for every other bar). - `barrier.rs:85` `until_next_second(remaining_ms) -> Duration`: how long until the shown whole seconds change. It rounds up, as the original's `Math.ceil` in `CountdownTimer` does (`BarrierComponents.tsx:103-131`, "M:SS", which the core's `countdown` already matched). - `crates/fluxer-ui/src/app.rs:311-335,946`: a `Subscription::run_with(CountdownUntil(until), countdown_ticks)` that exists only while the open channel shows the timeout bar, so there are no idle wake-ups otherwise. Its thread wakes just after each second boundary and once more just after the timeout ends. Each wake sends `UiMessage::BarrierTick` (`message.rs:34`), which redraws: the core re-reads the clock, so the M:SS counts down and the bar lifts at the end, which brings the composer back. - Test `timeout_countdown_ticks` (`tests/composer_barriers.rs:235`): no timer without a timeout or over the blocked DM's bar. With a timeout the timer is due at `until`, and the wake-ups fall on second boundaries. Moving the clock forward shows "2:04" and then "0:01". At `until` the bar and the timer are gone and the composer returns, enabled, without the "can't send" placeholder. Without the fix this test does not compile, because the functions it calls do not exist. **Merge of origin/dailyuse** Conflicts and how they were resolved: - `megaphone-simple-fill.svg`: the two sides differed only by a trailing newline; dailyuse's copy is kept. - `theme/icons.rs`: both sides added `MegaphoneSimple`, so the duplicate is merged into one variant whose comment covers both uses. - `crates/fluxer-ui/README.md`: the settings line is dailyuse's; the message_list line is this branch's. - `docs/screenshots/README.md` and `tests/screenshots.rs`: both sides kept. - `app.rs` and `message.rs`: `ToastDue` and `BarrierTick` are both kept. The `message_list_blocked_group` golden was redrawn on lavapipe. The merged invite cards (still loading) now appear above the groups in the shared history. The groups themselves are unchanged, and the README row is updated. **Gate:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` ends with "xtask ci: all steps passed". **Not verified:** the live ticking was not watched in the running app; only the model and the timer's schedule are tested. The plan's other requirements for this task are present: `barrier_variants`, `composer_options_from_context`, `blocked_group_row_reveals` and the three goldens.
Author
Owner

Merged into dailyuse and textchat at c7601011 (combined merge).

Merged into `dailyuse` and `textchat` at c7601011 (combined merge).
charles closed this pull request 2026-11-15 11:50:19 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.