Text chat 30: Search, pins popout, inbox (#280) #396
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-30-ui-search-pins-inbox"
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?
Stacked on: textchat-17-core-search, textchat-24-ui-message-row
What this builds (spec §3.7, §9.7)
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 ownInboxIcon), in the order ofChannelHeader.tsx.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'ssearch_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 whilechat.search.open(ChannelSearchResults.module.css): "{total} results" / "Searching" / "Indexing" / "Search results", scope and sort buttons with their menus (labels and icons ofSearchScopeOptions.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 }inLocal::search;update→UserAction::Search(..);jump()selects the guild/channel when needed and emitsJumpToMessage(thread channels are not filtered out, as the plan's note for Task 30 asks).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),LoadMorePinsonce 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 emitsPinMessage { pin: false, confirmed: false }, so the store's confirm ("Unpin message" / "Send this pin back in time?" / "Unpin it") applies.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.@phosphor-icons/reactdefs 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.svgis the fork'sInboxIcon.tsxpath scaled onto the 256 grid (documented inassets/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.fluxer-native-shots:u2204container):search_results,search_indexing,pins_popout,inbox_bookmarks, listed indocs/screenshots/README.md.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen 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
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.Update (merge of origin/textchat at
67da1c7)textchat; search result rows pass an emptyrevealed_attachments(theRowCtxfield from Text chat 22).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.cargo xtask cigreen on the host; the screenshot tests (55/55) green on lavapipe in the container. The fullFLUXER_SCREENSHOT_TESTS=1 cargo xtask cino longer builds in the Ubuntu 22.04 image (libspa / webrtc-sys need newer PipeWire and clang since02385ad), so the two halves ran separately.Closes #280
🤖 Generated with Claude Code
Independent review: Text chat 30 (search, pins, inbox)
Reviewed
67da1c7..57a2d36(the test commit, the feature commit and the merge oforigin/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 throughPinMessage { 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, andPage(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
pins::viewonly shrinks the 480 × 640 card to fit the window (with the 320 × 200 floor), and there is no drag handle. Suggest afollow-upissue rather than holding this PR.cargo xtask ciskips them withoutFLUXER_SCREENSHOT_TESTS=1. By eye, I compared the old and newembed_articlegolden: 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 ciin a clean review worktree at57a2d36: all steps passed (fmt, clippy, deny, core isolation, parity, tests; screenshots skipped on the host).Verdict: approve. No blocking findings.