Text chat 31: Threads UI (#281) #393

Manually merged
charles merged 0 commits from textchat-31-ui-threads into textchat 2026-11-13 10:58:13 +00:00
Owner

What this adds

  • Stream settings menu (screenshare/settings_menu.rs), both the full menu and the compact live one. These rows come right after the sound checkbox, for a screen share or a share that has not started yet, while sound is on and Streams::audio_targets is not Unavailable:
    • "Audio sources: {summary}": the "Capture" radios ("Entire system audio", "None"), "Include apps", "Exclude from system" (only in system mode) and "Refresh audio sources", which keeps the menu open. A group with no items is not shown, as in the original. The items come from audio_sources::menu_items, the label from audio_summary, and the picks from toggle_include / toggle_exclude / pick_system / pick_none.
    • "Audio settings": the seven LinuxAudioCapture checkboxes in the original's order and wording. Each one sends VoiceSettingChange::LinuxAudioCapture(..), and the store turns off the other switch of the Ignore-devices / Device-selection pair.
  • Opening the menu sends UserAction::RefreshAudioSources, and so does "Refresh audio sources".
  • screenshare::Message gains PickSystemAudio, PickNoAudio, ToggleIncludeSource, ToggleExcludeSource, RefreshAudioSources and LinuxAudioCapture. The labels of Entry::Toggle and Entry::Submenu change to String, because the source names and the summary are built at run time.
  • Device dropdowns (voice_video/devices.rs): new DefaultPlatform::{Linux, Windows, MacOs} with current(), and default_label(platform, endpoint), which gives "Linux default (X)", or plain "Linux default" when there is no default device. The default device is listed first, then the others by name, ignoring case. DEFAULT_LABEL is removed.
  • Parity: the #233 row of docs/parity/screenshare.md is now done, and an "Audio settings" row is added.

Tests

  • New crates/fluxer-ui/tests/stream_audio_sources.rs: audio_sources_submenu_only_for_screen_share_with_sound, audio_sources_hidden_without_pipewire, summary_in_the_submenu_label, include_and_exclude_groups_follow_the_mode, refresh_keeps_the_menu_open_and_asks_the_store, audio_settings_checkboxes_in_order_with_defaults, ignore_devices_and_device_select_toggle_each_other_in_the_menu.
  • settings_voice.rs: default_option_names_the_platform_and_endpoint, devices_sorted_default_first_then_by_name, and the existing dropdown test updated.
  • Screenshots: stream_menu_audio_sources, stream_menu_audio_settings, voice_devices_linux_default. The goldens were made on lavapipe in the Ubuntu 22.04 image. control_bar_sharing, stream_settings_menu and settings_voice were regenerated, because they now show the submenus or the new default label. All 35 screenshot tests pass on lavapipe, and also on this machine's GPU.
  • Existing expectations updated in screenshare_controls.rs (menu labels) and call_view.rs (the caret now also sends RefreshAudioSources).
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally.

Deviations and notes

  • The submenus also show while the answer is NotAsked or Loading, as the original does while it loads. On Windows and macOS the backend answers None and they disappear, so they may show for one frame on the first open.
  • "Ignore input media" is hidden while "Device selection" is on, as in the original (StreamSettingsMenuContent.tsx). With the defaults, all seven show.
  • Not done (audio spec §6): the window-scope radio "Shared window audio" and the device-share microphone item.
  • Known look issue, not fixed here: the context menu card stays 208 px wide with fixed 32 px rows, so "Audio sources: Entire system" wraps onto the next row (see the goldens). Opened as bug #367, because the fix changes every context menu.
  • Task 50 is now on textchat; the branch has origin/textchat (67da1c7) merged in (conflicts in docs/parity/screenshare.md, kept both the stereo row and the audio-sources rows, and crates/fluxer-ui/README.md, kept the composer text plus the device-dropdown sentence). FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green again after the merge.
  • No side-by-side screenshot of the Electron app is attached: this machine has no running Electron build with the PipeWire bridge. The native goldens are in fixtures/golden/.

Closes #343

🤖 Generated with Claude Code

## What this adds - **Stream settings menu** (`screenshare/settings_menu.rs`), both the full menu and the compact live one. These rows come right after the sound checkbox, for a screen share or a share that has not started yet, while sound is on and `Streams::audio_targets` is not `Unavailable`: - "Audio sources: {summary}": the "Capture" radios ("Entire system audio", "None"), "Include apps", "Exclude from system" (only in system mode) and "Refresh audio sources", which keeps the menu open. A group with no items is not shown, as in the original. The items come from `audio_sources::menu_items`, the label from `audio_summary`, and the picks from `toggle_include` / `toggle_exclude` / `pick_system` / `pick_none`. - "Audio settings": the seven `LinuxAudioCapture` checkboxes in the original's order and wording. Each one sends `VoiceSettingChange::LinuxAudioCapture(..)`, and the store turns off the other switch of the Ignore-devices / Device-selection pair. - Opening the menu sends `UserAction::RefreshAudioSources`, and so does "Refresh audio sources". - `screenshare::Message` gains `PickSystemAudio`, `PickNoAudio`, `ToggleIncludeSource`, `ToggleExcludeSource`, `RefreshAudioSources` and `LinuxAudioCapture`. The labels of `Entry::Toggle` and `Entry::Submenu` change to `String`, because the source names and the summary are built at run time. - **Device dropdowns** (`voice_video/devices.rs`): new `DefaultPlatform::{Linux, Windows, MacOs}` with `current()`, and `default_label(platform, endpoint)`, which gives "Linux default (X)", or plain "Linux default" when there is no default device. The default device is listed first, then the others by name, ignoring case. `DEFAULT_LABEL` is removed. - Parity: the #233 row of `docs/parity/screenshare.md` is now done, and an "Audio settings" row is added. ## Tests - New `crates/fluxer-ui/tests/stream_audio_sources.rs`: `audio_sources_submenu_only_for_screen_share_with_sound`, `audio_sources_hidden_without_pipewire`, `summary_in_the_submenu_label`, `include_and_exclude_groups_follow_the_mode`, `refresh_keeps_the_menu_open_and_asks_the_store`, `audio_settings_checkboxes_in_order_with_defaults`, `ignore_devices_and_device_select_toggle_each_other_in_the_menu`. - `settings_voice.rs`: `default_option_names_the_platform_and_endpoint`, `devices_sorted_default_first_then_by_name`, and the existing dropdown test updated. - Screenshots: `stream_menu_audio_sources`, `stream_menu_audio_settings`, `voice_devices_linux_default`. The goldens were made on lavapipe in the Ubuntu 22.04 image. `control_bar_sharing`, `stream_settings_menu` and `settings_voice` were regenerated, because they now show the submenus or the new default label. All 35 screenshot tests pass on lavapipe, and also on this machine's GPU. - Existing expectations updated in `screenshare_controls.rs` (menu labels) and `call_view.rs` (the caret now also sends `RefreshAudioSources`). - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally. ## Deviations and notes - The submenus also show while the answer is `NotAsked` or `Loading`, as the original does while it loads. On Windows and macOS the backend answers `None` and they disappear, so they may show for one frame on the first open. - "Ignore input media" is hidden while "Device selection" is on, as in the original (`StreamSettingsMenuContent.tsx`). With the defaults, all seven show. - Not done (audio spec §6): the window-scope radio "Shared window audio" and the device-share microphone item. - Known look issue, not fixed here: the context menu card stays 208 px wide with fixed 32 px rows, so "Audio sources: Entire system" wraps onto the next row (see the goldens). Opened as bug #367, because the fix changes every context menu. - Task 50 is now on `textchat`; the branch has origin/textchat (67da1c7) merged in (conflicts in `docs/parity/screenshare.md`, kept both the stereo row and the audio-sources rows, and `crates/fluxer-ui/README.md`, kept the composer text plus the device-dropdown sentence). `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green again after the merge. - No side-by-side screenshot of the Electron app is attached: this machine has no running Electron build with the PipeWire bridge. The native goldens are in `fixtures/golden/`. Closes #343 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reply line (spine, 16 px avatar, "@" when pinging, deleted/failed/media
strings, click jumps), forwarded snapshot with "Forwarded from", system
messages with icons and the original's strings (joins by timestamp % 17),
mention and jump highlights, "(edited)" tooltip after 750 ms, reactions row
with a clickable 500 ms tooltip, reactors modal, and the grouping rule for
the suppress-notifications change.

