Daily use 23: fluxer-core full profile, popout additions, report flow (#511) #574

Closed
charles wants to merge 0 commits from dailyuse-23-core-profile-report-flow into dailyuse
Owner

Stacked on: dailyuse-11b-core-state-skeleton, dailyuse-14-core-status-idle-presence

What this builds (spec §3.10, §3.12, §17 Q14)

Profiles (profiles.rs, selectors/profile.rs)

  • OpenProfileModal { user_id, guild_id, tab } opens app.profiles.modal and closes the popout. It fetches the profile the same way as the popout (the runtime adds the mutual flags) and fetches the note once per user per session (FetchUserNote). CloseProfileModal, MessageUser and OpenSettings close the modal.
  • Notes: ApiResult::UserNote/UserNotes and USER_NOTE_UPDATE fill profiles.notes. SaveNote writes PUT only when the text differs from what is shown (at most 256 characters, null when emptied), as UserNoteEditor.tsx. The new note shows at once and the old one comes back if the write fails.
  • While a shown profile has a timezone_offset, a timer runs every 30 s (LOCAL_TIME_REFRESH) so the local time stays current.
  • profiles::user_click(user, guild, anchor, shift_only): Shift alone sends MentionUser, anything else sends OpenProfile (PreloadableUserPopout.tsx:83-90).
  • ProfilePopout gains:
    • badges: {static_cdn}/badges/{asset}.webp, else {asset_url}?size=96, plus label, caption, href and aspect ratio
    • voice_activity
    • local_time { text, relative }: "2:05 PM" or "14:05" from time_format, else the locale; "Same time as you", "2 hours ahead of you", "5 hours 30 minutes behind you"
    • connections: bsky and domain URLs
  • view_full_profile(&popout) returns the action for "View full profile".
  • profile_modal(&App) -> ProfileModalModel:
    • tabs: "Overview", "Mutual friends (n)" (not for bots), and "Mutual communities|groups|places (n)" depending on what is shared (group DMs plus known mutual guilds)
    • overview: voice activity, local time, member since, roles, connections, and the note ("Note", "Click to add a note")
    • the empty-tab texts

Report flow (report.rs): a port of ReportFlowWalk.ts and ReportFlowModal.tsx

  • Fetch message?surface=in_app&locale= and start at start_screen_id.
  • Outcomes: screen, submit (leads to the summary), end (shows the notice, or "Thanks for flagging this" with the long or short text), and link (Effect::OpenUrl, http(s) only; a /report page gets type=message&message_link=, as resolveLinkUrl).
  • Checklists unlock Next at min_checked, and their item ids are sent in checklist order. Info screens have Next, and only their link options can be chosen.
  • Back pops a step and restores its ticks.
  • The submission sends revision_hash, locale and the steps.
  • Submit failures are mapped as describeSubmitFailure. CONFLICT ends with Done. REPORT_FLOW_OUTDATED and INVALID_REPORT_FLOW_ANSWERS refetch and restart with "The report form changed. Please start again."
  • The "Report sent" screen offers "Block {name}" ("Blocked" once done). BlockAuthor sends the menus' Friend { Block, Menu, confirmed: false }, so it asks for confirmation as the original does.
  • Legacy fallback (Q14): if the flow doesn't parse (or the endpoint returns 404/405), a screen is missing, or an outcome type is unknown, the client switches to the legacy POST /reports/message {category: "other"}. It goes through the same "Check your report" summary, so the user still confirms. Back returns to the walk.
  • report_modal(&App) -> ReportModalModel covers title, subtitle, body, urgent banner, footer buttons and flash. block_action(&App) is also provided.

Tests

  • tests/profile_full.rs: tabs_and_counts_bot_has_no_mutual_friends, mutual_label_by_kind, local_time_ahead_behind_same, local_time_refresh_scheduled, badges_from_profile, note_loaded_and_saved_debounced, shift_click_mentions_instead.
  • tests/report_flow.rs: report_walk_option_outcomes, report_checklist_min_checked_and_item_ids, report_info_screen_next, report_end_outcome_shows_notice, report_link_outcome_opens_url, report_back, report_submit_steps_revision_hash_locale, report_unknown_outcome_falls_back, report_done_offers_block. They run over the Daily use 2 fixture fixtures/rest/report_flow_message.json; the info-screen and broken-flow variants are edited copies made inside the tests.
  • I saw the tests fail first (separate commit), then pass.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci passes locally. There are no desktop or real-display tests in this task, and no screenshots (core only).

Deviations from the plan, for review

  • report_modal and the report view types live in fluxer_core::report, not in selectors, to stay inside this task's file list.
  • ReportAction::OpenLink opens the summary's "community guidelines" link. Link options open through Choose, as the original's option list does.
  • There are no new ProfileAnchor variants. The anchor is the clicked bounds and already works for mentions, reply authors, voice participants and avatar stacks. profiles::user_click is what every trigger emits, so the UI tasks (38) get Shift+click from one place.
  • Outside the file list:
    • app.rs: report::reduce now takes a ReportCtx (me, session, channels, messages, social) and its follow-up events are applied.
    • tests/dailyuse_ports.rs: the 11a/11b "stub does nothing" tests now skip Report, OpenProfileModal and SaveNote, as Daily use 12 and 14 did for theirs.
  • Notes are fetched per user when the modal opens (spec §3.10). The native ReadyPayload does not carry the original's READY notes map.
  • 12/24 h when time_format is auto uses a short list of 12-hour locales in place of Intl (en-US default). Voice activity is a plain list, without the "And n other calls" grouping.
  • message_link for resolveLinkUrl is a 10-line copy of chat::actions::link, so this task does not edit chat/actions.rs, which unmerged tasks own.

Closes #511

🤖 Generated with Claude Code

Stacked on: dailyuse-11b-core-state-skeleton, dailyuse-14-core-status-idle-presence ## What this builds (spec §3.10, §3.12, §17 Q14) **Profiles** (`profiles.rs`, `selectors/profile.rs`) - `OpenProfileModal { user_id, guild_id, tab }` opens `app.profiles.modal` and closes the popout. It fetches the profile the same way as the popout (the runtime adds the mutual flags) and fetches the note once per user per session (`FetchUserNote`). `CloseProfileModal`, `MessageUser` and `OpenSettings` close the modal. - Notes: `ApiResult::UserNote`/`UserNotes` and `USER_NOTE_UPDATE` fill `profiles.notes`. `SaveNote` writes `PUT` only when the text differs from what is shown (at most 256 characters, `null` when emptied), as `UserNoteEditor.tsx`. The new note shows at once and the old one comes back if the write fails. - While a shown profile has a `timezone_offset`, a timer runs every 30 s (`LOCAL_TIME_REFRESH`) so the local time stays current. - `profiles::user_click(user, guild, anchor, shift_only)`: Shift alone sends `MentionUser`, anything else sends `OpenProfile` (`PreloadableUserPopout.tsx:83-90`). - `ProfilePopout` gains: - `badges`: `{static_cdn}/badges/{asset}.webp`, else `{asset_url}?size=96`, plus label, caption, href and aspect ratio - `voice_activity` - `local_time { text, relative }`: "2:05 PM" or "14:05" from `time_format`, else the locale; "Same time as you", "2 hours ahead of you", "5 hours 30 minutes behind you" - `connections`: bsky and domain URLs - `view_full_profile(&popout)` returns the action for "View full profile". - `profile_modal(&App) -> ProfileModalModel`: - tabs: "Overview", "Mutual friends (n)" (not for bots), and "Mutual communities|groups|places (n)" depending on what is shared (group DMs plus known mutual guilds) - overview: voice activity, local time, member since, roles, connections, and the note ("Note", "Click to add a note") - the empty-tab texts **Report flow** (`report.rs`): a port of `ReportFlowWalk.ts` and `ReportFlowModal.tsx` - Fetch `message?surface=in_app&locale=` and start at `start_screen_id`. - Outcomes: `screen`, `submit` (leads to the summary), `end` (shows the notice, or "Thanks for flagging this" with the long or short text), and `link` (`Effect::OpenUrl`, http(s) only; a `/report` page gets `type=message&message_link=`, as `resolveLinkUrl`). - Checklists unlock Next at `min_checked`, and their item ids are sent in checklist order. Info screens have Next, and only their link options can be chosen. - Back pops a step and restores its ticks. - The submission sends `revision_hash`, `locale` and the steps. - Submit failures are mapped as `describeSubmitFailure`. `CONFLICT` ends with Done. `REPORT_FLOW_OUTDATED` and `INVALID_REPORT_FLOW_ANSWERS` refetch and restart with "The report form changed. Please start again." - The "Report sent" screen offers "Block {name}" ("Blocked" once done). `BlockAuthor` sends the menus' `Friend { Block, Menu, confirmed: false }`, so it asks for confirmation as the original does. - Legacy fallback (Q14): if the flow doesn't parse (or the endpoint returns 404/405), a screen is missing, or an outcome type is unknown, the client switches to the legacy `POST /reports/message {category: "other"}`. It goes through the same "Check your report" summary, so the user still confirms. Back returns to the walk. - `report_modal(&App) -> ReportModalModel` covers title, subtitle, body, urgent banner, footer buttons and flash. `block_action(&App)` is also provided. ## Tests - `tests/profile_full.rs`: `tabs_and_counts_bot_has_no_mutual_friends`, `mutual_label_by_kind`, `local_time_ahead_behind_same`, `local_time_refresh_scheduled`, `badges_from_profile`, `note_loaded_and_saved_debounced`, `shift_click_mentions_instead`. - `tests/report_flow.rs`: `report_walk_option_outcomes`, `report_checklist_min_checked_and_item_ids`, `report_info_screen_next`, `report_end_outcome_shows_notice`, `report_link_outcome_opens_url`, `report_back`, `report_submit_steps_revision_hash_locale`, `report_unknown_outcome_falls_back`, `report_done_offers_block`. They run over the Daily use 2 fixture `fixtures/rest/report_flow_message.json`; the info-screen and broken-flow variants are edited copies made inside the tests. - I saw the tests fail first (separate commit), then pass. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` passes locally. There are no desktop or real-display tests in this task, and no screenshots (core only). ## Deviations from the plan, for review - `report_modal` and the report view types live in `fluxer_core::report`, not in `selectors`, to stay inside this task's file list. - `ReportAction::OpenLink` opens the summary's "community guidelines" link. Link options open through `Choose`, as the original's option list does. - There are no new `ProfileAnchor` variants. The anchor is the clicked bounds and already works for mentions, reply authors, voice participants and avatar stacks. `profiles::user_click` is what every trigger emits, so the UI tasks (38) get Shift+click from one place. - Outside the file list: - `app.rs`: `report::reduce` now takes a `ReportCtx` (me, session, channels, messages, social) and its follow-up events are applied. - `tests/dailyuse_ports.rs`: the 11a/11b "stub does nothing" tests now skip `Report`, `OpenProfileModal` and `SaveNote`, as Daily use 12 and 14 did for theirs. - Notes are fetched per user when the modal opens (spec §3.10). The native `ReadyPayload` does not carry the original's READY `notes` map. - 12/24 h when `time_format` is auto uses a short list of 12-hour locales in place of `Intl` (`en-US` default). Voice activity is a plain list, without the "And n other calls" grouping. - `message_link` for `resolveLinkUrl` is a 10-line copy of `chat::actions::link`, so this task does not edit `chat/actions.rs`, which unmerged tasks own. Closes #511 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every UserAction, CoreEvent, Effect, ApiRequest/ApiResult and chat::Confirm
variant of the Daily use plan (Task 11a), plus the menu types (menus::MenuModel,
MenuItem, MenuItemKind, MenuItemId, MenuModel::flatten). New actions and events
do nothing yet; the runtime answers each new request with 501 CLIENT_NOT_WIRED
and logs Effect::Window until Daily use 28. MessageUser and CloseDm take a
confirmed flag and act as before; Notification gains icon (always None).

Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #496

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
New domains notif_settings, social, invites, switcher, keynav and report with
their state, Default and stub reducers wired into App::apply; stub menu
builders (channel, category, guild, user, dm, mute::item); OwnPresence, profile
notes and modal state. Relationships move from chat::dms to app.social and are
read through social::relationship.

Refs #496

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings from READY, USER_GUILD_SETTINGS_UPDATE and the patch answers;
immediate menu mutes (guild scalars, whole channel_overrides map for
channels, categories and DMs in @me), mute_config in ms, local expiry
timers, 3 s debounced modal changes, revert on failure, selectors
is_muted / muted_until / level / guild_settings_modal, and the shared
mute menu row (MuteTargetMenuItem.tsx, MuteOptions.ts,
UserGuildSettings.ts, UserGuildSettingsCommands.ts).

Refs #497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
format_date_time shifted the end with to_offset, which panics when the
local date leaves year 9999 (a 9999-12-31T23:30Z end read east of UTC).
It now uses checked_to_offset and falls back to UTC. The
event_replaces_guild_settings test now checks the staff override is
really gone instead of an always-true assertion.

Refs #497

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Table tests for the notification decision (Notification.ts:187-256) and
tests for mute consumers: unread, guild pill, hide muted channels, DM
mentions. Stubs for SidebarSection.{category_muted,muted} and
notif_settings::hides_muted_channels so the tests compile.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- notif_settings::mentions_me as MessageUtils.isMentioned and
  Notification.isMessageMentionLike: blocked author no, user mention,
  @everyone unless suppressed or in an unjoined thread, own role unless
  suppressed, unmuted DM.
- notification_for follows Notification.ts:187-256: own, blocked, DND,
  SUPPRESS_NOTIFICATIONS, then thread levels (member level, parent level,
  forum new-post level, else only mentions) or mute at any level and the
  effective level.
- read_state::unread is false for a muted channel (mention counts kept);
  has_unread_messages keeps the raw answer for the new-messages bar and
  the thread menu's Mark as read.
- channel_tree: category_muted and muted rows; hide muted channels per
  guild (default_hide_muted_channels without an entry), unless selected,
  connected or with a mention; all-hidden categories hidden.
- DmRowModel.muted from the @me override; a thread is muted by its
  membership or its parent at any level.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #499

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Own presence from the user settings; SetStatus / SetCustomStatus write only
their fields (optimistic, reverted on failure); reset timer; idle and afk
from CoreEvent::Idle; op 3 whenever the computed presence changes; status
popout, custom status modal and custom status selectors.

Refs #499

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed reset PATCH was re-sent at once by the same refresh, with no
limit (a request storm while offline or on 4xx/429). Remember the reset
whose write failed and skip it until READY, USER_SETTINGS_UPDATE or a
patch answer brings new settings, as StatusExpiry.handleExpiry does not
retry. The custom status test now asserts the profile popout exists.

Refs #499

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Tests of Daily use 23: profile modal tabs and counts, the mutual tab's
label, local time, its 30 s refresh, badges, notes, Shift+click, and the
report flow's walk (options, checklists, info screens, notices, links,
Back, submission, legacy fallback, the Block offer). The report flow
fixture is fixtures/rest/report_flow_message.json (Daily use 2, shaped
like packages/schema/src/domains/report/ReportFlowSchemas.ts:66-149).

