Text chat 30: Search, pins popout, inbox (#280) #396

Manually merged
charles merged 0 commits from textchat-30-ui-search-pins-inbox into textchat 2026-11-13 10:58:16 +00:00
Owner

Stacked on: textchat-17-core-search, textchat-24-ui-message-row

What this builds (spec §3.7, §9.7)

  • Header (screens/main/header.rs): the pins button (PushPin, "Pinned messages"; not in voice channels), the search bar after the member list toggle, and the inbox button last (the fork's own InboxIcon), in the order of ChannelHeader.tsx.
  • Search (screens/main/search/):
    • bar.rs: 15.25 × 2.25 rem, --radius-xl, magnifying glass, "Search messages", clear X (MessageSearchBar.module.css).
    • suggestions.rs: the popout under the bar from the store's search_suggestions ("Search filters", "Recent searches", "Users", "Channels", "Date options", "Values"); a row replaces the word being typed; a filter key keeps the popout open for its value.
    • results.rs: the 420 px panel in place of the member list while chat.search.open (ChannelSearchResults.module.css): "{total} results" / "Searching" / "Indexing" / "Search results", scope and sort buttons with their menus (labels and icons of SearchScopeOptions.ts, ChannelSearchResultsShared.tsx), runs of the same channel under the channel's name (community name for the cross-community scopes), result cards with "Jump" on hover, the pagination bar (7 slots with "…", Pagination.tsx), the indexing state ("Indexing channel" + its line), "No results" / "Try a different search query.", the error state with "Try again".
    • mod.rs: State { suggesting, menu } in Local::search; update → UserAction::Search(..); jump() selects the guild/channel when needed and emits JumpToMessage (thread channels are not filtered out, as the plan's note for Task 30 asks).
  • Pins popout (screens/main/pins.rs, ChannelPinsPopout, ChannelPinsContent, MessagePreview.module.css): "Pinned messages", cards with Jump and the unpin X for who may unpin (DM, or Manage Messages), LoadMorePins once scrolled past 80 %, "No pinned messages" / "Pinned messages show up here.", "You've reached the end" with the guild line (Members with "Pin messages" can pin messages for everyone.) or the DM line. Unpin emits PinMessage { pin: false, confirmed: false }, so the store's confirm ("Unpin message" / "Send this pin back in time?" / "Unpin it") applies.
  • Inbox popout (screens/main/inbox.rs, InboxPopout, SavedMessagesContent, RecentMentionsContent): tab column with "Bookmarks" and "Mentions", channel header per card (click jumps) with the "Remove bookmark" X, cards with Jump, the lost-access line with "Remove", empty states ("No bookmarks", "No mentions yet" / "Mentions of you show up here for 7 days.") and end states.
  • Icons (Phosphor 2.1.10, extracted from the fork's @phosphor-icons/react defs as the README describes): sparkle (fill, bold), flag-checkered, bookmark-simple, clock-clockwise, clock-counter-clockwise, chat-circle, chat-centered-dots, globe, circle-notch, magnifying-glass (fill); inbox.svg is the fork's InboxIcon.tsx path scaled onto the 256 grid (documented in assets/icons/README.md).

Tests

  • crates/fluxer-ui/tests/search.rs: bar_submits_parsed_query, suggestion_sections, results_grouped_with_headers, pagination_pages, indexing_state_text.
  • crates/fluxer-ui/tests/pins_inbox.rs: pins_infinite_load_at_80_percent, pins_end_state_strings_guild_vs_dm, inbox_tabs.
  • Screenshots (lavapipe, fluxer-native-shots:u2204 container): search_results, search_indexing, pins_popout, inbox_bookmarks, listed in docs/screenshots/README.md.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally.

No Electron reference capture was taken (no live instance from this task); dimensions come from the CSS files named above and in each module's doc comment.

Deviations

  • Goldens with a channel header were redrawn (the new header tools). The three stream_tile_* goldens already failed on the base under lavapipe (they predate the guild rail's screen-share badge and the voice panel's screen-share button) and are redrawn here too.
  • crates/fluxer-ui/src/app.rs (outside the Files list) gains one field, Local::search.
  • Popouts are not resizable yet; no keyboard navigation in the suggestions; no "Remove mention" (no store action); no scope badge on the bar's glass; pagination ellipsis is not an input; suggestions use the end of the text as the cursor; scope/sort menus show a check instead of radio dots. All in follow-up #395.

Update (merge of origin/textchat at 67da1c7)

  • Merged the latest textchat; search result rows pass an empty revealed_attachments (the RowCtx field from Text chat 22).
  • Goldens with a channel header redrawn on lavapipe (fluxer-native-shots:u2204) so they show the header tools; the four Task 30 goldens redrawn for the Task 25 composer. The rich_text, settings and picker goldens were left as on the base.
  • Local gate: cargo xtask ci green on the host; the screenshot tests (55/55) green on lavapipe in the container. The full FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci no longer builds in the Ubuntu 22.04 image (libspa / webrtc-sys need newer PipeWire and clang since 02385ad), so the two halves ran separately.

Closes #280

🤖 Generated with Claude Code

Stacked on: textchat-17-core-search, textchat-24-ui-message-row ## What this builds (spec §3.7, §9.7) - **Header** (`screens/main/header.rs`): the pins button (`PushPin`, "Pinned messages"; not in voice channels), the search bar after the member list toggle, and the inbox button last (the fork's own `InboxIcon`), in the order of `ChannelHeader.tsx`. - **Search** (`screens/main/search/`): - `bar.rs`: 15.25 × 2.25 rem, `--radius-xl`, magnifying glass, "Search messages", clear X (`MessageSearchBar.module.css`). - `suggestions.rs`: the popout under the bar from the store's `search_suggestions` ("Search filters", "Recent searches", "Users", "Channels", "Date options", "Values"); a row replaces the word being typed; a filter key keeps the popout open for its value. - `results.rs`: the 420 px panel in place of the member list while `chat.search.open` (`ChannelSearchResults.module.css`): "{total} results" / "Searching" / "Indexing" / "Search results", scope and sort buttons with their menus (labels and icons of `SearchScopeOptions.ts`, `ChannelSearchResultsShared.tsx`), runs of the same channel under the channel's name (community name for the cross-community scopes), result cards with "Jump" on hover, the pagination bar (7 slots with "…", `Pagination.tsx`), the indexing state ("Indexing channel" + its line), "No results" / "Try a different search query.", the error state with "Try again". - `mod.rs`: `State { suggesting, menu }` in `Local::search`; `update` → `UserAction::Search(..)`; `jump()` selects the guild/channel when needed and emits `JumpToMessage` (thread channels are not filtered out, as the plan's note for Task 30 asks). - **Pins popout** (`screens/main/pins.rs`, `ChannelPinsPopout`, `ChannelPinsContent`, `MessagePreview.module.css`): "Pinned messages", cards with Jump and the unpin X for who may unpin (DM, or Manage Messages), `LoadMorePins` once scrolled past 80 %, "No pinned messages" / "Pinned messages show up here.", "You've reached the end" with the guild line (`Members with "Pin messages" can pin messages for everyone.`) or the DM line. Unpin emits `PinMessage { pin: false, confirmed: false }`, so the store's confirm ("Unpin message" / "Send this pin back in time?" / "Unpin it") applies. - **Inbox popout** (`screens/main/inbox.rs`, `InboxPopout`, `SavedMessagesContent`, `RecentMentionsContent`): tab column with "Bookmarks" and "Mentions", channel header per card (click jumps) with the "Remove bookmark" X, cards with Jump, the lost-access line with "Remove", empty states ("No bookmarks", "No mentions yet" / "Mentions of you show up here for 7 days.") and end states. - Icons (Phosphor 2.1.10, extracted from the fork's `@phosphor-icons/react` defs as the README describes): sparkle (fill, bold), flag-checkered, bookmark-simple, clock-clockwise, clock-counter-clockwise, chat-circle, chat-centered-dots, globe, circle-notch, magnifying-glass (fill); `inbox.svg` is the fork's `InboxIcon.tsx` path scaled onto the 256 grid (documented in `assets/icons/README.md`). ## Tests - `crates/fluxer-ui/tests/search.rs`: `bar_submits_parsed_query`, `suggestion_sections`, `results_grouped_with_headers`, `pagination_pages`, `indexing_state_text`. - `crates/fluxer-ui/tests/pins_inbox.rs`: `pins_infinite_load_at_80_percent`, `pins_end_state_strings_guild_vs_dm`, `inbox_tabs`. - Screenshots (lavapipe, `fluxer-native-shots:u2204` container): `search_results`, `search_indexing`, `pins_popout`, `inbox_bookmarks`, listed in `docs/screenshots/README.md`. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No Electron reference capture was taken (no live instance from this task); dimensions come from the CSS files named above and in each module's doc comment. ## Deviations - Goldens with a channel header were redrawn (the new header tools). The three `stream_tile_*` goldens already failed on the base under lavapipe (they predate the guild rail's screen-share badge and the voice panel's screen-share button) and are redrawn here too. - `crates/fluxer-ui/src/app.rs` (outside the Files list) gains one field, `Local::search`. - Popouts are not resizable yet; no keyboard navigation in the suggestions; no "Remove mention" (no store action); no scope badge on the bar's glass; pagination ellipsis is not an input; suggestions use the end of the text as the cursor; scope/sort menus show a check instead of radio dots. All in follow-up #395. ## Update (merge of origin/textchat at 67da1c7) - Merged the latest `textchat`; search result rows pass an empty `revealed_attachments` (the `RowCtx` field from Text chat 22). - Goldens with a channel header redrawn on lavapipe (`fluxer-native-shots:u2204`) so they show the header tools; the four Task 30 goldens redrawn for the Task 25 composer. The rich_text, settings and picker goldens were left as on the base. - Local gate: `cargo xtask ci` green on the host; the screenshot tests (55/55) green on lavapipe in the container. The full `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` no longer builds in the Ubuntu 22.04 image (libspa / webrtc-sys need newer PipeWire and clang since 02385ad), so the two halves ran separately. Closes #280 🤖 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 #280

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header's pins button, search bar and inbox button; the search
suggestions popout, the results panel in place of the member list
(scope and sort menus, runs by channel, Jump, pagination, indexing,
empty and error states), the pins popout (infinite load at 80 %,
Jump, unpin, empty and end states) and the inbox popout (Bookmarks,
Mentions). New goldens for the four screens; the goldens with a
channel header redrawn for the new header tools (the stream tile
goldens also had drifted on the base: screen share badge and button).

Refs #280

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search result rows get an empty revealed_attachments set (RowCtx field
added by Text chat 22). Goldens with a channel header redrawn on
lavapipe for the header tools; the four Task 30 goldens redrawn for the
Task 25 composer.

Refs #280

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

Independent review: Text chat 30 (search, pins, inbox)

Reviewed 67da1c7..57a2d36 (the test commit, the feature commit and the merge of origin/textchat).

Tests (plan step 1): all 8 named tests exist and assert what the spec says: 420 px panel, "{total} results" / "1 result", channel-run groups, 25 per page and the pagination slots, "Indexing channel" text and the poll, "No results" / "Try a different search query.", (scrollTop+offsetHeight)/scrollHeight > 0.8, "Pinned messages" with the guild and DM end lines, "No pinned messages", unpin through PinMessage { pin: false, confirmed: false } so the store shows the confirm, Bookmarks/Mentions tabs, Jump, remove bookmark. The 4 screenshot tests (search_results, search_indexing, pins_popout, inbox_bookmarks) exist.
Interfaces: consumes SearchResultsState::{Idle, Loading, Indexing, Empty, Error, Results} as merged by Text chat 17. Constants match the spec: bar 15.25 × 2.25 rem, panel 420, pins 480 × 640 (min 320 × 200), load point 0.8.
Invariants: fluxer-core and fluxer-proto are untouched. No new I/O in fluxer-ui (no fs, process or network). No new fixtures (tests reuse Text chat 2's). No secrets, URLs or paths. A result in a channel the client doesn't know is skipped (filter_map), not unwrapped. Pagination clamps the current page, and Page(n) ignores 0 or pages past the last. picked() clamps the replace range to char boundaries.
Review Focus: no item belongs to this task.

Findings

  1. minor: the pins popout cannot be resized. The spec (§9.7 Interfaces: "resizable") asks for it, but pins::view only shrinks the 480 × 640 card to fit the window (with the 320 × 200 floor), and there is no drag handle. Suggest a follow-up issue rather than holding this PR.
  2. minor: I did not re-run the screenshot goldens: host cargo xtask ci skips them without FLUXER_SCREENSHOT_TESTS=1. By eye, I compared the old and new embed_article golden: only the header tools (pin, search bar, inbox) differ, and the drop in file size is compression. I also looked at the 4 new goldens, which render as described. The implementer reports that all 55 pass on lavapipe. The Linux runner is the authority for this one.

Gate

cargo xtask ci in a clean review worktree at 57a2d36: all steps passed (fmt, clippy, deny, core isolation, parity, tests; screenshots skipped on the host).

Verdict: approve. No blocking findings.

## Independent review: Text chat 30 (search, pins, inbox) Reviewed `67da1c7..57a2d36` (the test commit, the feature commit and the merge of `origin/textchat`). **Tests (plan step 1):** all 8 named tests exist and assert what the spec says: 420 px panel, `"{total} results"` / `"1 result"`, channel-run groups, 25 per page and the pagination slots, `"Indexing channel"` text and the poll, `"No results"` / `"Try a different search query."`, `(scrollTop+offsetHeight)/scrollHeight > 0.8`, `"Pinned messages"` with the guild and DM end lines, `"No pinned messages"`, unpin through `PinMessage { pin: false, confirmed: false }` so the store shows the confirm, Bookmarks/Mentions tabs, Jump, remove bookmark. The 4 screenshot tests (`search_results`, `search_indexing`, `pins_popout`, `inbox_bookmarks`) exist. **Interfaces:** consumes `SearchResultsState::{Idle, Loading, Indexing, Empty, Error, Results}` as merged by Text chat 17. Constants match the spec: bar 15.25 × 2.25 rem, panel 420, pins 480 × 640 (min 320 × 200), load point 0.8. **Invariants:** fluxer-core and fluxer-proto are untouched. No new I/O in fluxer-ui (no fs, process or network). No new fixtures (tests reuse Text chat 2's). No secrets, URLs or paths. A result in a channel the client doesn't know is skipped (`filter_map`), not unwrapped. Pagination clamps the current page, and `Page(n)` ignores 0 or pages past the last. `picked()` clamps the replace range to char boundaries. **Review Focus:** no item belongs to this task. ### Findings 1. **minor**: the pins popout cannot be resized. The spec (§9.7 Interfaces: "resizable") asks for it, but `pins::view` only shrinks the 480 × 640 card to fit the window (with the 320 × 200 floor), and there is no drag handle. Suggest a `follow-up` issue rather than holding this PR. 2. **minor**: I did not re-run the screenshot goldens: host `cargo xtask ci` skips them without `FLUXER_SCREENSHOT_TESTS=1`. By eye, I compared the old and new `embed_article` golden: only the header tools (pin, search bar, inbox) differ, and the drop in file size is compression. I also looked at the 4 new goldens, which render as described. The implementer reports that all 55 pass on lavapipe. The Linux runner is the authority for this one. ### Gate `cargo xtask ci` in a clean review worktree at 57a2d36: **all steps passed** (fmt, clippy, deny, core isolation, parity, tests; screenshots skipped on the host). **Verdict: approve.** No blocking findings.
charles manually merged commit 9cf9a6825c into textchat 2026-11-13 10:58:16 +00:00
Sign in to join this conversation.
No description provided.