Text chat 48: Announcement channels: Publish, nudge, Follow, crosspost copies (#333) #462
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-48-ui-announcements"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on: textchat-40-core-announcements-thread-admin
What this builds (spec §18.2.4)
New module
fluxer-ui::screens::main::announcements:publish:publish::actions(&App, channel, message, shift)puts the store'sannouncement_actionsitem intomessage_actionswhere the original has it. In the hover bar it goes after Forward and before Create thread (MessageActionBar.tsx:640-652), and it reads "Published" (disabled) once the message hasCROSSPOSTED. In the context menu it goes last in the interaction group (MessageContextMenu.tsx:584-591) and only while the message is unpublished.hover_bar::modelandmenu::modeluse it. The publish confirm now uses the original's strings (MessageCrosspostConfirmModal.tsx): "Publish this message?", "Every community that follows this channel gets a copy. …", "Publish". Shift skips it.nudge:CrosspostPublishNudgeshows under the user's newest unpublished message (crosspost_nudge). It has "Not sent to followers yet.", "Publish" (Shift skips the confirm), the dismiss X (XCirclefill) and "Don't show again". The message list draws it in line with the content.follow: the header shows "Follow" after the channel name on announcement channels whencan_follow(ChannelHeader.tsx:873-878,header::Tools::follow). It opens the "Follow this channel" modal: a banner (community and channel chip), the title and its line, the "Community" / "Channel" pickers ("Select a community" / "Select a channel", targets fromfollow_targets, with category names), the hint, the empty state, Cancel and "Follow". Submitting sendsUserAction::FollowChanneland closes the modal.crosspost_card: crossposted copies (IS_CROSSPOST) get the "Community" author badge (UserMessage.tsx:527-531,ChannelUserTag) and no reply line. When the source is gone (SOURCE_MESSAGE_DELETED) the text reads "[Original message deleted]". Clicking the avatar or name opensCrosspostCommunityCardbeside the author (right-start), like the original'sCrosspostCommunityPopout. The card has the name (or the author name without its "#channel"), description, "N online" / "N members", "Go to community" (selects the guild) or "Join community" (discoverable), a loading state, and the "no longer available" (403/404) and "Couldn't load …" states.CHANNEL_FOLLOW_ADD(12) already had its system-message string (Text chat 24), so nothing was added here.Testing
crates/fluxer-ui/tests/announcements.rs:publish_item_only_when_allowed,published_disabled_after_flag,publish_confirm_strings_and_shift,nudge_dismiss_and_dont_show_again,follow_button_needs_manage_webhooks,follow_modal_targets,crosspost_copy_badge_and_card_states. They run against the textchat READY andfixtures/rest/crosspost_source.json, driven throughApp::apply.announcement_publish,announcement_nudge,follow_modal,crosspost_copy. Rows were added todocs/screenshots/README.md.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cipasses locally.Deviations from the plan
Files outside the list:
screens/main/mod.rs:pub mod announcements,Message::Announcements, the modal and card overlays,header_tools.screens/main/messages.rs:State::announcements,Message::Announcements, the nudge under the row.fluxer-ui/README.md.docs/screenshots/README.md.theme/icons.rsis unchanged: Publish, the nudge and the chip use the existingMegaphone, which the sidebar already uses for announcement channels. The original's customAnnouncementChannelIconis not bundled.The community card is a popout opened from the copy's author, as in the original, not a card under the message. Icons are drawn as acronyms and the banner as the plain tint: there is no image request for non-member guilds.
"Join community" opens
{webapp}/channels/{guild}behind the external-link warning (spec §18.2.3: no invite or discovery-join flow in this client).Not built: the follow modal's age-restriction and content-warning filters (no mature/CW model in this client, §15), the success modal after following, and the publish/follow toasts. The core sets
announcements.toast, but the UI has no toast surface yet.Pickers are ordered by the core's
follow_targets(sidebar order), not by name as in the original.No Electron side-by-side screenshots: the original could not be run from here.
Closes #333
🤖 Generated with Claude Code
Independent review: Text chat 48 (ui-announcements)
Reviewed
git diff eacea24c..origin/textchat-48-ui-announcementsatad78308, read cold.Plan tests (1): all 7 exist in
crates/fluxer-ui/tests/announcements.rsand assert what the plan asks. The strings are the spec's and the original's, checked against the fork: "Publish this message?", the confirm body, "Not sent to followers yet.", "Don't show again", "Follow this channel", "Select a community" / "Select a channel", "[Original message deleted]", "This community is no longer available", "Couldn't load this community. Try again in a moment.". Shift skips the confirm in the bar, the menu and the nudge. All 4 screenshots exist with goldens and README rows. The goldens look right: Publish after Forward, the nudge pill, Follow in the header, the COMMUNITY badge and the card.Interfaces (2): the Produces items of §18.2.4 are present.
publish::actionswrapsmessage_actions+announcement_actions, andhover_bar::model/menu::modelkeep their signatures. TheCHANNEL_FOLLOW_ADDstring was already inmessage_content/system.rs. The diff does not touch fluxer-core, so no core interface changes.Invariants (3): fluxer-ui has no new I/O path. "Join community" is a
UserAction::OpenExternalof{webapp}/channels/{guild}, which goes through the store and the link warning. No new fixtures, secrets, URLs or paths. Server data cannot panic:community_nameusesrsplit_once,groupedworks on ASCII digits, and every lookup returnsOption.Review Focus (4): none of the items is this task's.
CI (5):
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree: all steps passed. That covers the 7 tests and the 4 goldens on lavapipe.Findings
nudge::HEIGHTis defined but never added to the list's height estimate (messages.rs~L888, which addswelcome::HEIGHTthe same way). The row with the nudge is about 36 px taller than estimated, so the scroll may jump a little until the row is measured.message_row::author_line, the badge's left padding isTAG_GAP - NAME_GAP= 5.6 - 6.0 = -0.4 px. A negativePaddingworks in iced today, butTAG_GAP.max(NAME_GAP) - NAME_GAP(or dropping the wrapper) would be clearer.follow::FOLLOW_CHANNEL("Follow channel", the aria label) is declared and tested but never used byheader_button. It could be its tooltip.Verdict: APPROVE. No blocking findings, and local CI is green.