Refs #511

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The full profile modal (tabs "Overview", "Mutual friends (n)" except
for bots, "Mutual communities|groups|places (n)"; overview with voice
activity, local time, member since, roles, connections and the note),
the popout's badges, voice activity, local time (12/24 h, ahead/behind,
redrawn every 30 s) and connections, notes (fetched once per user,
USER_NOTE_UPDATE, SaveNote written only on change), Shift+click
mentions (profiles::user_click), and the report flow over the server's
screens as ReportFlowWalk.ts with the legacy fallback of spec Q14.

Refs #511

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

Independent review: Daily use 23 (fac6649..1b3fca5)

Local gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a clean review worktree: all steps passed (EXIT=0).

Checks

  1. Tests: all 16 tests the plan names exist in tests/profile_full.rs and tests/report_flow.rs and assert the spec's values: tabs and the bot rule, the communities/groups/places labels, ahead/behind/same with "2 hours", "5 hours 30 minutes" and "1 hour 1 minute", the 30 s Effect::Schedule, badge URLs, note GET/PUT/null/256 and USER_NOTE_UPDATE, Shift+click, every outcome kind, checklist min_checked and item order, the info screen's Next, Back, the submission body with revision_hash and locale, the Q14 fallbacks and "Block {name}".
  2. Interfaces: profile_modal, ProfileModalModel, ProfilePopout.{badges, custom_status, voice_activity, local_time, connections}, LocalTime { text, relative }, view_full_profile, report_modal/ReportModalModel and every ReportAction arm are present. Deviations accepted: report_modal lives in fluxer_core::report, and there are no new ProfileAnchor variants (ProfileAnchor is a bounds struct; profiles::user_click covers every trigger).
  3. Invariants: fluxer-core gains no iced/wgpu/winit/reqwest/tungstenite import and does no I/O. No new fixtures. The time maths is checked (checked_add, unsigned_abs) and the server's aspect ratio is filtered to finite and positive. Link outcomes open http/https only. No secrets.
  4. Parity, checked against the fork:
    • ReportFlowWalk.ts (applyOutcome, info, checklist, back, answer labels): matches.
    • describeSubmitFailure/isTerminalSubmitFailure: matches, including CONFLICT ending in Done, 429/RATE_LIMITED, server text for the REPORT_* and CANNOT_REPORT_* codes, and a restart on REPORT_FLOW_OUTDATED/INVALID_REPORT_FLOW_ANSWERS.
    • ReportFlowCommands.ts: the submission uses flow.locale.
    • ReportFlowCopy.ts: the strings match.
    • getMutualItemsDescriptor: matches.
    • profileBadgeImageUrl, getConnectionUrl, formatOffsetDifferenceDuration and openExternalUrl (no warning modal): match.
  5. Reviewer asks:
    • The submit-failure mapping is correct (point 4).
    • Back from the legacy summary returns to the walk when the walk stopped on a real screen: an unknown outcome or a missing target goes back to the screen where the option was chosen, with its ticks kept. When the flow never parsed, Back is hidden. Tested in report_unknown_outcome_falls_back.