Refs #274

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-core/src/selectors/messages.rs
Refs #281

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The chip under a message that started a thread (name, count, newest message;
<=30 rem on --background-secondary-alt), the side panel (360-900 px, 450 at
first, dragged by its left edge; header with Chats, name, members, full view,
"..." and close; the thread's own message list and composer), the create
pane (name field with the suggested name, Create thread), and the thread rows
under their channel in the sidebar with the spine. The member list makes way
for the panel.

Refs #281

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

Independent review: Text chat 31 (Threads UI)

Reviewed git diff 656cd729..origin/textchat-31-ui-threads (22dcae2) cold.

Checks

  1. Tests: chip_click_opens_panel, panel_width_clamped (360/900/450, clamps 359→360, 901→900), create_pane_emits_create, sidebar_thread_rows_indented (1.75 rem indent, spine at 1.5625 rem) all exist in crates/fluxer-ui/tests/threads.rs and assert what the plan asks. The thread_chip and thread_panel screenshot tests and goldens are present. I looked at the goldens: chip ≤30 rem on --background-secondary-alt, panel at 450 px with the member list hidden.
  2. Interfaces: the chip, the side panel (360–900, default 450, its own message view and composer panel::EDITOR_ID), the create pane (name field; the server's default auto-archive), the sidebar rows under the parent, and PanelHeader::{Thread, ForumPost} (needed by Task 45) are all present. The Open-in-full-view, members and "..." buttons are stubs, as the Phase 5 note allows (Tasks 38 and 44).
  3. Invariants: fluxer-ui gets no new I/O path, and no dependency changes. No new fixtures (thread messages for the screenshots are inline, shaped like the existing message fixtures). No secrets or paths. Nothing indexes into server data (string ops only, max(0.0) on spine geometry).
  4. Review Focus: no item belongs to Task 31.
  5. Local cargo xtask ci: green (all steps passed). The screenshot step was skipped because this machine has no lavapipe ICD; the goldens are verified only by the Linux runner.

Findings

  • [minor] screens/main/media.rs::wanted collects inline emoji only from local.messages.parsed_nodes(), so custom emoji in the side panel's messages are never requested. Author and reply avatars and reaction emoji are covered through the new shown_channels. This needs a follow-up issue (the implementer mentions it, but none is linked).
  • [minor] The plan's Interfaces line says the "See all threads" link of the thread system message opens "the panel's list". It is a no-op (messages.rs:279). The Phase 5 notes and Task 44's Interfaces reassign it to OpenThreadBrowser (Task 38), so deferring it is acceptable. Please note it in the PR body.
  • [minor] A sidebar thread row opens the thread in the panel (SelectChannel(parent) + OpenThread). Spec §18.2.5 says the sidebar opens the full view, which is Task 44's. This is documented in threads/mod.rs; Task 44 must change it.
  • [minor] The create pane's Submit does not disable itself or close after it emits CreateThread. Pressing Enter twice before the THREAD_CREATE echo sends two create requests, which would create two threads. Suggest a pending flag, as the original's submitting state.
  • [minor] The create pane has no starter-message composer (follow-up #392 is open), and the panel width is not persisted across restarts while the original persists it. That needs a follow-up issue or a parity note.
  • [minor] Pre-existing, not this task: in thread_panel.png the narrower channel view clips the reply preview's @charlie mention pill into a stray box (Task 24's reply_preview at narrow widths).

Verdict: APPROVE. No blocking findings; local ci green. The minor items should become follow-up issues.

## Independent review: Text chat 31 (Threads UI) Reviewed `git diff 656cd729..origin/textchat-31-ui-threads` (22dcae2) cold. **Checks** 1. Tests: `chip_click_opens_panel`, `panel_width_clamped` (360/900/450, clamps 359→360, 901→900), `create_pane_emits_create`, `sidebar_thread_rows_indented` (1.75 rem indent, spine at 1.5625 rem) all exist in `crates/fluxer-ui/tests/threads.rs` and assert what the plan asks. The `thread_chip` and `thread_panel` screenshot tests and goldens are present. I looked at the goldens: chip ≤30 rem on `--background-secondary-alt`, panel at 450 px with the member list hidden. 2. Interfaces: the chip, the side panel (360–900, default 450, its own message view and composer `panel::EDITOR_ID`), the create pane (name field; the server's default auto-archive), the sidebar rows under the parent, and `PanelHeader::{Thread, ForumPost}` (needed by Task 45) are all present. The Open-in-full-view, members and "..." buttons are stubs, as the Phase 5 note allows (Tasks 38 and 44). 3. Invariants: fluxer-ui gets no new I/O path, and no dependency changes. No new fixtures (thread messages for the screenshots are inline, shaped like the existing message fixtures). No secrets or paths. Nothing indexes into server data (string ops only, `max(0.0)` on spine geometry). 4. Review Focus: no item belongs to Task 31. 5. Local `cargo xtask ci`: **green** (all steps passed). The screenshot step was skipped because this machine has no lavapipe ICD; the goldens are verified only by the Linux runner. **Findings** - [minor] `screens/main/media.rs::wanted` collects inline emoji only from `local.messages.parsed_nodes()`, so custom emoji in the side panel's messages are never requested. Author and reply avatars and reaction emoji are covered through the new `shown_channels`. This needs a follow-up issue (the implementer mentions it, but none is linked). - [minor] The plan's Interfaces line says the "See all threads" link of the thread system message opens "the panel's list". It is a no-op (`messages.rs:279`). The Phase 5 notes and Task 44's Interfaces reassign it to `OpenThreadBrowser` (Task 38), so deferring it is acceptable. Please note it in the PR body. - [minor] A sidebar thread row opens the thread in the panel (`SelectChannel(parent)` + `OpenThread`). Spec §18.2.5 says the sidebar opens the full view, which is Task 44's. This is documented in `threads/mod.rs`; Task 44 must change it. - [minor] The create pane's Submit does not disable itself or close after it emits `CreateThread`. Pressing Enter twice before the THREAD_CREATE echo sends two create requests, which would create two threads. Suggest a `pending` flag, as the original's submitting state. - [minor] The create pane has no starter-message composer (follow-up #392 is open), and the panel width is not persisted across restarts while the original persists it. That needs a follow-up issue or a parity note. - [minor] Pre-existing, not this task: in `thread_panel.png` the narrower channel view clips the reply preview's `@charlie` mention pill into a stray box (Task 24's reply_preview at narrow widths). **Verdict: APPROVE.** No blocking findings; local ci green. The minor items should become follow-up issues.
The panel's composer is now Text chat 25's screen composer: view_channel takes
ComposerOptions (the panel's placeholder) and composer::view_with_id gives the
panel's text box its own widget id.

Refs #281

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thread_chip and thread_panel now show the merged composer (plus, GIF, media,
sticker and emoji buttons) under the channel and in the side panel.

Refs #281

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

Independent re-review: Text chat 31 (Threads UI), after the textchat merge

I reviewed git diff 9c96985..origin/textchat-31-ui-threads (dab3e62) without relying on the earlier review.

Checks

  1. Tests: crates/fluxer-ui/tests/threads.rs has chip_click_opens_panel, panel_width_clamped (min 360, max 900, default 450; 359→360, 901→900, 1000→900, 200→360), create_pane_emits_create and sidebar_thread_rows_indented (indent 1.75 rem = 28 px, spine at 1.5625 rem = 25 px). The thread_chip_matches_golden and thread_panel_matches_golden screenshot tests and their goldens are present. I checked the constants against the fork: ThreadPanelWidth.ts:7-9, MessageThreadChip.module.css (30 rem, --background-secondary-alt), SidebarThreadList.module.css, and DEFAULT_THREAD_AUTO_ARCHIVE_DURATION = 4320. All match.
  2. Interfaces: these are present: the chip, the side panel (with its own messages::State, keyed by the thread's id, and its own composer, panel::EDITOR_ID), the create pane, the sidebar rows, and panel::PanelHeader::{Thread, ForumPost}, which Task 45 needs. The full-view, members and "..." buttons are stubs, which the Phase 5 notes allow (Tasks 38 and 44). The merge adapts cleanly to Text chat 25: messages::view_channel(.., &ComposerOptions, editor_id) and composer::view_with_id.
  3. Invariants: fluxer-core is untouched. fluxer-ui gets no new I/O path. No dependency changes, no new fixtures, no secrets or paths. Server data cannot panic the client here: names use unwrap_or_default, and the code only does string operations and clamped geometry.
  4. Review Focus: no item belongs to Task 31.
  5. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci at dab3e62 is green: fmt, clippy, deny, core-isolation, parity, tests and vendored tests all pass, and all 53 screenshot tests pass, thread_chip and thread_panel included.

Findings

  • [minor] The PR body is the wrong one. It describes Audio 53 (the stream menu's "Audio sources" and "Audio settings") and ends Closes #343. Merging as it is would close #343 (Audio 53, still open) and leave #281 open. Please replace the body with Text chat 31's, ending Closes #281, before merging.
  • [minor] The panel's plus button does nothing. main::view draws composer::with_plus_menu only from local.messages.composer, the channel's, so toggling the panel's plus menu changes state that is never drawn. The implementer flagged this too. It needs a follow-up issue.
  • [minor] media::wanted loads the attachments, stickers and embed images only for app.ui.selected_channel, and the inline emoji only from local.messages.parsed_nodes(). So a thread's pictures, stickers, embed media and custom emoji in the panel are never requested and stay as placeholders. Avatars and reaction emoji are covered by shown_channels. This is wider than the "emoji" finding of the first review. It needs a follow-up issue.
  • [minor] Still open from the first review, with no follow-up issue filed yet (only #392 exists):
    • the create pane can send CreateThread twice when it is submitted twice before the echo arrives;
    • the panel's width is not kept across restarts (the original persists it);
    • "See all threads" is a no-op. It is reassigned to Tasks 38 and 44, but this should be stated in the PR body.
      Per CLAUDE.md, these deferrals need follow-up issues linked from the PR before merge.
  • [minor] StartCreate has no caller yet, so the create pane is unreachable in the app until Text chat 29's hover bar or menu sends it. That is expected, but Task 29 must wire it up.
  • [minor] message_row::estimate_height adds the chip's height whenever message.thread.is_some(), even when chip::model returns None (a thread the user cannot see). The estimate is a little high; the effect is cosmetic.

None of these is blocking: no interface is broken, no invariant is violated, no data is lost and CI is green.

Verdict: approved, provided the PR body is corrected (Closes #281) and the follow-up issues above are filed before merge.

## Independent re-review: Text chat 31 (Threads UI), after the textchat merge I reviewed `git diff 9c96985..origin/textchat-31-ui-threads` (dab3e62) without relying on the earlier review. **Checks** 1. Tests: `crates/fluxer-ui/tests/threads.rs` has `chip_click_opens_panel`, `panel_width_clamped` (min 360, max 900, default 450; 359→360, 901→900, 1000→900, 200→360), `create_pane_emits_create` and `sidebar_thread_rows_indented` (indent 1.75 rem = 28 px, spine at 1.5625 rem = 25 px). The `thread_chip_matches_golden` and `thread_panel_matches_golden` screenshot tests and their goldens are present. I checked the constants against the fork: `ThreadPanelWidth.ts:7-9`, `MessageThreadChip.module.css` (30 rem, `--background-secondary-alt`), `SidebarThreadList.module.css`, and `DEFAULT_THREAD_AUTO_ARCHIVE_DURATION = 4320`. All match. 2. Interfaces: these are present: the chip, the side panel (with its own `messages::State`, keyed by the thread's id, and its own composer, `panel::EDITOR_ID`), the create pane, the sidebar rows, and `panel::PanelHeader::{Thread, ForumPost}`, which Task 45 needs. The full-view, members and "..." buttons are stubs, which the Phase 5 notes allow (Tasks 38 and 44). The merge adapts cleanly to Text chat 25: `messages::view_channel(.., &ComposerOptions, editor_id)` and `composer::view_with_id`. 3. Invariants: fluxer-core is untouched. fluxer-ui gets no new I/O path. No dependency changes, no new fixtures, no secrets or paths. Server data cannot panic the client here: names use `unwrap_or_default`, and the code only does string operations and clamped geometry. 4. Review Focus: no item belongs to Task 31. 5. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` at dab3e62 is **green**: fmt, clippy, deny, core-isolation, parity, tests and vendored tests all pass, and all 53 screenshot tests pass, `thread_chip` and `thread_panel` included. **Findings** - [minor] **The PR body is the wrong one.** It describes Audio 53 (the stream menu's "Audio sources" and "Audio settings") and ends `Closes #343`. Merging as it is would close #343 (Audio 53, still open) and leave #281 open. Please replace the body with Text chat 31's, ending `Closes #281`, before merging. - [minor] The panel's plus button does nothing. `main::view` draws `composer::with_plus_menu` only from `local.messages.composer`, the channel's, so toggling the panel's plus menu changes state that is never drawn. The implementer flagged this too. It needs a follow-up issue. - [minor] `media::wanted` loads the attachments, stickers and embed images only for `app.ui.selected_channel`, and the inline emoji only from `local.messages.parsed_nodes()`. So a thread's pictures, stickers, embed media and custom emoji in the panel are never requested and stay as placeholders. Avatars and reaction emoji are covered by `shown_channels`. This is wider than the "emoji" finding of the first review. It needs a follow-up issue. - [minor] Still open from the first review, with no follow-up issue filed yet (only #392 exists): - the create pane can send `CreateThread` twice when it is submitted twice before the echo arrives; - the panel's width is not kept across restarts (the original persists it); - "See all threads" is a no-op. It is reassigned to Tasks 38 and 44, but this should be stated in the PR body. Per CLAUDE.md, these deferrals need `follow-up` issues linked from the PR before merge. - [minor] `StartCreate` has no caller yet, so the create pane is unreachable in the app until Text chat 29's hover bar or menu sends it. That is expected, but Task 29 must wire it up. - [minor] `message_row::estimate_height` adds the chip's height whenever `message.thread.is_some()`, even when `chip::model` returns `None` (a thread the user cannot see). The estimate is a little high; the effect is cosmetic. None of these is blocking: no interface is broken, no invariant is violated, no data is lost and CI is green. **Verdict: approved**, provided the PR body is corrected (`Closes #281`) and the follow-up issues above are filed before merge.
charles manually merged commit 9cf9a6825c into textchat 2026-11-13 10:58:13 +00:00
Sign in to join this conversation.
No description provided.