Text chat 39: fluxer-core forums and media channels (#324) #449

Manually merged
charles merged 5 commits from textchat-39-core-forums into textchat 2026-11-13 12:28:20 +00:00
Owner

Stacked on: textchat-38-core-channel-routing

What this builds

fluxer-core::chat::forums (spec §18.2.1, §18.2.2, §18.4 "chat::forums"), filling Task 38's stub:

  • Post list: posts are the forum's threads in Threads; selectors::forum_view(&App, forum) -> ForumViewModel splits them as buildForumPostList does (one pinned active post first, active posts, then "Older posts"), sorts by post id ("Date posted") or last activity, filters by tags (match_some / match_all), and gives the guidelines, search box, sort & layout (session overrides per forum, kept across READY; media always a gallery, no "View as"), tag pills, list state (Loading/Ready/Empty/EmptySearch/Failed/Indexing), "Load older posts" and the composer model.
  • Archived pages and search through ApiRequest::SearchThreads (archived=true, offset paging of 25; text search name= + sort_by=relevance, debounced 300 ms). The first archived page is loaded when the forum is on screen and has fewer than 25 current posts, like the original. HTTP 202 is retried after retry_after s, doubling, at most 6 times (ForumPosts.scheduleRetry); 403 FEATURE_TEMPORARILY_DISABLED switches search off and falls back to ArchivedThreads { kind: Public, before: <archive_timestamp> }.
  • Cards: selectors::post_card(&App, post) -> PostCardModel (name, pinned, "New" badge from the forum's read-marker snapshot, ≤3 tags + "+N", author, preview Text/Deleted/Loading from the notification text, first image/video skipping spoiler/NSFW/expired, default reaction, message count, unread label, last activity, open). First messages come from search results, ForumPostCreated, MESSAGE_CREATE in the post (id == post id), and PostData for ForumAction::Visible posts (each once, ≤100 per call); updates, deletes and reactions on starters are applied.
  • Forum unreads: op 28 for visible posts the user is not in that have a read marker, ≤40 per request, 4 requests per 5 s (timer per send), 15 s reply timeout; FORUM_UNREADS counts kept only while the ack id matches and the user is not a member.
  • Composer: title ≤100 UTF-16 units, tags ≤5 (moderated tags only with MANAGE_THREADS), the original's error strings, media channels need an image/video file, cooldown after a post. The body is the forum's own composer draft (Composers::by_channel[forum], equivalent to the draft key forum-post:{forum}), so the editor, attachments and draft persistence are Text chat 11/12's. Submit → ApiRequest::CreateForumPost or, with files, UploadCommand::StartForumPost (multipart/presigned payloads from the composer's attachment_payload); job in chat.uploads.forum_posts; failure puts the draft back and sets the toast "Couldn't create the post: {detail}"; success closes the composer, drops the draft, and opens the post (follow-up OpenThread).
  • Post actions: default reaction toggled on the starter (message_id == post id) with an optimistic change undone on failure and echo-safe (applyReaction semantics), disabled when locked/archived; follow = JoinThread/LeaveThread; pin/unpin (EditThread { flags }, moderators, one pinned post per forum); edit tags (EditThread { applied_tags }, owner or moderator, ≤5, moderated tags only for moderators); copy post link {webapp}/channels/{guild}/{post} (buildChannelLink, verified in ForumPostActions.tsx) with the toast "Post link copied".

Tests

crates/fluxer-core/tests/chat_forums.rs: the 26 tests of the plan plus copy_post_link (27), against the Task 36 fixtures (channel_forum.json, channel_media.json, thread_search.json, thread_search_not_ready.json, post_data.json, forum_post_created.json, archived_threads.json, forum_unreads.json, thread_create_forum_post.json). FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No desktop tests apply.

Deviations / outside the Files list

  • Slowmode: the plan says the cooldown comes from default_thread_rate_limit_per_user; the server enforces the forum's own rate_limit_per_user on thread creation (ThreadCreationService.ts:407-421) and the original starts the cooldown with forum.rateLimitPerUser (ForumPostComposer.tsx, ThreadPanel.startCreateCooldown); default_thread_rate_limit_per_user is the new post's own slowmode. Built like the server/original; BYPASS_SLOWMODE skips it.
  • Media requirement: the original's button checks for any attachment; the spec/plan say image or video, which is what is built.
  • Pin: a second pin in the same forum is refused client-side (the server answers MaxPinnedThreadsInForumError, ThreadModifyService.ts:145-148).
  • Minimal changes outside the Files list, all to wire this in: chat/mod.rs (forums reducer gets the composer env, Threads, Composers, Uploads; re-exports), app.rs (forum follow-ups), chat/threads.rs (upserts threads from ForumPostCreated, UploadEvent::ForumPostDone, thread search results and archived pages, with membership from members, so cards open without a fetch — Task 40 may want the same for the thread browser), chat/composer.rs (attachment_payload pub(crate); no typing announced in forum/media composers, typingEnabled={false}), notifications.rs (body pub(crate) for card previews), read_state.rs (last_read pub(crate)), selectors/mod.rs (re-exports), README.
  • UserAction::PickMeme into a forum sets the "Saved media cannot start a post" error; the expressions reducer still tries its own send for it, so Task 46 should not route saved media to the forum composer.
  • CopyPostLink only acts on posts (threads of a forum or media channel); the Task 38 stub test sends it for a text-channel thread and stays green.
  • The media fixture has REQUIRE_TAG with no tags (no post could pass the server); the tests use only HIDE_MEDIA_DOWNLOAD_OPTIONS for it.

Closes #324

🤖 Generated with Claude Code

Stacked on: textchat-38-core-channel-routing ## What this builds `fluxer-core::chat::forums` (spec §18.2.1, §18.2.2, §18.4 "chat::forums"), filling Task 38's stub: - **Post list**: posts are the forum's threads in `Threads`; `selectors::forum_view(&App, forum) -> ForumViewModel` splits them as `buildForumPostList` does (one pinned active post first, active posts, then "Older posts"), sorts by post id ("Date posted") or last activity, filters by tags (`match_some` / `match_all`), and gives the guidelines, search box, sort & layout (session overrides per forum, kept across `READY`; media always a gallery, no "View as"), tag pills, list state (`Loading/Ready/Empty/EmptySearch/Failed/Indexing`), "Load older posts" and the composer model. - **Archived pages and search** through `ApiRequest::SearchThreads` (`archived=true`, offset paging of 25; text search `name=` + `sort_by=relevance`, debounced 300 ms). The first archived page is loaded when the forum is on screen and has fewer than 25 current posts, like the original. HTTP 202 is retried after `retry_after` s, doubling, at most 6 times (`ForumPosts.scheduleRetry`); 403 `FEATURE_TEMPORARILY_DISABLED` switches search off and falls back to `ArchivedThreads { kind: Public, before: <archive_timestamp> }`. - **Cards**: `selectors::post_card(&App, post) -> PostCardModel` (name, pinned, "New" badge from the forum's read-marker snapshot, ≤3 tags + "+N", author, preview Text/Deleted/Loading from the notification text, first image/video skipping spoiler/NSFW/expired, default reaction, message count, unread label, last activity, open). First messages come from search results, `ForumPostCreated`, `MESSAGE_CREATE` in the post (id == post id), and `PostData` for `ForumAction::Visible` posts (each once, ≤100 per call); updates, deletes and reactions on starters are applied. - **Forum unreads**: op 28 for visible posts the user is not in that have a read marker, ≤40 per request, 4 requests per 5 s (timer per send), 15 s reply timeout; `FORUM_UNREADS` counts kept only while the ack id matches and the user is not a member. - **Composer**: title ≤100 UTF-16 units, tags ≤5 (moderated tags only with MANAGE_THREADS), the original's error strings, media channels need an image/video file, cooldown after a post. The body is the forum's own composer draft (`Composers::by_channel[forum]`, equivalent to the draft key `forum-post:{forum}`), so the editor, attachments and draft persistence are Text chat 11/12's. Submit → `ApiRequest::CreateForumPost` or, with files, `UploadCommand::StartForumPost` (multipart/presigned payloads from the composer's `attachment_payload`); job in `chat.uploads.forum_posts`; failure puts the draft back and sets the toast "Couldn't create the post: {detail}"; success closes the composer, drops the draft, and opens the post (follow-up `OpenThread`). - **Post actions**: default reaction toggled on the starter (`message_id == post id`) with an optimistic change undone on failure and echo-safe (`applyReaction` semantics), disabled when locked/archived; follow = `JoinThread`/`LeaveThread`; pin/unpin (`EditThread { flags }`, moderators, one pinned post per forum); edit tags (`EditThread { applied_tags }`, owner or moderator, ≤5, moderated tags only for moderators); copy post link `{webapp}/channels/{guild}/{post}` (`buildChannelLink`, verified in `ForumPostActions.tsx`) with the toast "Post link copied". ## Tests `crates/fluxer-core/tests/chat_forums.rs`: the 26 tests of the plan plus `copy_post_link` (27), against the Task 36 fixtures (`channel_forum.json`, `channel_media.json`, `thread_search.json`, `thread_search_not_ready.json`, `post_data.json`, `forum_post_created.json`, `archived_threads.json`, `forum_unreads.json`, `thread_create_forum_post.json`). `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No desktop tests apply. ## Deviations / outside the Files list - **Slowmode**: the plan says the cooldown comes from `default_thread_rate_limit_per_user`; the server enforces the forum's own `rate_limit_per_user` on thread creation (`ThreadCreationService.ts:407-421`) and the original starts the cooldown with `forum.rateLimitPerUser` (`ForumPostComposer.tsx`, `ThreadPanel.startCreateCooldown`); `default_thread_rate_limit_per_user` is the new post's own slowmode. Built like the server/original; BYPASS_SLOWMODE skips it. - **Media requirement**: the original's button checks for any attachment; the spec/plan say image or video, which is what is built. - **Pin**: a second pin in the same forum is refused client-side (the server answers `MaxPinnedThreadsInForumError`, `ThreadModifyService.ts:145-148`). - Minimal changes outside the Files list, all to wire this in: `chat/mod.rs` (forums reducer gets the composer env, `Threads`, `Composers`, `Uploads`; re-exports), `app.rs` (forum follow-ups), `chat/threads.rs` (upserts threads from `ForumPostCreated`, `UploadEvent::ForumPostDone`, thread search results and archived pages, with membership from `members`, so cards open without a fetch — Task 40 may want the same for the thread browser), `chat/composer.rs` (`attachment_payload` pub(crate); no typing announced in forum/media composers, `typingEnabled={false}`), `notifications.rs` (`body` pub(crate) for card previews), `read_state.rs` (`last_read` pub(crate)), `selectors/mod.rs` (re-exports), README. - `UserAction::PickMeme` into a forum sets the "Saved media cannot start a post" error; the expressions reducer still tries its own send for it, so Task 46 should not route saved media to the forum composer. - `CopyPostLink` only acts on posts (threads of a forum or media channel); the Task 38 stub test sends it for a text-channel thread and stays green. - The media fixture has `REQUIRE_TAG` with no tags (no post could pass the server); the tests use only `HIDE_MEDIA_DOWNLOAD_OPTIONS` for it. Closes #324 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #323

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Post list (pinned, active, "Older posts"), sort/layout/tag filter, archived
pages and search through threads/search (202 retry, archived/public
fallback), post data, op 28 forum unreads, the new-post composer and the
post actions (default reaction, follow, pin, edit tags, copy link).

Refs #324

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

Independent review: Text chat 39 (core-forums)

Reviewed fad0d46d..origin/textchat-39-core-forums (commit 90b90ea) cold.

(1) Plan tests: all 26 tests named in Step 1 exist in crates/fluxer-core/tests/chat_forums.rs (plus copy_post_link). They assert the spec values: offset paging 25, 300 ms debounce with Relevance, 202 retry after retry_after and doubling up to 6 attempts then Failed, 403 FEATURE_TEMPORARILY_DISABLED falls back to ArchivedThreads { Public } with before paging, post data each post once in chunks of 100, op 28 batches of 40 with 4 per 5 s, composer strings, the JSON body without files, the files[n] ids for the upload job, and the draft coming back on failure.

(2) Interfaces: ForumViewModel, SearchBoxModel, TagPill, PostSection, ListState::{Loading, Ready, Empty, EmptySearch, Failed, Indexing}, ForumComposerModel, PostCardModel, PostPreview::{Text, Deleted, Loading}, CardMedia { attachment, video }, DefaultReactionModel { emoji, count, me, enabled }, UnreadLabel::{Count(u32), Some}, and selectors::{forum_view, post_card} all exist as the Interfaces block writes them. UploadCommand::StartForumPost is used as Text chat 10 stubbed it.

(3) Invariants: fluxer-core's Cargo.toml is unchanged and has no new deps. The core holds only FileRefs. There are no new fixtures (it reuses existing server-shaped ones). The new tracing lines log ids and errors only, with no URLs or paths. retry_delay handles NaN, negative and infinite retry_after_s. There is no unwrap or indexing on server data.

(4) Review Focus: item 1 (reactions converge) applies to the default reaction. The optimistic toggle followed by its echo (single or ADD_MANY) does not double-count (apply_reaction ignores the user's own change when it is already there), and a failure reverts it.

Deviations checked against the source:

  • Slowmode from rate_limit_per_user instead of default_thread_rate_limit_per_user: correct. The server's ThreadCreationService.enforceCreateSlowmode (407-421) and ForumPostComposer.tsx:106 both use the forum's rateLimitPerUser.
  • Copy link {webapp}/channels/{guild|@me}/{post}: matches buildChannelLink in MessageLinkUtils.ts:42-45.

Findings

  • minor (chat/forums.rs on_post_data): ApiResult::PostData carries no effect id, so a response is matched to its request by the ids it contains. If two chunks for the same forum are in flight (more than 100 visible posts) and one answer comes back with an empty threads map, the code takes the oldest pending chunk. That can be the wrong one, and its posts are then marked Some(None), shown as "Original message was deleted" until the next READY. The cards show the wrong thing, but no user data is lost. Possible fixes: carry the ids or the effect id in ApiResult::PostData, or don't mark posts deleted from an empty answer when the match is ambiguous.
  • minor (handoff, as the implementer noted): PickMeme into a forum composer sets the SavedMedia error, but the expressions reducer still sends the meme to the forum channel. Text chat 46 must not route saved media to the forum composer. This should be tracked as a follow-up.

Local CI

FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci was run twice in the review worktree:

  • First run: every test in the fluxer app lib passed (65), then the test binary crashed with SIGSEGV at teardown. This task does not touch that crate. 3 reruns of cargo test -p fluxer --lib passed.
  • Second full run: all steps passed. The teardown crash looks like an existing flake in the app crate.

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

## Independent review: Text chat 39 (core-forums) Reviewed `fad0d46d..origin/textchat-39-core-forums` (commit 90b90ea) cold. **(1) Plan tests:** all 26 tests named in Step 1 exist in `crates/fluxer-core/tests/chat_forums.rs` (plus `copy_post_link`). They assert the spec values: offset paging 25, 300 ms debounce with `Relevance`, 202 retry after `retry_after` and doubling up to 6 attempts then Failed, 403 `FEATURE_TEMPORARILY_DISABLED` falls back to `ArchivedThreads { Public }` with `before` paging, post data each post once in chunks of 100, op 28 batches of 40 with 4 per 5 s, composer strings, the JSON body without files, the `files[n]` ids for the upload job, and the draft coming back on failure. **(2) Interfaces:** `ForumViewModel`, `SearchBoxModel`, `TagPill`, `PostSection`, `ListState::{Loading, Ready, Empty, EmptySearch, Failed, Indexing}`, `ForumComposerModel`, `PostCardModel`, `PostPreview::{Text, Deleted, Loading}`, `CardMedia { attachment, video }`, `DefaultReactionModel { emoji, count, me, enabled }`, `UnreadLabel::{Count(u32), Some}`, and `selectors::{forum_view, post_card}` all exist as the Interfaces block writes them. `UploadCommand::StartForumPost` is used as Text chat 10 stubbed it. **(3) Invariants:** fluxer-core's Cargo.toml is unchanged and has no new deps. The core holds only `FileRef`s. There are no new fixtures (it reuses existing server-shaped ones). The new `tracing` lines log ids and errors only, with no URLs or paths. `retry_delay` handles NaN, negative and infinite `retry_after_s`. There is no `unwrap` or indexing on server data. **(4) Review Focus:** item 1 (reactions converge) applies to the default reaction. The optimistic toggle followed by its echo (single or ADD_MANY) does not double-count (`apply_reaction` ignores the user's own change when it is already there), and a failure reverts it. Deviations checked against the source: - Slowmode from `rate_limit_per_user` instead of `default_thread_rate_limit_per_user`: correct. The server's `ThreadCreationService.enforceCreateSlowmode` (407-421) and `ForumPostComposer.tsx:106` both use the forum's `rateLimitPerUser`. - Copy link `{webapp}/channels/{guild|@me}/{post}`: matches `buildChannelLink` in `MessageLinkUtils.ts:42-45`. ### Findings - **minor** (`chat/forums.rs` `on_post_data`): `ApiResult::PostData` carries no effect id, so a response is matched to its request by the ids it contains. If two chunks for the same forum are in flight (more than 100 visible posts) and one answer comes back with an empty `threads` map, the code takes the oldest pending chunk. That can be the wrong one, and its posts are then marked `Some(None)`, shown as "Original message was deleted" until the next READY. The cards show the wrong thing, but no user data is lost. Possible fixes: carry the ids or the effect id in `ApiResult::PostData`, or don't mark posts deleted from an empty answer when the match is ambiguous. - **minor** (handoff, as the implementer noted): `PickMeme` into a forum composer sets the `SavedMedia` error, but the expressions reducer still sends the meme to the forum channel. Text chat 46 must not route saved media to the forum composer. This should be tracked as a follow-up. ### Local CI `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` was run twice in the review worktree: - First run: every test in the `fluxer` app lib passed (65), then the test binary crashed with SIGSEGV at teardown. This task does not touch that crate. 3 reruns of `cargo test -p fluxer --lib` passed. - Second full run: all steps passed. The teardown crash looks like an existing flake in the app crate. **Verdict: approve.** No blocking findings and local CI is green.
Author
Owner

Review of Text chat 39 (independent reviewer). Scope: fad0d46..origin/textchat-39-core-forums (90b90ea).

Checked:

  1. Tests: all 26 planned tests are in crates/fluxer-core/tests/chat_forums.rs (plus copy_post_link), with the spec values (300 ms debounce, offset paging 25, post-data chunks 100, op 28 batches 40 / 4 per 5 s / 15 s timeout, the original's composer strings). They use the Task 36 fixtures; no new fixtures.
  2. Interfaces: forum_view/ForumViewModel, post_card/PostCardModel, ForumKind, SearchBoxModel, ListState, PostSection, TagPill, ForumComposerModel, PostPreview, CardMedia, DefaultReactionModel and UnreadLabel exist as the plan names them and are re-exported from selectors.
  3. Invariants: no new dependencies. Only FileRefs enter the core, with no URLs, paths or file bytes. Arithmetic and indexing are bounded, so server data cannot panic the client. A failed upload puts the draft back, and a failed JSON post keeps it.
  4. Deviations checked against the fork: the cooldown from the forum's rate_limit_per_user matches ForumPostComposer.tsx:106 (forum.rateLimitPerUser). The link format matches buildChannelLink. Refusing a second pinned post on the client matches the server rule.

Findings:

  • [minor] chat/uploads.rs: CancelUpload of a forum-post job restores the draft, but ForumComposer.pending stays Upload(nonce). The runtime reports nothing after Cancel (upload_rt.rs:14), so the composer stays "submitting" and CloseComposer is refused until a new OpenComposer. Today nothing in the UI can send this (the tray does not list forum jobs). Clear composer.pending when the job is cancelled.
  • [minor] The body draft is keyed by the forum id (Composers::by_channel[forum]), not by the spec's forum-post:{forum}. This is harmless, because forum channels have no message composer, but the README should say so.

CI: I started FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in the review worktree. It was still compiling when I had to report, so I have no local result. The implementer did not confirm it either.

Verdict: no blocking code findings. Not approved yet, because CI is not confirmed green. Approve once cargo xtask ci is green.

Review of Text chat 39 (independent reviewer). Scope: fad0d46..origin/textchat-39-core-forums (90b90ea). Checked: 1. Tests: all 26 planned tests are in crates/fluxer-core/tests/chat_forums.rs (plus copy_post_link), with the spec values (300 ms debounce, offset paging 25, post-data chunks 100, op 28 batches 40 / 4 per 5 s / 15 s timeout, the original's composer strings). They use the Task 36 fixtures; no new fixtures. 2. Interfaces: forum_view/ForumViewModel, post_card/PostCardModel, ForumKind, SearchBoxModel, ListState, PostSection, TagPill, ForumComposerModel, PostPreview, CardMedia, DefaultReactionModel and UnreadLabel exist as the plan names them and are re-exported from selectors. 3. Invariants: no new dependencies. Only FileRefs enter the core, with no URLs, paths or file bytes. Arithmetic and indexing are bounded, so server data cannot panic the client. A failed upload puts the draft back, and a failed JSON post keeps it. 4. Deviations checked against the fork: the cooldown from the forum's rate_limit_per_user matches ForumPostComposer.tsx:106 (forum.rateLimitPerUser). The link format matches buildChannelLink. Refusing a second pinned post on the client matches the server rule. Findings: - [minor] chat/uploads.rs: CancelUpload of a forum-post job restores the draft, but ForumComposer.pending stays Upload(nonce). The runtime reports nothing after Cancel (upload_rt.rs:14), so the composer stays "submitting" and CloseComposer is refused until a new OpenComposer. Today nothing in the UI can send this (the tray does not list forum jobs). Clear composer.pending when the job is cancelled. - [minor] The body draft is keyed by the forum id (Composers::by_channel[forum]), not by the spec's forum-post:{forum}. This is harmless, because forum channels have no message composer, but the README should say so. CI: I started FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in the review worktree. It was still compiling when I had to report, so I have no local result. The implementer did not confirm it either. Verdict: no blocking code findings. Not approved yet, because CI is not confirmed green. Approve once cargo xtask ci is green.
charles manually merged commit ba7cf9d2ec into textchat 2026-11-13 12:28:20 +00:00
Author
Owner

Independent review: Text chat 39 (core forums), head 90b90ea

Reviewed git diff fad0d46..origin/textchat-39-core-forums cold. Note: this PR shows as merged at 90b90ea; the implementer's fix commit ab4c919 (CancelUpload) is not on the branch, so the first finding below applies to what was merged.

Checks

  1. Plan tests: all 26 tests named in Step 1 exist in crates/fluxer-core/tests/chat_forums.rs (plus copy_post_link) and assert the spec's values: offset paging 25, 300 ms debounce with sort_by=relevance, 202 retry after retry_after (2 s, then 4 s, failing after six attempts), 403 fallback to ArchivedThreads { kind: Public }, PostData once per post in chunks of 100, op 28 frames of 40 with 4 per 5 s and a 15 s reply timeout, the composer's exact error strings, title cut to 100, tags ≤5, REQUIRE_TAG, moderated tags, the media-file rule, JSON vs UploadCommand::StartForumPost, one pinned post per forum, and the {webapp}/channels/{guild}/{post} link (matches ForumPostActions.tsx buildChannelLink).
  2. Interfaces: selectors::{forum_view, post_card}, ForumViewModel, ForumKind, SearchBoxModel, TagPill, PostSection, ListState::{Loading, Ready, Empty, EmptySearch, Failed, Indexing}, ForumComposerModel, PostCardModel, PostPreview::{Text, Deleted, Loading}, CardMedia, DefaultReactionModel, UnreadLabel::{Count, Some} exist with the plan's fields. Task 38's ports are consumed unchanged.
  3. Invariants: no Cargo.toml changes; fluxer-core gains no dependency; jobs hold only FileRefs; the new log lines carry ids and errors, never URLs or paths; no new fixtures; flag edits use from_bits_retain, so unknown bits survive; no panic paths on server data (saturating counts, try_from_secs_f64, non-finite retry_after handled).
  4. Review Focus: none of items 1–7 is owned by Task 39. Items 1 and 4 touch it (the default-reaction toggle and forum-post uploads) and look right.
  5. cargo xtask ci in the review worktree: green (all steps passed, exit 0).

Findings

  • minor, crates/fluxer-core/src/chat/forums.rs / uploads.rs: UserAction::CancelUpload of a forum-post job puts the draft back (uploads.rs) but Forums never clears composer.pending == Upload(nonce). The composer stays submitting for good: "Post" does nothing and CloseComposer refuses. The title and tags are lost if the user opens a composer in another forum. The fix (ab4c919, with the test cancelled_forum_post_upload_reopens_composer) is local only and was not pushed. It needs a follow-up PR.
  • minor, crates/fluxer-core/src/chat/forums.rs:325 with expressions.rs::pick_meme: forums.rs sets the SavedMedia error on PickMeme for the forum's composer, but Expressions::pick_meme still records frecency and sends SendRichMessage { favorite_meme_id } to the forum channel itself, which the server refuses. The same applies to an auto-sent GIF. Either the forum composer should never emit these actions (Task 46), or the core should skip the send for Forum/Media channels.
  • note: the body draft is keyed by the forum id instead of the spec's forum-post:{forum}. The module doc says so. It is the same behaviour, so this is not a finding.

Verdict: approved (no blocking findings, local ci green). The CancelUpload fix should be pushed as a follow-up.

## Independent review: Text chat 39 (core forums), head 90b90ea Reviewed `git diff fad0d46..origin/textchat-39-core-forums` cold. Note: this PR shows as merged at 90b90ea; the implementer's fix commit ab4c919 (CancelUpload) is **not** on the branch, so the first finding below applies to what was merged. **Checks** 1. Plan tests: all 26 tests named in Step 1 exist in `crates/fluxer-core/tests/chat_forums.rs` (plus `copy_post_link`) and assert the spec's values: offset paging 25, 300 ms debounce with `sort_by=relevance`, 202 retry after `retry_after` (2 s, then 4 s, failing after six attempts), 403 fallback to `ArchivedThreads { kind: Public }`, PostData once per post in chunks of 100, op 28 frames of 40 with 4 per 5 s and a 15 s reply timeout, the composer's exact error strings, title cut to 100, tags ≤5, `REQUIRE_TAG`, moderated tags, the media-file rule, JSON vs `UploadCommand::StartForumPost`, one pinned post per forum, and the `{webapp}/channels/{guild}/{post}` link (matches `ForumPostActions.tsx` `buildChannelLink`). 2. Interfaces: `selectors::{forum_view, post_card}`, `ForumViewModel`, `ForumKind`, `SearchBoxModel`, `TagPill`, `PostSection`, `ListState::{Loading, Ready, Empty, EmptySearch, Failed, Indexing}`, `ForumComposerModel`, `PostCardModel`, `PostPreview::{Text, Deleted, Loading}`, `CardMedia`, `DefaultReactionModel`, `UnreadLabel::{Count, Some}` exist with the plan's fields. Task 38's ports are consumed unchanged. 3. Invariants: no Cargo.toml changes; fluxer-core gains no dependency; jobs hold only `FileRef`s; the new log lines carry ids and errors, never URLs or paths; no new fixtures; flag edits use `from_bits_retain`, so unknown bits survive; no panic paths on server data (saturating counts, `try_from_secs_f64`, non-finite `retry_after` handled). 4. Review Focus: none of items 1–7 is owned by Task 39. Items 1 and 4 touch it (the default-reaction toggle and forum-post uploads) and look right. 5. `cargo xtask ci` in the review worktree: **green** (`all steps passed`, exit 0). **Findings** - **minor**, `crates/fluxer-core/src/chat/forums.rs` / `uploads.rs`: `UserAction::CancelUpload` of a forum-post job puts the draft back (uploads.rs) but `Forums` never clears `composer.pending == Upload(nonce)`. The composer stays `submitting` for good: "Post" does nothing and `CloseComposer` refuses. The title and tags are lost if the user opens a composer in another forum. The fix (ab4c919, with the test `cancelled_forum_post_upload_reopens_composer`) is local only and was not pushed. It needs a follow-up PR. - **minor**, `crates/fluxer-core/src/chat/forums.rs:325` with `expressions.rs::pick_meme`: `forums.rs` sets the `SavedMedia` error on `PickMeme` for the forum's composer, but `Expressions::pick_meme` still records frecency and sends `SendRichMessage { favorite_meme_id }` to the forum channel itself, which the server refuses. The same applies to an auto-sent GIF. Either the forum composer should never emit these actions (Task 46), or the core should skip the send for `Forum`/`Media` channels. - **note**: the body draft is keyed by the forum id instead of the spec's `forum-post:{forum}`. The module doc says so. It is the same behaviour, so this is not a finding. **Verdict: approved** (no blocking findings, local ci green). The CancelUpload fix should be pushed as a follow-up.
Sign in to join this conversation.
No description provided.