Findings

  • minor: getReportedUser returns null for webhook messages (ReportFlowModal.tsx), so the original never offers "Block {name}" for them. The native Message has no webhook_id, so a webhook message's author is offered. Follow-up: once proto carries webhook_id, exclude those authors.
  • minor: Auto 12/24 h uses a short list of locales (locale_uses_12_hour). A bare en locale reads as 24 h, but Intl gives 12 h. Accessibility's "use the browser locale for time format" is also not consulted. Settings default to en-US and an explicit time_format wins, so few users are affected.
  • minor: The viewer's offset is the system offset read when settings load (LocalSettings::utc_offset_minutes). The original reads new Date().getTimezoneOffset() on every render, so the native "ahead/behind" text can be an hour off after a DST change until restart.
  • minor: A GET /users/@me/notes/{id} answer that arrives after a SaveNote replaces the note the user just typed on screen. The PUT still goes out, so no data is lost.
  • minor (test gap): report_done_offers_block checks that BlockAuthor keeps the report open but not that the block confirm is raised.

None of these breaks an interface, an invariant or data, and none leaves CI red.

Verdict: APPROVED (0 blocking findings, local CI green).

## Independent review: Daily use 23 (fac6649..1b3fca5) **Local gate:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a clean review worktree: **all steps passed** (EXIT=0). **Checks** 1. Tests: all 16 tests the plan names exist in `tests/profile_full.rs` and `tests/report_flow.rs` and assert the spec's values: tabs and the bot rule, the communities/groups/places labels, ahead/behind/same with "2 hours", "5 hours 30 minutes" and "1 hour 1 minute", the 30 s `Effect::Schedule`, badge URLs, note GET/PUT/null/256 and USER_NOTE_UPDATE, Shift+click, every outcome kind, checklist `min_checked` and item order, the info screen's Next, Back, the submission body with revision_hash and locale, the Q14 fallbacks and "Block {name}". 2. Interfaces: `profile_modal`, `ProfileModalModel`, `ProfilePopout.{badges, custom_status, voice_activity, local_time, connections}`, `LocalTime { text, relative }`, `view_full_profile`, `report_modal`/`ReportModalModel` and every `ReportAction` arm are present. Deviations accepted: `report_modal` lives in `fluxer_core::report`, and there are no new `ProfileAnchor` variants (`ProfileAnchor` is a bounds struct; `profiles::user_click` covers every trigger). 3. Invariants: fluxer-core gains no iced/wgpu/winit/reqwest/tungstenite import and does no I/O. No new fixtures. The time maths is checked (`checked_add`, `unsigned_abs`) and the server's aspect ratio is filtered to finite and positive. Link outcomes open http/https only. No secrets. 4. Parity, checked against the fork: - `ReportFlowWalk.ts` (applyOutcome, info, checklist, back, answer labels): matches. - `describeSubmitFailure`/`isTerminalSubmitFailure`: matches, including CONFLICT ending in Done, 429/RATE_LIMITED, server text for the REPORT_* and CANNOT_REPORT_* codes, and a restart on REPORT_FLOW_OUTDATED/INVALID_REPORT_FLOW_ANSWERS. - `ReportFlowCommands.ts`: the submission uses `flow.locale`. - `ReportFlowCopy.ts`: the strings match. - `getMutualItemsDescriptor`: matches. - `profileBadgeImageUrl`, `getConnectionUrl`, `formatOffsetDifferenceDuration` and `openExternalUrl` (no warning modal): match. 5. Reviewer asks: - The submit-failure mapping is correct (point 4). - Back from the legacy summary returns to the walk when the walk stopped on a real screen: an unknown outcome or a missing target goes back to the screen where the option was chosen, with its ticks kept. When the flow never parsed, Back is hidden. Tested in `report_unknown_outcome_falls_back`. **Findings** - **minor**: `getReportedUser` returns null for webhook messages (`ReportFlowModal.tsx`), so the original never offers "Block {name}" for them. The native `Message` has no `webhook_id`, so a webhook message's author is offered. Follow-up: once proto carries `webhook_id`, exclude those authors. - **minor**: Auto 12/24 h uses a short list of locales (`locale_uses_12_hour`). A bare `en` locale reads as 24 h, but Intl gives 12 h. Accessibility's "use the browser locale for time format" is also not consulted. Settings default to en-US and an explicit `time_format` wins, so few users are affected. - **minor**: The viewer's offset is the system offset read when settings load (`LocalSettings::utc_offset_minutes`). The original reads `new Date().getTimezoneOffset()` on every render, so the native "ahead/behind" text can be an hour off after a DST change until restart. - **minor**: A `GET /users/@me/notes/{id}` answer that arrives after a `SaveNote` replaces the note the user just typed on screen. The PUT still goes out, so no data is lost. - **minor (test gap)**: `report_done_offers_block` checks that `BlockAuthor` keeps the report open but not that the block confirm is raised. None of these breaks an interface, an invariant or data, and none leaves CI red. **Verdict: APPROVED** (0 blocking findings, local CI green).
Author
Owner

