Daily use 38: Full profile modal, popout details, more triggers (#530) #630

Closed
charles wants to merge 0 commits from dailyuse-38-ui-profile-modal into dailyuse
Owner

Daily use 38 (spec §3.10): the full profile modal, the popout's details and more triggers.

Built

  • screens/main/profile_modal/{mod,overview,mutuals}.rs: the modal as UserProfileModal.module.css sizes it (min(40rem, 100vw−3rem, 76.923vh−2.3rem) wide, 10:13, 4 px accent border, 20:7 banner, 120 px avatar over its edge scaled with the banner), Message / Edit profile, name + BOT, username with badges, pronouns, custom status; tabs Overview / Mutual friends (n) (not bots) / Mutual communities|groups|places (n), none on one's own profile. Overview: every voice call, full bio, local time, membership, roles, connection cards, Note ("Click to add a note"), edited in place: a click edits and focuses it, the blur (click elsewhere in the modal, a tab, a row, closing, Escape) sends SaveNote. Mutual friends replace the profile; groups/communities go there and close it; empty states with UsersThree.
  • Popout (profile_popout.rs), in the original's order (sections()): badges over the banner's lower right (tooltips, href links), custom status, voice activity card (click goes to the call), bio with "View full profile" when longer than 3 lines (estimated from the source text), local time, membership, roles, compact connections. Avatar and name/tag clicks open the full profile.
  • Triggers: a left click on a user mention opens its popout (rich_text::Message::UserPopout via a new InlineFlow text-run on_click with the piece's window bounds). Shift alone (no Ctrl/Alt/Super) on any user trigger (author, reply author, mention, member row, voice participant) sends MentionUser via profiles::user_click. Author, reply author, member row and voice participant already opened popouts.
  • Images: the modal's avatar, banner, badges, custom status emoji, membership guild icon, mutual friends' avatars and mutual community icons are in media::wanted (profile_modal::wanted), so they go through request_all; the popout's badges and custom status emoji too.
  • Icons: GlobeSimple (fill), CaretRightFill, Bluesky (the fork's own, own colour; README note).

Layer order (main::view): the profile modal is over every other modal (it is opened from popouts, menus, rows and modals, which it replaces or covers), and under the profile popout (a popout opened from the modal is on top), the lightbox (which covers everything, #626), the message confirms and the external-link warning that its bio/badge/connection links ask for.

Tests: tests/profile_modal.rs (modal_tabs, ones_own_profile_has_no_tabs, note_edit_emits_save, it_wants_the_avatars_badges_and_community_icons), tests/profile_popout.rs (popout_section_order, view_full_profile_and_voice_activity_reach_the_store, mention_click_opens_popout, shift_click_mentions). Goldens profile_popout_full, profile_modal_overview (1280×1024 so the note shows), profile_modal_mutuals from the dailyuse scenario (grace, fixtures/dailyuse/profile_grace.json), references in docs/screenshots/; profile_popout_member regenerated (ada's badge and custom status now show). The devserver serves no badge assets, so the goldens load a generated picture per badge. No Electron reference available here; dimensions come from the CSS files named in each test's doc comment. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No FLUXER_DESKTOP_TESTS tests.

Deviations / outside the Files list

  • widgets/inline_flow.rs (text runs' on_click), screens/main/messages.rs (mention → OpenProfile), status_popout.rs (line_view_sized made pub), media.rs, app.rs (Local::profile_modal, note focus task), the rich_text::Message match arms in forum/embed: minimal changes to wire the above.
  • Stream spectators: the pill slot now opens a hover popout (200/500 ms, under the slot, place fixed at open, never over the slot) whose rows open the spectator's profile or, with Shift alone, mention them (call/spectators.rs, review fix). The modal's relationship button and More menu, "Add note" focusing the note, the voice card's participants/preview/join button ("Streaming" + LIVE is now drawn) and the popout's hover icons are left out: follow-up #629.
  • Tests were written first but run only after the implementation compiled (one commit for both).

Closes #530
Closes #216
Closes #217
Closes #218

🤖 Generated with Claude Code

Daily use 38 (spec §3.10): the full profile modal, the popout's details and more triggers. **Built** - `screens/main/profile_modal/{mod,overview,mutuals}.rs`: the modal as `UserProfileModal.module.css` sizes it (min(40rem, 100vw−3rem, 76.923vh−2.3rem) wide, 10:13, 4 px accent border, 20:7 banner, 120 px avatar over its edge scaled with the banner), Message / Edit profile, name + BOT, username with badges, pronouns, custom status; tabs Overview / Mutual friends (n) (not bots) / Mutual communities|groups|places (n), none on one's own profile. Overview: every voice call, full bio, local time, membership, roles, connection cards, Note ("Click to add a note"), edited in place: a click edits and focuses it, the blur (click elsewhere in the modal, a tab, a row, closing, Escape) sends `SaveNote`. Mutual friends replace the profile; groups/communities go there and close it; empty states with UsersThree. - Popout (`profile_popout.rs`), in the original's order (`sections()`): badges over the banner's lower right (tooltips, href links), custom status, voice activity card (click goes to the call), bio with "View full profile" when longer than 3 lines (estimated from the source text), local time, membership, roles, compact connections. Avatar and name/tag clicks open the full profile. - Triggers: a left click on a user mention opens its popout (`rich_text::Message::UserPopout` via a new `InlineFlow` text-run `on_click` with the piece's window bounds). Shift alone (no Ctrl/Alt/Super) on any user trigger (author, reply author, mention, member row, voice participant) sends `MentionUser` via `profiles::user_click`. Author, reply author, member row and voice participant already opened popouts. - Images: the modal's avatar, banner, badges, custom status emoji, membership guild icon, mutual friends' avatars and mutual community icons are in `media::wanted` (`profile_modal::wanted`), so they go through `request_all`; the popout's badges and custom status emoji too. - Icons: `GlobeSimple` (fill), `CaretRightFill`, `Bluesky` (the fork's own, own colour; README note). **Layer order (main::view)**: the profile modal is over every other modal (it is opened from popouts, menus, rows and modals, which it replaces or covers), and under the profile popout (a popout opened from the modal is on top), the lightbox (which covers everything, #626), the message confirms and the external-link warning that its bio/badge/connection links ask for. **Tests**: `tests/profile_modal.rs` (`modal_tabs`, `ones_own_profile_has_no_tabs`, `note_edit_emits_save`, `it_wants_the_avatars_badges_and_community_icons`), `tests/profile_popout.rs` (`popout_section_order`, `view_full_profile_and_voice_activity_reach_the_store`, `mention_click_opens_popout`, `shift_click_mentions`). Goldens `profile_popout_full`, `profile_modal_overview` (1280×1024 so the note shows), `profile_modal_mutuals` from the dailyuse scenario (grace, `fixtures/dailyuse/profile_grace.json`), references in `docs/screenshots/`; `profile_popout_member` regenerated (ada's badge and custom status now show). The devserver serves no badge assets, so the goldens load a generated picture per badge. No Electron reference available here; dimensions come from the CSS files named in each test's doc comment. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No FLUXER_DESKTOP_TESTS tests. **Deviations / outside the Files list** - `widgets/inline_flow.rs` (text runs' `on_click`), `screens/main/messages.rs` (mention → OpenProfile), `status_popout.rs` (`line_view_sized` made pub), `media.rs`, `app.rs` (`Local::profile_modal`, note focus task), the `rich_text::Message` match arms in forum/embed: minimal changes to wire the above. - Stream spectators: the pill slot now opens a hover popout (200/500 ms, under the slot, place fixed at open, never over the slot) whose rows open the spectator's profile or, with Shift alone, mention them (`call/spectators.rs`, review fix). The modal's relationship button and More menu, "Add note" focusing the note, the voice card's participants/preview/join button ("Streaming" + LIVE is now drawn) and the popout's hover icons are left out: follow-up #629. - Tests were written first but run only after the implementation compiled (one commit for both). Closes #530 Closes #216 Closes #217 Closes #218 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The full profile modal (tabs, overview, mutuals, the note edited in place and
saved on blur), the popout's badges, custom status, voice activity, local time,
"View full profile" and connections, a click on a mention opening its popout,
and Shift alone on a user mentioning them.

Refs #530

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
profile_popout_full, profile_modal_overview and profile_modal_mutuals from the
dailyuse scenario (Grace's profile, fixtures/dailyuse/profile_grace.json);
profile_popout_member gains ada's badge and custom status.

Refs #530

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

Independent review: Daily use 38 (diff 1089e6a1..e2a3860e)

Local gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green in a clean review worktree (all steps passed, screenshot goldens included).

Findings

  1. blocking: screens/main/call/spectators.rs. Stream spectators still do not open a profile popout. Task 38's Interfaces block says the task "Produces … popouts from mentions, reply authors, voice participants, spectators", and its Files list names call/spectators.rs (triggers). Spec §3.10 lists stream spectators among the triggers, and #218, which this PR closes, names "the stream spectators popout". The reason given is real: an iced tooltip overlay does not pass on clicks. But it does not move a requirement of this task to a follow-up. Spectator already has user_id, so the rows need a hover popout that takes clicks and sends main::Message::OpenProfile (which also gets the Shift-to-mention swap). Fix it here, or have the orchestrator explicitly approve the deferral to #629 and change Closes #218 to Refs #218.
  2. minor: tests/profile_popout.rs popout_section_order. The fixture has no custom status, roles or notices, so the test never checks where CustomStatus, Roles or Notices go. Those are the positions most likely to regress. Add a case with a presence custom status and a role.
  3. minor: tests/profile_popout.rs mention_click_opens_popout. The test starts from rich_text::Message::UserPopout. It never covers the new InlineFlow on_click path, including the conversion of piece bounds to window coordinates (layout.bounds().position() + state.offset). I read that conversion and it is correct, consistent with right_pressed, but no test covers it.
  4. minor: profile_modal/mod.rs State. The note draft is cleared only when a ProfileModal message arrives while the modal is closed. If the store closes the modal some other way (OpenSettings / MessageUser from outside the modal), the draft is neither saved nor dropped. It comes back, still being edited, the next time that user's modal opens. This is an edge case, and nothing inside the modal can trigger it.
  5. minor: profile_popout.rs voice_card. It always shows "In voice". The original shows "Streaming" plus a LIVE badge when the user is streaming (VoiceActivityCard.tsx:222-235). Add this to #629.
  6. minor: profile_popout.rs bio_overflows. It estimates from the source text, as documented, so Markdown syntax and emoji shortcodes make the line count too high. This is an accepted, documented divergence.

Checks done

  • Tests: modal_tabs, note_edit_emits_save, popout_section_order, mention_click_opens_popout and shift_click_mentions exist. So do the goldens profile_modal_overview, profile_modal_mutuals and profile_popout_full, plus reference images. Each test asserts behaviour that is absent on the base: UserPopout, the shift swap, sections and the note blur are all new.
  • Note blur: the outer mouse_area(card).on_press(Blur) fires only when nothing inside captured the press, because iced 0.14's mouse_area returns when the event is already captured. Tabs, mutual rows, buttons, badge links and bio links each capture their press and blur once through the message => arm. A press on the banner, the empty card area, an unlinked badge or the "Note" title sends Blur. The note field is wrapped in opaque. Escape: iced's text_editor Binding::Unfocus does not capture the event, so on_escape still sends Close, which saves the note and then sends CloseProfileModal. The backdrop sends Close as well. Each path saves exactly once.
  • Shift swap: the only UserAction::OpenProfile producers in fluxer-ui are main::Message::OpenProfile (member, author, voice participant) and messages::open_profile (author, reply, system, mention). All of them are pointer presses. Menus emit OpenProfileModal, and right presses emit OpenUserMenu, so keyboard navigation and Shift+F10 cannot trigger the swap. The condition (Shift, and no Ctrl, Alt or Super) matches PreloadableUserPopout.tsx:83-86.
  • Layer order: the modal is drawn over every other modal and under the popout, the lightbox, the message confirms, the invite-accept modal and the external-link warning. That is consistent with the original's modal stack, where later-opened layers are on top.
  • media::wanted covers the modal's avatar, banner, badges, custom-status emoji, membership icon, mutual friends' avatars and mutual community icons, and also the popout's badges and status emoji.
  • Parity spot-checks against the fork:
    • Tab labels "Mutual friends ({count})" and "Mutual places/groups/communities ({count})" (MutualItemsDescriptors.ts). Bots get no friends tab, and one's own profile gets no tabs.
    • "Click to add a note" with maxLength={256} (UserNoteEditor.tsx).
    • "View full profile" (UserProfileShared.tsx:189).
    • Badge box bottom at 9.0625rem, 0.625rem from the end, gap 0.375rem (UserProfileBadges.module.css:21-31).
    • "And # other call(s)" and "In voice" uppercased.
  • No platform cfg imports were added. The edits outside the file list are minimal wiring. Crate invariants hold: no I/O, and server links and badge URLs are parsed before use.
  • Left-out items (#629): the relationship button, the More menu, Add-note focus (a core flag owned by Tasks 18 and 23), the voice card's join/preview controls and the hover icons are not in Task 38's section. Spectators are.

Verdict: changes requested. One blocking finding (spectator trigger); CI green.

## Independent review: Daily use 38 (diff 1089e6a1..e2a3860e) **Local gate:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green in a clean review worktree (all steps passed, screenshot goldens included). ### Findings 1. **blocking**: `screens/main/call/spectators.rs`. Stream spectators still do not open a profile popout. Task 38's Interfaces block says the task "Produces … popouts from mentions, reply authors, voice participants, **spectators**", and its Files list names `call/spectators.rs` (triggers). Spec §3.10 lists stream spectators among the triggers, and #218, which this PR closes, names "the **stream spectators** popout". The reason given is real: an iced `tooltip` overlay does not pass on clicks. But it does not move a requirement of this task to a follow-up. `Spectator` already has `user_id`, so the rows need a hover popout that takes clicks and sends `main::Message::OpenProfile` (which also gets the Shift-to-mention swap). Fix it here, or have the orchestrator explicitly approve the deferral to #629 and change `Closes #218` to `Refs #218`. 2. **minor**: `tests/profile_popout.rs` `popout_section_order`. The fixture has no custom status, roles or notices, so the test never checks where `CustomStatus`, `Roles` or `Notices` go. Those are the positions most likely to regress. Add a case with a presence custom status and a role. 3. **minor**: `tests/profile_popout.rs` `mention_click_opens_popout`. The test starts from `rich_text::Message::UserPopout`. It never covers the new `InlineFlow` `on_click` path, including the conversion of piece bounds to window coordinates (`layout.bounds().position() + state.offset`). I read that conversion and it is correct, consistent with `right_pressed`, but no test covers it. 4. **minor**: `profile_modal/mod.rs` `State`. The note draft is cleared only when a `ProfileModal` message arrives while the modal is closed. If the store closes the modal some other way (`OpenSettings` / `MessageUser` from outside the modal), the draft is neither saved nor dropped. It comes back, still being edited, the next time that user's modal opens. This is an edge case, and nothing inside the modal can trigger it. 5. **minor**: `profile_popout.rs` `voice_card`. It always shows "In voice". The original shows "Streaming" plus a LIVE badge when the user is streaming (`VoiceActivityCard.tsx:222-235`). Add this to #629. 6. **minor**: `profile_popout.rs` `bio_overflows`. It estimates from the source text, as documented, so Markdown syntax and emoji shortcodes make the line count too high. This is an accepted, documented divergence. ### Checks done - Tests: `modal_tabs`, `note_edit_emits_save`, `popout_section_order`, `mention_click_opens_popout` and `shift_click_mentions` exist. So do the goldens `profile_modal_overview`, `profile_modal_mutuals` and `profile_popout_full`, plus reference images. Each test asserts behaviour that is absent on the base: `UserPopout`, the shift swap, `sections` and the note blur are all new. - Note blur: the outer `mouse_area(card).on_press(Blur)` fires only when nothing inside captured the press, because iced 0.14's `mouse_area` returns when the event is already captured. Tabs, mutual rows, buttons, badge links and bio links each capture their press and blur once through the `message =>` arm. A press on the banner, the empty card area, an unlinked badge or the "Note" title sends `Blur`. The note field is wrapped in `opaque`. Escape: iced's text_editor `Binding::Unfocus` does **not** capture the event, so `on_escape` still sends `Close`, which saves the note and then sends `CloseProfileModal`. The backdrop sends `Close` as well. Each path saves exactly once. - Shift swap: the only `UserAction::OpenProfile` producers in fluxer-ui are `main::Message::OpenProfile` (member, author, voice participant) and `messages::open_profile` (author, reply, system, mention). All of them are pointer presses. Menus emit `OpenProfileModal`, and right presses emit `OpenUserMenu`, so keyboard navigation and Shift+F10 cannot trigger the swap. The condition (Shift, and no Ctrl, Alt or Super) matches `PreloadableUserPopout.tsx:83-86`. - Layer order: the modal is drawn over every other modal and under the popout, the lightbox, the message confirms, the invite-accept modal and the external-link warning. That is consistent with the original's modal stack, where later-opened layers are on top. - `media::wanted` covers the modal's avatar, banner, badges, custom-status emoji, membership icon, mutual friends' avatars and mutual community icons, and also the popout's badges and status emoji. - Parity spot-checks against the fork: - Tab labels "Mutual friends ({count})" and "Mutual places/groups/communities ({count})" (`MutualItemsDescriptors.ts`). Bots get no friends tab, and one's own profile gets no tabs. - "Click to add a note" with `maxLength={256}` (`UserNoteEditor.tsx`). - "View full profile" (`UserProfileShared.tsx:189`). - Badge box bottom at 9.0625rem, 0.625rem from the end, gap 0.375rem (`UserProfileBadges.module.css:21-31`). - "And # other call(s)" and "In voice" uppercased. - No platform `cfg` imports were added. The edits outside the file list are minimal wiring. Crate invariants hold: no I/O, and server links and badge URLs are parsed before use. - Left-out items (#629): the relationship button, the More menu, Add-note focus (a core flag owned by Tasks 18 and 23), the voice card's join/preview controls and the hover icons are not in Task 38's section. Spectators are. **Verdict: changes requested.** One blocking finding (spectator trigger); CI green.
The stream tile's spectators slot opens a hover popout (200 ms in, 500 ms out,
placed under the slot when it opens, never over it) whose rows open the
spectator's profile popout, or with Shift alone mention them. A note being
edited is saved before anything that closes the full profile; the voice card
says Streaming with the LIVE badge. Tests drive the mention click through
InlineFlow and give the section-order fixture a status, a role and a notice.

Refs #530

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

Review fixes, head c9e38ac4:

Blocking: spectators open profiles. crates/fluxer-ui/src/screens/main/call/spectators.rs replaces the tooltip with a hover popout, as StreamSpectatorsPopout.tsx does:

  • slot (:229) opens it after the pointer rests 200 ms on the slot.
  • It stays open while the pointer is on the slot or the popout, and closes 500 ms after the pointer has left both (State, Message, update :145).
  • place (:212): bottom-start, 8 px below the slot, flipped above when it does not fit, shifted to stay 8 px inside the window. Its position is fixed when it opens and it never covers the slot.
  • Each row (:342) is a popout::trigger and sends Pick { user_id, bounds }. That becomes OpenProfile seen from the stream's guild, anchored to the row, and closes the list. Shift alone turns it into MentionUser through main::update. Deviation: the original keeps the list open while the profile popout is up; here a pick closes it.
  • Shared hover plumbing: stream_hover::{hover_target, placed} (stream_hover.rs:789, :807).
  • Wiring: call::Message::Spectators (call/mod.rs:130), main::route (mod.rs:854), the layer over the screen (mod.rs:1209), Local::spectators.

Minor

  • tests/profile_popout.rs popout_section_order: the fixture now has a custom status, the Moderators role and profile_limited, so all nine sections are asserted.
  • mention_click_opens_popout moved to tests/profile_triggers.rs. It now clicks a real InlineFlow, checks the published bounds (contains the click, window coordinates), checks that a click on plain text publishes nothing, then checks OpenProfile.
  • profile_modal::State::save_before_closing (profile_modal/mod.rs:148, called at mod.rs:484): MessageUser, OpenSettings, CloseProfileModal or OpenProfileModal of another user saves the note being edited first. New test a_note_being_edited_is_saved_when_the_store_closes_the_modal.
  • profile_popout::voice_card (:509) shows STREAMING in --status-danger with the LIVE badge while the user streams.
  • bio_overflows unchanged.

New tests (tests/profile_triggers.rs):

  • mention_click_opens_popout
  • resting_on_the_slot_opens_the_spectators_and_moving_into_them_keeps_them_open: nothing is published before the open delay, Open after it, moving into the popout keeps it open, and its place stays put.
  • the_popout_never_covers_its_slot
  • a_spectator_row_opens_their_profile_and_shift_mentions_them

These use APIs that do not exist on the previous head, so they fail to build there. No golden was added: the plan names none for spectators, and the slot looks the same as before.

Gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci ends with "==> xtask ci: all steps passed".

Review fixes, head c9e38ac4: **Blocking: spectators open profiles.** `crates/fluxer-ui/src/screens/main/call/spectators.rs` replaces the tooltip with a hover popout, as `StreamSpectatorsPopout.tsx` does: - `slot` (:229) opens it after the pointer rests 200 ms on the slot. - It stays open while the pointer is on the slot or the popout, and closes 500 ms after the pointer has left both (`State`, `Message`, `update` :145). - `place` (:212): bottom-start, 8 px below the slot, flipped above when it does not fit, shifted to stay 8 px inside the window. Its position is fixed when it opens and it never covers the slot. - Each row (:342) is a `popout::trigger` and sends `Pick { user_id, bounds }`. That becomes `OpenProfile` seen from the stream's guild, anchored to the row, and closes the list. Shift alone turns it into `MentionUser` through `main::update`. Deviation: the original keeps the list open while the profile popout is up; here a pick closes it. - Shared hover plumbing: `stream_hover::{hover_target, placed}` (stream_hover.rs:789, :807). - Wiring: `call::Message::Spectators` (call/mod.rs:130), `main::route` (mod.rs:854), the layer over the screen (mod.rs:1209), `Local::spectators`. **Minor** - `tests/profile_popout.rs` `popout_section_order`: the fixture now has a custom status, the Moderators role and `profile_limited`, so all nine sections are asserted. - `mention_click_opens_popout` moved to `tests/profile_triggers.rs`. It now clicks a real `InlineFlow`, checks the published bounds (contains the click, window coordinates), checks that a click on plain text publishes nothing, then checks `OpenProfile`. - `profile_modal::State::save_before_closing` (profile_modal/mod.rs:148, called at mod.rs:484): `MessageUser`, `OpenSettings`, `CloseProfileModal` or `OpenProfileModal` of another user saves the note being edited first. New test `a_note_being_edited_is_saved_when_the_store_closes_the_modal`. - `profile_popout::voice_card` (:509) shows STREAMING in `--status-danger` with the LIVE badge while the user streams. - `bio_overflows` unchanged. **New tests** (`tests/profile_triggers.rs`): - `mention_click_opens_popout` - `resting_on_the_slot_opens_the_spectators_and_moving_into_them_keeps_them_open`: nothing is published before the open delay, `Open` after it, moving into the popout keeps it open, and its place stays put. - `the_popout_never_covers_its_slot` - `a_spectator_row_opens_their_profile_and_shift_mentions_them` These use APIs that do not exist on the previous head, so they fail to build there. No golden was added: the plan names none for spectators, and the slot looks the same as before. Gate: `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` ends with "==> xtask ci: all steps passed".
Author
Owner

Merged into dailyuse and textchat at c7601011 (combined merge).

Merged into `dailyuse` and `textchat` at c7601011 (combined merge).
charles closed this pull request 2026-11-15 11:50:22 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.