Text chat 45: Forum view and forum post panel (#330) #465
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-45-ui-forum-view"
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?
What this builds (spec §18.2.1, §18.2.2)
New module
fluxer-ui::screens::main::forum(guidelines,toolbar,sort_popout,tags,post_list,post_card,post_actions,tags_modal). A selected forum or media channel shows it in place of the message view:minmax(14rem, 1fr)columns computed from width, gap 0.75 rem), unread title colour, tag overflow; skeletons, empty, search-empty, error and indexing states, "Older posts" and "Load older posts".ForumPostTagsModal.OpenThread), Shift+click the full view. In the panel the post usesPanelHeader::ForumPostand showsForumPostActionsunder the starter (React to post, Follow/Following, Copy post link with toast).ForumAction::Visiblefor previews and unread counts.New Phosphor icons in
assets/icons;widgets/popout.rsgains what the sort popout needs.Tests
crates/fluxer-ui/tests/forum.rs:gallery_columns_from_width,card_elements_and_tag_overflow,card_unread_title_colour,sort_view_popout_emits_and_hides_view_for_media,tag_pills_toggle_and_clear,shift_enter_opens_composer_with_title,empty_error_indexing_strings,load_older_button,click_opens_panel_shift_click_full_view,post_actions_under_starter,visible_ids_reported.Screenshots (goldens in
fixtures/golden/):forum_list,forum_gallery,forum_sort_popout,forum_empty,forum_post_panel.Local
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: green (also after mergingorigin/textchat; one conflict inapp.rsresolved by keeping both the settings sync and the forum sync).Closes #330
🤖 Generated with Claude Code
CancelUpload on a forum-post upload job put the draft back but left ForumComposer.pending as Upload(nonce); the runtime reports nothing after a cancel, so the composer stayed submitting. Forums now clears it. Also document why the post body draft is keyed by the forum id rather than the spec's forum-post:{forum}. Refs #324 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>Review round 1, what changed per finding:
bbe6dcbfeat(ui): forum view and post panel(Refs #330), mergedorigin/textchat(78e5dc5; one conflict incrates/fluxer-ui/src/app.rs, resolved by keeping both the settings sync and the forum sync), pushedtextchat-45-ui-forum-viewand opened this PR. LocalFLUXER_SCREENSHOT_TESTS=1 cargo xtask ciis green both before and after the merge.No minor findings were listed.
Independent review, Task 45 (ui-forum-view), on
78e5dc5(task commitbbe6dcbplus the merge of origin/textchat).Tests (plan steps): all 11 named tests are in
crates/fluxer-ui/tests/forum.rsand assert what the plan asks, using the spec's values: 14 rem/0.75 rem gallery columns and 0.5 rem list gap, 3 tag pills then "+N", the unread title colour, "Sort by"/"View as" (no "View as" for media), tag toggle and Clear, Shift+Enter to the composer with the trimmed query, the empty/search-empty/error/indexing strings and "Older posts", "Load older posts", click →OpenThreadand Shift+click →OpenThreadFull, the post actions under the starter with the "Post link copied" toast, andForumAction::Visible. All 5 screenshot tests (forum_list,forum_gallery,forum_sort_popout,forum_empty,forum_post_panel) have goldens.Interfaces: the side panel sets
PanelHeader::ForumPostfor forum and media posts.post_actions(ForumPostActions) is shown after the starter (id == post id) in both the panel and the full view. The tags modal (ForumPostTagsModal) sendsForumAction::EditPostTags. The Pin/Unpin post menu needs MANAGE_THREADS.ForumAction::Visibleis sent fromState::syncand on scroll. The header has no pins and no members toggle, and the content column is capped at 60 rem. Everything it uses from Task 39 (forum_view,post_card) builds against the merged code.Invariants: fluxer-ui gets no new I/O. Images go only through
wanted()into the existing ImageLoader path, and copying the link is a coreForumAction. No new dependencies. No new fixtures: the inline test JSON follows the server's search shape (threads, members, has_more, total_results) and post-data shape (threads: {id: {owner, first_message}}). No secrets, URLs or paths. No panics on server data: thestrings[0]/[1]index inpost_list::emptyis only reached for Empty/EmptySearch, which always have two strings. The merge resolution inapp.rskeeps both the settings sync and the forum sync.Findings:
forum::State::viewportis not reset when switching to another forum, so the firstVisiblereport for the new forum is estimated from the old forum's scroll offset. It corrects itself on the next scroll event. Data is not affected.tags_modal::update,Toggledoes not refuse a moderated tag for non-moderators (only the view disables the pill). It cannot be reached from the UI today.header.rsunder Modify, but the header changes are inmain/mod.rs(header_tools) andmodel.rs(has_members). The behaviour matches the spec.CI:
cargo xtask cirun locally in the review worktree: all steps passed (exit 0). Screenshot tests were skipped because FLUXER_SCREENSHOT_TESTS was not set. The implementer reports them green.Verdict: approved, no blocking findings.