Independent review: Daily use 23 (full profile, popout details, report flow)

Scope: git diff fac6649..origin/dailyuse-23-core-profile-report-flow at 1b3fca5.

Local gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci passed in a fresh review worktree. Every step passed: ffmpeg, fmt, clippy, deny, core-isolation, parity, test, vendored-tests, screenshot-tests and livekit-interop.

What I checked

  1. Tests. All 16 tests the plan names exist, 7 in tests/profile_full.rs and 9 in tests/report_flow.rs. They assert the spec's values: the tab labels, "Same time as you" and "{d} ahead of you" / "{d} behind you", the 30 s Effect::Schedule, the badge URLs, the note fetch/PUT/null/256 and USER_NOTE_UPDATE, Shift+click producing MentionUser, the screen, submit, end, link, checklist (min_checked, item ids in the checklist's order) and info outcomes, Back restoring ticks, the submission carrying revision_hash, locale and the steps, the legacy fallback with category: "other", and "Block {name}" / "Blocked". The tests reuse the existing fixtures (user_profile.json, report_flow_message.json) and add no new ones.
  2. Interfaces. ReportAction is handled in full. report_modal, profile_modal, the popout's badges, custom_status, voice_activity and local_time { text, relative }, view_full_profile, SaveNote and user_click are all present. The deviations listed in the PR body are acceptable (details below).
  3. Invariants. fluxer-core does no I/O and gains no forbidden crate (url was already a dependency). There is no indexing or unwrap on server data: offsets use checked_add, durations use unsigned_abs, and badge ratios are filtered to finite positive values. Logs carry no secrets, and no settings are written.
  4. Parity spot-checks against the fork:
    • ReportFlowWalk.ts: applyOutcome, the info-screen step {screen_id}, the checklist item order, back restoring drafts, and answer labels all match.
    • ReportFlowModal.tsx: getReportedUser/blockTarget is decided once at open, and links go through openExternalUrl directly with resolveLinkUrl. Both match.
    • ReportFlowCopy.ts: the strings match, including "Your options".
    • UserProfileShared.tsx:79-97,213-262: offset minus the viewer's offset, the hours/minutes plurals, and the 30 s interval all match.
    • MutualItemsDescriptors.ts: the communities/groups/places choice matches.
    • ProfileUtils.ts:56-64: the badge URLs match.
    • UserNoteEditor.tsx: maxLength 256 and save on blur match.
  5. Review Focus 7 (unknown outcome types never panic): an Unknown outcome, a missing screen, a missing start screen, a Decode error and a 404/405 all fall back to the legacy report. A network failure shows "Couldn't load the report form." with Try again.

