Text chat 38: core-channel-routing (#323) #440
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-38-core-channel-routing"
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: origin/textchat-36-proto-channel-types
What
Task 38 (spec §18.1, §18.2 table, §18.4 first three bullets) in
fluxer-core:chat::channel_kinds::view_of->ChannelView::{Messages, Forum, Media, Link, None};Messagesnever fetches history for forum, media, link channels or categories.selectors::sidebar::{row_icon, row_click, personal_notes}, withChannelIcon(every icon of the §18.2 table, rules ofChannelUtils.tsx:109-189andChannelItem.tsx:415-428, 636-641: mature, then the@everyonelock, then plain; voice no-connect and the e2ee call ascomputeChannelE2EEStatus) andRowClick::{Select, JoinVoice, OpenLink, ToggleCategory}.dm_listleaves personal notes out (dm_row/dm_welcomestill accept them).ThreadSubscriptions.ts): op 14{threads: true, thread_member_lists}for the selected thread-enabled guild, once per session and selection, again after every READY;{threads: false, thread_member_lists: []}when the subscribed guild loses thethreadskey (not when the guild is left).threads.members_openfeedsthread_member_lists(set by Task 44).OpenThread/OpenThreadFullof an unknown thread,SelectChannelof an unknown channel while a thread-enabled guild is selected, andJumpToMessageinto an unknown channel sendFetchChannel;threads.pending_openholds(id, ThreadOpenMode);ApiResult::Channelupserts it through Task 18's upsert and opens it via follow-up events (OpenThread, orSelectGuild+SelectChannel); the fetch'sEffectFailedclears it.OpenExternal/ConfirmExternal/CancelExternal,chat.link_warning, the original's trust rules (built-in hosts, instance hosts, user patterns with*.domain,*= trust all).LocalChatSettings.{trusted_domains, hide_crosspost_nudge}added and persisted.UploadCommand::StartForumPost(ForumPostUploadSpec),UploadEvent::ForumPostDone) and stub state/reducers inchat/{forums,announcements,thread_admin}.rs.Tests
crates/fluxer-core/tests/chat_channel_kinds.rs: the 19 tests named in the plan.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally (Linux).Deviations / for the reviewer
apps/fluxer/src/{runtime.rs,upload_rt.rs}(Task 21 had merged, so the new requests fail asCLIENT_NOT_WIREDand forum-post jobs reportUploadEvent::Faileduntil Task 42),chat/settings.rs(the two newLocalChatSettingsfields),chat/uploads.rs(ignoresForumPostDoneuntil Task 39),app.rs(load the new local settings, collect thread follow-ups, pass&Chatto persist).ApiResultvariants not named in the plan:ChannelDeleted,ThreadMemberAdded,ThreadMemberRemoved,ThreadMemberSettingsPatched.ApiRequest::ArchivedThreads.beforeisOption<ArchivedBefore::{Archived(Timestamp), Thread(Snowflake)}>(the user's own private list pages by id).CreateForumPost.requestis boxed.*entry in the trusted domains, not a separate setting; its settings toggle is UI work.SelectChannelof an unknown id fetches only when the selected guild has threads (a broader rule fetched every unknown selection, which existing tests and DM flows hit).JumpToMessageinto an unknown thread opens it in full view.member_list.rshelper ignores thread-only frames;chat_ports.rsno longer treatsOpenThreadas a stub.Closes #323
🤖 Generated with Claude Code
REST fixtures, each shaped from the fork's server source (ba98441b4): - channel_forum/media/announcement/link/personal_notes.json: fluxer_api/src/api/channel/ChannelMappers.ts:96-172 (serializeThreadOnlyChannel, serializeGuildTextChannel, serializeGuildLinkChannel, serializeDMPersonalNotesChannel) plus services/thread/ThreadParentSettings.ts:180-222 (mapThreadParentFields: forum and media always carry flags, available_tags, default_tag_setting; media lacks default_forum_layout; text parents only the set default_*) - thread_private/thread_announcement.json, forum_post_created.json: services/thread/ThreadMappers.ts:58-92 (invitable only on private threads; posts carry applied_tags and member_ids_preview) and ThreadCreationService.ts:292 ({...mapThreadToResponse(view), message}), schema ForumRequestSchemas.ts:168-173 - thread_search.json, thread_search_not_ready.json: ForumRequestSchemas.ts:242-276, services/thread/ThreadForumService.ts:110-195 and packages/errors/src/domains/channel/SearchIndexNotReadyError.ts (202, {code, message, documents_indexed, retry_after}; FluxerError.toJSON) - post_data.json: ForumRequestSchemas.ts:181-206, ThreadForumService.ts:60-100 - archived_threads.json: S/channel/ThreadRequestSchemas.ts:109-118 - followed_channel.json: S/channel/ChannelFollowSchemas.ts:12-15 - crosspost_source.json: S/message/CrosspostSourceSchemas.ts - crosspost_message.json: services/message/CrosspostDeliveryService.ts:384-420 and the webhook author of fluxer_messages/src/shard_impl.rs:1456-1470 - purge_notes.json: api/channel/controllers/MessageController.ts:414-427 Gateway fixtures: - forum_unreads.json: fluxer_gateway/src/guild/guild_request_forum_unreads.erl:207-285 - thread_member_list_update.json: guild_thread_subscriptions.erl:535-578 - thread_create_forum_post.json: services/thread/ThreadDispatch.ts:26-39 as forwarded by guild_thread_dispatch.erl:467-471 (public_payload drops member_ids_preview) - lazy_request_threads.json: guild_unified_subscriptions.erl:140-165 Refs #321 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>Independent review: Text chat 38 (core-channel-routing), commit
5df8a83Scope:
git diff 2af31fa..origin/textchat-38-core-channel-routing.Checked
crates/fluxer-core/tests/chat_channel_kinds.rsand assert what the plan asks for. The icon table matchesgetIcon(ChannelUtils.tsx:109-189) exactly: mature, then locked, then plain; for voice the order is e2ee, then mature, then no-connect, then locked. Forum has no mature icon, and media, threads and notes have no variants. I also checked the op 14 frames againstguild_unified_subscriptions.erl:140-165. The server reads each field only when it is present, so the separate threads-only frames do not clobber the member-list subscription.UserAction,ApiRequestandApiResultvariants,ForumAction,ThreadBrowserAction,ThreadEdit,ThreadNotifyLevel,ThreadOpenMode,ArchivedKind,UploadCommand::StartForumPost(ForumPostUploadSpec),UploadEvent::ForumPostDone,view_ofandChannelView,row_icon,row_clickandRowClick, the 20ChannelIconvariants,personal_notes,threads.pending_open,chat.link_warning,LocalChatSettings.{trusted_domains, hide_crosspost_nudge}. The additions are compatible with the plan.ArchivedThreads.before: Option<ArchivedBefore>is needed because the "mine" list pages by snowflake. The boxedCreateForumPost.requestonly means Tasks 39 and 42 must box it.unwrap,expector indexing on server data. Logs carry ids only: the external-link code never logs the URL.--recordis untouched.FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin the review worktree: green (exit 0), withchat_channel_kinds19/19.Findings
trusted_domainsandhide_crosspost_nudgeonly live in the in-memoryLocalSettings.fluxer-platform/src/settings.rswrites no[chat]section at all. This gap is already in the base and tracked by #371. Until #371 is fixed, "Always trust" is lost on restart. When #371 is done, it should include these two fields.dm_listno longer lists personal notes. Until Task 43 draws the fixed "Personal notes" entry, the current UI no longer shows the notes channel. This matches the plan's note for Task 32.ThreadSubscriptions.ts. When you leave guild A, itssentstate is forgotten. If A then loses itsthreadskey while another guild is selected, nothreads:falseis sent, whereas the original'shandleActiveGuildsChangedalso only covers guilds still insent, so the effect is about the same. Separately, a member-list clear that was due while the connection was down is dropped, not deferred. Neither is user-visible today.JumpToMessageinto any unknown channel sendsFetchChannel, even outside a thread-enabled guild. The result is ignored when the channel is not a thread, so the only cost is one extra request.Verdict: approved. No blocking findings and local CI is green.
Independent review: Text chat 38 (core-channel-routing), after the merge of textchat
9cf9a68What I reviewed:
git diff 9cf9a68..af07278, the implementer's local merge oforigin/textchatinto this branch. At review time the remote branch was still ate957923, which does not contain9cf9a68, so the diff against the remote head would have reverted 79 textchat commits. This verdict coversaf07278only.Tests (plan step 1): all 19 named tests are in
crates/fluxer-core/tests/chat_channel_kinds.rsand assert what the plan says:row_icontable for every type, plain, mature and locked, plus no-CONNECT and the encrypted callrow_click, personal notes anddm_listthreads: true/falsesubscription, including re-sending after READY and the disabled guildFetchChannel, then the thread opens in the panel or the full view, or from a jump; a 404 clearspending_open*.and*links, and the persisted trusted domainsInterfaces: every variant and name in the Interfaces block exists: the
UserAction,ApiRequest,ApiResult,UploadCommand::StartForumPost(ForumPostUploadSpec)andUploadEvent::ForumPostDonevariants, plusview_of,ChannelIcon,RowClick,personal_notes,pending_open: Option<(Snowflake, ThreadOpenMode)>,link_warning,trusted_domainsandhide_crosspost_nudge. Two small differences, both compatible with what the plan says:CreateForumPost.requestisBox<StartForumPost>.ArchivedThreads.beforeisOption<ArchivedBefore>.Merge resolution (app.rs, chat/state.rs, effect.rs, event.rs, messages.rs, persist.rs): correct.
load_localand thenvideo.load_volume.clear_accountkeeps the chat settings, the links,hide_nudgeand the media volume.ForumPostDoneis folded into the no-op arms next toMedia.upload_rtfail the new requests and forum-post jobs cleanly until Task 42, with notodo!().Invariants: no new dependency in fluxer-core, and no iced, wgpu, winit, reqwest or tungstenite. No file bytes or upload URLs. Links that are not web links (
javascript:,file:) are neither opened nor warned about, and no panic paths on server data. No secrets.CI:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask cionaf07278: all steps passed (exit 0).Findings
e957923, which conflicts with textchat. Pushaf07278(a fast-forward of the branch) before merge. This approval applies toaf07278.crates/fluxer-core/tests/member_list.rs:lazy_requestsnow has two doc lines; the old first line was left above the new one.dm_listhides personal notes, and they only come back as a fixed entry with Task 43.Verdict: approve (no blocking findings; local CI green on
af07278).