Text chat 44: Thread view: full view, starter message, notices, browser, menu, settings, members (#329) #463

Manually merged
charles merged 0 commits from textchat-44-ui-thread-view into textchat 2026-11-13 15:32:38 +00:00
Owner

Stacked on: origin/textchat-40-core-announcements-thread-admin

What this builds (spec §18.2.5)

  • Full view: a thread selected as the channel (sidebar row click, panel "Open in full view", links/jumps) shows its own messages and composer with the ThreadParentCrumb header (parent icon + name as a button back to the parent, bold CaretRight, thread icon + name; right click = thread menu) and the buttons bell (Bell/BellSlash, member only), "Threads" (browser) and "Thread members" (popout). The guild member-list toggle is hidden in a thread.
  • Welcome section (ThreadWelcomeSection: 3.5 rem disc, name 1.5 rem/600, "Started by {name}", none for posts) at the top once the history reaches the start, in the full view and in the side panel.
  • Starter message (type 21): drawn as the parent's message in full + 8 px divider; deleted: Trash 16 + "Original message was deleted.". system.rs gains the is_thread_starter hook.
  • Composer notices: locked barrier replacing the composer (LockSimple), closed notice (Archive), "Join this thread…" with "Join thread".
  • Side panel: "Thread members" opens the members popout, "Open in full view" emits OpenThreadFull, "..." opens the thread menu.
  • Thread browser popout (tabs Active / Closed / Closed private, search, Joined / Other active threads, rows with "{n} messages · {relative}", Load more, empty/failed/indexing states, Create thread). "See all threads" opens it.
  • Thread menu (sidebar row right click, panel "...", header title right click) from thread_menu with the original's labels, groups, danger colour and the notification submenu; the bell's dropdown (mute + levels); delete and private-leave confirms; Copy link / Copy thread ID through the clipboard.
  • Settings modal (name, Hide after inactivity 1h/24h/3d/1w, Slowmode with the original's stops for moderators, Allow anyone to invite for private threads); sends only changed fields as EditThread { Settings(..) }.
  • Members popout 16.5 rem × ≤30 rem, Online / Offline groups from THREAD_MEMBER_LIST_UPDATE, "Remove from thread" for removable rows.

Testing

  • crates/fluxer-ui/tests/thread_view.rs: the 11 tests of the plan (written first, failing commit 745a79f).
  • Screenshots (lavapipe, FLUXER_SCREENSHOT_TESTS=1): thread_full_view, thread_starter_message, thread_browser, thread_settings, thread_locked_notice. No Electron reference screenshot was available; dimensions come from ThreadParentCrumb.module.css, ThreadWelcomeSection.module.css, ThreadSystemMessages.module.css, ThreadComposerArea.module.css, BarrierComponents.module.css, ThreadBrowser.module.css, ThreadSidePanel.module.css (.membersPopout).
  • thread_panel.png regenerated: the panel now shows the welcome section above the messages (intended).
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally.

Deviations / for the reviewer

  • Core touched (minimally): new UserAction::ThreadMembers(Option<Snowflake>) sets threads.members_open, so op 14 thread_member_lists subscribes while the popout is open. No action existed for it (Task 38 left it "for Text chat 44").
  • app.rs: one arm writes threads::menu::Message::Copy(text) to the clipboard (same pattern as the lightbox's Copy link).
  • Sidebar thread row click now opens the full view (openThreadFullView, as SidebarThreadList.tsx); tests/threads.rs updated accordingly.
  • "Use channel default" in the notification menu is shown and checked when no level is set, but choosing it does nothing: ThreadNotifyLevel has no "default" value to send.
  • Members popout: Online/Offline groups only (hoisted-role groups are not built, the rows carry no roles); "Remove from thread" is a row button since member rows have no context menu.
  • Channel icons in the crumb use the nearest Phosphor glyph until Task 43's custom icons land (crumb::icon_of).
  • New icons lock-simple-fill, archive-fill from @phosphor-icons/core 2.1.1.
  • Popouts placed bottom-end under their button by the threads module itself (no new popout::Placement).
  • The starter's row forwards only profile/links/hover; reactions etc. of the parent's message are not actionable from the thread.

Closes #329

🤖 Generated with Claude Code

Stacked on: origin/textchat-40-core-announcements-thread-admin ## What this builds (spec §18.2.5) - **Full view**: a thread selected as the channel (sidebar row click, panel "Open in full view", links/jumps) shows its own messages and composer with the `ThreadParentCrumb` header (parent icon + name as a button back to the parent, bold `CaretRight`, thread icon + name; right click = thread menu) and the buttons bell (`Bell`/`BellSlash`, member only), "Threads" (browser) and "Thread members" (popout). The guild member-list toggle is hidden in a thread. - **Welcome section** (`ThreadWelcomeSection`: 3.5 rem disc, name 1.5 rem/600, "Started by {name}", none for posts) at the top once the history reaches the start, in the full view and in the side panel. - **Starter message** (type 21): drawn as the parent's message in full + 8 px divider; deleted: `Trash` 16 + "Original message was deleted.". `system.rs` gains the `is_thread_starter` hook. - **Composer notices**: locked barrier replacing the composer (`LockSimple`), closed notice (`Archive`), "Join this thread…" with "Join thread". - **Side panel**: "Thread members" opens the members popout, "Open in full view" emits `OpenThreadFull`, "..." opens the thread menu. - **Thread browser** popout (tabs Active / Closed / Closed private, search, Joined / Other active threads, rows with "{n} messages · {relative}", Load more, empty/failed/indexing states, Create thread). "See all threads" opens it. - **Thread menu** (sidebar row right click, panel "...", header title right click) from `thread_menu` with the original's labels, groups, danger colour and the notification submenu; the bell's dropdown (mute + levels); delete and private-leave confirms; Copy link / Copy thread ID through the clipboard. - **Settings modal** (name, Hide after inactivity 1h/24h/3d/1w, Slowmode with the original's stops for moderators, Allow anyone to invite for private threads); sends only changed fields as `EditThread { Settings(..) }`. - **Members popout** 16.5 rem × ≤30 rem, Online / Offline groups from `THREAD_MEMBER_LIST_UPDATE`, "Remove from thread" for removable rows. ## Testing - `crates/fluxer-ui/tests/thread_view.rs`: the 11 tests of the plan (written first, failing commit 745a79f). - Screenshots (lavapipe, `FLUXER_SCREENSHOT_TESTS=1`): `thread_full_view`, `thread_starter_message`, `thread_browser`, `thread_settings`, `thread_locked_notice`. No Electron reference screenshot was available; dimensions come from `ThreadParentCrumb.module.css`, `ThreadWelcomeSection.module.css`, `ThreadSystemMessages.module.css`, `ThreadComposerArea.module.css`, `BarrierComponents.module.css`, `ThreadBrowser.module.css`, `ThreadSidePanel.module.css` (`.membersPopout`). - `thread_panel.png` regenerated: the panel now shows the welcome section above the messages (intended). - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. ## Deviations / for the reviewer - **Core touched (minimally)**: new `UserAction::ThreadMembers(Option<Snowflake>)` sets `threads.members_open`, so op 14 `thread_member_lists` subscribes while the popout is open. No action existed for it (Task 38 left it "for Text chat 44"). - **app.rs**: one arm writes `threads::menu::Message::Copy(text)` to the clipboard (same pattern as the lightbox's Copy link). - Sidebar thread row click now opens the full view (`openThreadFullView`, as `SidebarThreadList.tsx`); `tests/threads.rs` updated accordingly. - "Use channel default" in the notification menu is shown and checked when no level is set, but choosing it does nothing: `ThreadNotifyLevel` has no "default" value to send. - Members popout: Online/Offline groups only (hoisted-role groups are not built, the rows carry no roles); "Remove from thread" is a row button since member rows have no context menu. - Channel icons in the crumb use the nearest Phosphor glyph until Task 43's custom icons land (`crumb::icon_of`). - New icons `lock-simple-fill`, `archive-fill` from `@phosphor-icons/core` 2.1.1. - Popouts placed bottom-end under their button by the threads module itself (no new `popout::Placement`). - The starter's row forwards only profile/links/hover; reactions etc. of the parent's message are not actionable from the thread. Closes #329 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Publish (crosspost) with its confirm, "Published", the publish nudge,
Follow and its targets, the crosspost source card; the thread browser,
menu, edit/close/reopen/lock/unlock/delete/join/leave/remove member,
notification level and mute, the full-view header, composer notices,
starter message and welcome; thread member lists from
THREAD_MEMBER_LIST_UPDATE; purging personal notes.

Refs #325

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-core/src/chat/mod.rs
#	crates/fluxer-core/src/chat/state.rs
#	crates/fluxer-core/src/chat/threads.rs
#	crates/fluxer-core/src/event.rs
Refs #329

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The selected thread renders as its full view: the crumb header with the
parent button, the bell, "Threads" and "Thread members"; the welcome
section, the starter message (type 21) and the composer notices, also in
the side panel. The thread browser, members popout, thread menu with its
confirms and the settings modal open over the screen. Adds
UserAction::ThreadMembers so the members popout subscribes its list.

Refs #329

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

Independent review: Text chat 44 (thread view)

Reviewed git diff e177770d..origin/textchat-44-ui-thread-view (d65b729) cold.

Plan tests: all 11 named tests exist in crates/fluxer-ui/tests/thread_view.rs and assert what the plan asks for. The strings match the fork: Active/Closed/Closed private tabs (ThreadMessageDescriptors.ts:149-170), "Other active threads", the locked and closed notices, "Original message was deleted.", the private-leave confirm, the placeholder Send a message in "{name}", auto-archive 60/1440/4320/10080, popout 264 × ≤480 px. All 5 named goldens exist, and thread_panel.png was regenerated because the panel now shows the welcome section.
Interfaces: the full view, crumb, welcome, starter (type 21 with deleted state), notices, browser, menu, settings and members are all in place. "See all threads" (system::Link::SeeAllThreads) opens the browser. The panel's "Open in full view" sends OpenThreadFull. The settings modal sends only the fields that changed, sends nothing when none did, and checks the name length (1–100 UTF-16 units). Invitable shows only for private threads.
Invariants: fluxer-ui has no new I/O path; text Copy goes through iced::clipboard::write. fluxer-core gains only UserAction::ThreadMembers(Option<Snowflake>), with no new dependency, and the existing op 14 subscription code already reacts to members_open. There is no new fixture. I found no panics on server data: no indexing or unwraps, and relative() saturates. There are no secrets or paths in the diff.
Review Focus: none of the items belongs to Task 44.
Local CI: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green (exit 0, screenshot step included).

Findings

  1. minor: the bell dropdown's "Use channel default" does nothing, because core has no default level. This needs a follow-up issue against fluxer-core thread notification levels.
  2. minor: the members popout groups only Online and Offline. ThreadMembersPanel.tsx also groups by hoisted roles (getHoistedRoles). This needs a follow-up.
  3. minor: chat.threads.members_open is cleared only by the popout's own Close or toggle. If the selection changes without a click on the backdrop (for example a keyboard channel switch or a jump), the popout and its op 14 member-list subscription stay open for the old thread. I suggest clearing it on SelectChannel or when the thread leaves the view.
  4. minor: the crumb icons are stand-in Phosphor glyphs until Task 43 lands. The starter row passes through only profile clicks, links and hover, so it has no reactions or menu on the parent's copy.
  5. minor (scope): the change to fluxer-core/src/event.rs and chat/threads.rs is outside the Files list. It is small, it is needed (nothing could set members_open before), and the README is updated. Not blocking.

Verdict: APPROVED. There are no blocking findings and local CI is green.

## Independent review: Text chat 44 (thread view) Reviewed `git diff e177770d..origin/textchat-44-ui-thread-view` (d65b729) cold. **Plan tests:** all 11 named tests exist in `crates/fluxer-ui/tests/thread_view.rs` and assert what the plan asks for. The strings match the fork: `Active`/`Closed`/`Closed private` tabs (`ThreadMessageDescriptors.ts:149-170`), "Other active threads", the locked and closed notices, "Original message was deleted.", the private-leave confirm, the placeholder `Send a message in "{name}"`, auto-archive 60/1440/4320/10080, popout 264 × ≤480 px. All 5 named goldens exist, and `thread_panel.png` was regenerated because the panel now shows the welcome section. **Interfaces:** the full view, crumb, welcome, starter (type 21 with deleted state), notices, browser, menu, settings and members are all in place. "See all threads" (`system::Link::SeeAllThreads`) opens the browser. The panel's "Open in full view" sends `OpenThreadFull`. The settings modal sends only the fields that changed, sends nothing when none did, and checks the name length (1–100 UTF-16 units). Invitable shows only for private threads. **Invariants:** fluxer-ui has no new I/O path; text Copy goes through `iced::clipboard::write`. fluxer-core gains only `UserAction::ThreadMembers(Option<Snowflake>)`, with no new dependency, and the existing op 14 subscription code already reacts to `members_open`. There is no new fixture. I found no panics on server data: no indexing or unwraps, and `relative()` saturates. There are no secrets or paths in the diff. **Review Focus:** none of the items belongs to Task 44. **Local CI:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is **green** (exit 0, screenshot step included). ### Findings 1. **minor**: the bell dropdown's "Use channel default" does nothing, because core has no default level. This needs a follow-up issue against fluxer-core thread notification levels. 2. **minor**: the members popout groups only Online and Offline. `ThreadMembersPanel.tsx` also groups by hoisted roles (`getHoistedRoles`). This needs a follow-up. 3. **minor**: `chat.threads.members_open` is cleared only by the popout's own Close or toggle. If the selection changes without a click on the backdrop (for example a keyboard channel switch or a jump), the popout and its op 14 member-list subscription stay open for the old thread. I suggest clearing it on `SelectChannel` or when the thread leaves the view. 4. **minor**: the crumb icons are stand-in Phosphor glyphs until Task 43 lands. The starter row passes through only profile clicks, links and hover, so it has no reactions or menu on the parent's copy. 5. **minor (scope)**: the change to `fluxer-core/src/event.rs` and `chat/threads.rs` is outside the Files list. It is small, it is needed (nothing could set `members_open` before), and the README is updated. Not blocking. **Verdict: APPROVED.** There are no blocking findings and local CI is green.
charles manually merged commit 8a6b78d3ba into textchat 2026-11-13 15:32:38 +00:00
Sign in to join this conversation.
No description provided.