Findings

  • minor: report.rs ReportFlowState::open offers "Block {name}" on webhook messages. The original's getReportedUser returns null for message.webhookId, but the native Message has no webhook_id field, so the check cannot be made. Follow-up candidate: the proto would need the field.
  • minor: profiles.rs: note_fetches is only cleaned on failure. A successful UserNote answer leaves its entry behind, so the map grows by one entry per user per session. It is bounded and harmless.
  • minor: profiles.rs notes race. If a SaveNote happens while the first FetchUserNote is still in flight, the fetch answer can overwrite the note just saved in the view (the server still holds the saved text). If a write fails after a USER_NOTE_UPDATE, the revert puts the older text back. These are rare edge cases.
  • minor (interface shape): the plan writes the tabs as [Overview, MutualFriends(n), MutualPlaces(label, n)]. The branch uses ProfileTabItem { tab, label } with the count inside the label. report_modal returns Option<ReportModalModel> and lives in fluxer_core::report. ProfileAnchor stays a bounds struct, so every trigger can use it and no new variants are needed. All of this is noted in the PR body. Task 38/39 should build against these names.
  • minor: submit cuts the steps at 16 and the item ids at 32 without telling the user. The original sends everything and lets the server refuse. Real flows cannot get that deep.

No blocking findings.

Verdict: approve. CI is green locally (with screenshots), and there are no blocking findings.

## Independent review: Daily use 23 (full profile, popout details, report flow) Scope: `git diff fac6649..origin/dailyuse-23-core-profile-report-flow` at 1b3fca5. **Local gate:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` passed in a fresh review worktree. Every step passed: ffmpeg, fmt, clippy, deny, core-isolation, parity, test, vendored-tests, screenshot-tests and livekit-interop. ### What I checked 1. **Tests.** All 16 tests the plan names exist, 7 in `tests/profile_full.rs` and 9 in `tests/report_flow.rs`. They assert the spec's values: the tab labels, "Same time as you" and "{d} ahead of you" / "{d} behind you", the 30 s `Effect::Schedule`, the badge URLs, the note fetch/PUT/null/256 and `USER_NOTE_UPDATE`, Shift+click producing `MentionUser`, the screen, submit, end, link, checklist (`min_checked`, item ids in the checklist's order) and info outcomes, Back restoring ticks, the submission carrying `revision_hash`, `locale` and the steps, the legacy fallback with `category: "other"`, and "Block {name}" / "Blocked". The tests reuse the existing fixtures (`user_profile.json`, `report_flow_message.json`) and add no new ones. 2. **Interfaces.** `ReportAction` is handled in full. `report_modal`, `profile_modal`, the popout's `badges`, `custom_status`, `voice_activity` and `local_time { text, relative }`, `view_full_profile`, `SaveNote` and `user_click` are all present. The deviations listed in the PR body are acceptable (details below). 3. **Invariants.** fluxer-core does no I/O and gains no forbidden crate (`url` was already a dependency). There is no indexing or unwrap on server data: offsets use `checked_add`, durations use `unsigned_abs`, and badge ratios are filtered to finite positive values. Logs carry no secrets, and no settings are written. 4. **Parity spot-checks against the fork:** - `ReportFlowWalk.ts`: applyOutcome, the info-screen step `{screen_id}`, the checklist item order, back restoring drafts, and answer labels all match. - `ReportFlowModal.tsx`: `getReportedUser`/`blockTarget` is decided once at open, and links go through `openExternalUrl` directly with `resolveLinkUrl`. Both match. - `ReportFlowCopy.ts`: the strings match, including "Your options". - `UserProfileShared.tsx:79-97,213-262`: offset minus the viewer's offset, the hours/minutes plurals, and the 30 s interval all match. - `MutualItemsDescriptors.ts`: the communities/groups/places choice matches. - `ProfileUtils.ts:56-64`: the badge URLs match. - `UserNoteEditor.tsx`: `maxLength` 256 and save on blur match. 5. **Review Focus 7** (unknown outcome types never panic): an `Unknown` outcome, a missing screen, a missing start screen, a Decode error and a 404/405 all fall back to the legacy report. A network failure shows "Couldn't load the report form." with Try again. ### Findings - **minor:** `report.rs` `ReportFlowState::open` offers "Block {name}" on webhook messages. The original's `getReportedUser` returns null for `message.webhookId`, but the native `Message` has no `webhook_id` field, so the check cannot be made. Follow-up candidate: the proto would need the field. - **minor:** `profiles.rs`: `note_fetches` is only cleaned on failure. A successful `UserNote` answer leaves its entry behind, so the map grows by one entry per user per session. It is bounded and harmless. - **minor:** `profiles.rs` notes race. If a `SaveNote` happens while the first `FetchUserNote` is still in flight, the fetch answer can overwrite the note just saved in the view (the server still holds the saved text). If a write fails after a `USER_NOTE_UPDATE`, the revert puts the older text back. These are rare edge cases. - **minor (interface shape):** the plan writes the tabs as `[Overview, MutualFriends(n), MutualPlaces(label, n)]`. The branch uses `ProfileTabItem { tab, label }` with the count inside the label. `report_modal` returns `Option<ReportModalModel>` and lives in `fluxer_core::report`. `ProfileAnchor` stays a bounds struct, so every trigger can use it and no new variants are needed. All of this is noted in the PR body. Task 38/39 should build against these names. - **minor:** `submit` cuts the steps at 16 and the item ids at 32 without telling the user. The original sends everything and lets the server refuse. Real flows cannot get that deep. No blocking findings. **Verdict: approve.** CI is green locally (with screenshots), and there are no blocking findings.
Author
Owner

Merged into dailyuse at f7972c3 (combined merge of 23 Daily use tasks plus textchat).

Merged into `dailyuse` at f7972c3 (combined merge of 23 Daily use tasks plus `textchat`).
charles closed this pull request 2026-11-15 06:08:41 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.