Daily use 37c: "Trust all external links" and the synced hide-muted default (#529) #565

Closed
charles wants to merge 0 commits from dailyuse-37c-ui-trust-links-hide-muted into dailyuse
Owner

Stacked on: dailyuse-22c-core-trusted-domains-hide-muted

What

Advanced → Chat (crates/fluxer-ui/src/screens/settings/advanced_chat.rs):

  • "Trust all external links" ("Skip the external link warning for all domains"), placed after "Strip tracking parameters from URLs" as in the fork's ChatSettingsIndex.ts (Search engines / Translators / Reverse image search stay omitted). On when the account's synced trusted domains hold * (fluxer_core::chat::links::trusts_all_links, Daily use 22c). Turning it either way asks first, as TrustAllExternalLinksControl (chat_settings_tab/ChatSettingsTabLinksTab.tsx:33-95): "Trust all external links?" / red "Trust all" / Cancel, and "Stop trusting all links?" / "Disable trust all" / Cancel. The answer is SetChatSetting(TrustAllLinks(on)), which 22c writes as ["*"] or [].
  • "Hide muted channels by default" bound to the synced default_hide_muted_channels, asking first as HideMutedChannelsByDefaultControl (AdvancedChatControls.tsx:645-722): "Hide muted channels by default?" with "Apply to all communities" / "New communities only", and "Stop hiding muted channels by default?" with "Show in all communities" / "New communities only". The answer is UserAction::SetDefaultHideMutedChannels { hide, apply_to_all }. Closing the dialog (Escape, backdrop) changes nothing, as the original.
  • New API: advanced_chat::{Confirm, ConfirmModel, Choice, toggled, confirm_over}, Message::{Ask, Answer, Dismiss}; settings::State::chat_confirm. The header comment is updated.
  • The dialog uses the message actions' confirm look (message_actions::confirm::{WIDTH, title, card_style, backdrop_over}) with a configurable secondary button. It does not touch confirm.rs, which Task 33 generalises.

Tests

  • crates/fluxer-ui/tests/settings_chat.rs: trust_all_switch_binds, hide_muted_default_confirm_choices. parity_check_passes now expects chat-settings-trust-domains to be done.
  • Golden settings_advanced_chat redrawn on lavapipe (the fluxer-native-shots:u2204 image, Ubuntu 22.04 Mesa), using UPDATE_GOLDEN=1. The new row shows in it. The hide-muted row is below the 720 px frame, as before.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally. No FLUXER_DESKTOP_TESTS tests apply.
  • Base: the merged 22c branch was green under cargo xtask ci before any change.

Deviations

  • The plan's Files list names only advanced_chat.rs. The open dialog needs a field in the settings screen's State, so screens/settings/mod.rs changes by 11 lines: the field, two apply_local arms, and one overlay in view_with. Escape is taken by the dialog's own on_escape, so app.rs is unchanged.
  • Parity docs: docs/parity/settings.toml (chat-settings-trust-domains → done) and the docs/parity/textchat.md row for #417 are updated.
  • The plan names only the hide-muted confirm. The original also confirms the trust-all switch both ways, so that confirm is built too.

Closes #529
Closes #417

🤖 Generated with Claude Code

Stacked on: dailyuse-22c-core-trusted-domains-hide-muted ## What Advanced → Chat (`crates/fluxer-ui/src/screens/settings/advanced_chat.rs`): - **"Trust all external links"** ("Skip the external link warning for all domains"), placed after "Strip tracking parameters from URLs" as in the fork's `ChatSettingsIndex.ts` (Search engines / Translators / Reverse image search stay omitted). On when the account's synced trusted domains hold `*` (`fluxer_core::chat::links::trusts_all_links`, Daily use 22c). Turning it either way asks first, as `TrustAllExternalLinksControl` (`chat_settings_tab/ChatSettingsTabLinksTab.tsx:33-95`): "Trust all external links?" / red "Trust all" / Cancel, and "Stop trusting all links?" / "Disable trust all" / Cancel. The answer is `SetChatSetting(TrustAllLinks(on))`, which 22c writes as `["*"]` or `[]`. - **"Hide muted channels by default"** bound to the synced `default_hide_muted_channels`, asking first as `HideMutedChannelsByDefaultControl` (`AdvancedChatControls.tsx:645-722`): "Hide muted channels by default?" with "Apply to all communities" / "New communities only", and "Stop hiding muted channels by default?" with "Show in all communities" / "New communities only". The answer is `UserAction::SetDefaultHideMutedChannels { hide, apply_to_all }`. Closing the dialog (Escape, backdrop) changes nothing, as the original. - New API: `advanced_chat::{Confirm, ConfirmModel, Choice, toggled, confirm_over}`, `Message::{Ask, Answer, Dismiss}`; `settings::State::chat_confirm`. The header comment is updated. - The dialog uses the message actions' confirm look (`message_actions::confirm::{WIDTH, title, card_style, backdrop_over}`) with a configurable secondary button. It does not touch `confirm.rs`, which Task 33 generalises. ## Tests - `crates/fluxer-ui/tests/settings_chat.rs`: `trust_all_switch_binds`, `hide_muted_default_confirm_choices`. `parity_check_passes` now expects `chat-settings-trust-domains` to be done. - Golden `settings_advanced_chat` redrawn on lavapipe (the `fluxer-native-shots:u2204` image, Ubuntu 22.04 Mesa), using `UPDATE_GOLDEN=1`. The new row shows in it. The hide-muted row is below the 720 px frame, as before. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally. No `FLUXER_DESKTOP_TESTS` tests apply. - Base: the merged 22c branch was green under `cargo xtask ci` before any change. ## Deviations - The plan's Files list names only `advanced_chat.rs`. The open dialog needs a field in the settings screen's `State`, so `screens/settings/mod.rs` changes by 11 lines: the field, two `apply_local` arms, and one overlay in `view_with`. Escape is taken by the dialog's own `on_escape`, so `app.rs` is unchanged. - Parity docs: `docs/parity/settings.toml` (`chat-settings-trust-domains` → done) and the `docs/parity/textchat.md` row for #417 are updated. - The plan names only the hide-muted confirm. The original also confirms the trust-all switch both ways, so that confirm is built too. Closes #529 Closes #417 🤖 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>
Fixtures used: fixtures/rest/invite_guild.json, invite_group_dm.json (shaped as
fork:packages/schema/src/domains/invite/InviteSchemas.ts:42-91, Daily use 2).

Refs #501

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

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trusted domains are the account's user_settings.trusted_domains, written
whole with PATCH /users/@me/settings; the local list of an earlier version
is merged once on READY and dropped from the settings file. "Hide muted
channels by default" is the synced default_hide_muted_channels;
SetDefaultHideMutedChannels with apply_to_all sets every guild through
SetHideMutedChannels (AdvancedChatControls.tsx:650-710).

Refs #510

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Advanced → Chat gains "Trust all external links" after "Strip tracking
parameters from URLs" (ChatSettingsIndex.ts order), on when the account's
synced trusted domains hold "*"; turning it on or off asks first with the
original's dialogs (ChatSettingsTabLinksTab.tsx:33-95). "Hide muted channels
by default" is bound to the synced default_hide_muted_channels and asks
"Apply to all communities" / "Show in all communities" or "New communities
only" (AdvancedChatControls.tsx:645-722), answered with
SetDefaultHideMutedChannels { hide, apply_to_all }. Golden
settings_advanced_chat redrawn on lavapipe.

Refs #529

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

Independent review: Daily use 37c (diff 26de473..847893b)

Verdict: approved. No blocking findings. Local FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci passed in a fresh review worktree (exit 0). trust_all_switch_binds, hide_muted_default_confirm_choices and settings_advanced_chat_matches_golden all pass.

What I checked

  1. Tests: both tests the plan names exist.
    • trust_all_switch_binds checks four things. The row comes right after "Strip tracking parameters from URLs" and has the original's description. Turning the switch either way opens a dialog first. Cancel and Dismiss send nothing. "Trust all" writes ["*"], and "Disable trust all" writes [].
    • hide_muted_default_confirm_choices covers all four (hide × choice) answers, checks that each becomes SetDefaultHideMutedChannels { hide, apply_to_all }, and checks that closing the dialog changes nothing.
    • Golden settings_advanced_chat was redrawn.
  2. Interfaces: the trust switch goes through SetChatSetting(ChatSettingChange::TrustAllLinks). Daily use 22c's links.rs handles that by writing "*" or removing it, with no new action. The hide-muted switch sends SetDefaultHideMutedChannels { hide, apply_to_all } only after the dialog is answered. These match the Produces line.
  3. Invariants:
    • fluxer-ui adds no I/O. It reuses the pub(crate) helpers of message_actions::confirm and leaves confirm.rs, which Task 33 owns, untouched.
    • The change adds no fixtures and no secrets.
    • The parity docs are updated, and parity_check_passes moves chat-settings-trust-domains to done.
  4. Parity, checked against fluxer-soundboard:
    • The titles, bodies and button labels of all four dialogs match ChatSettingsTabLinksTab.tsx:33-95 and AdvancedChatControls.tsx:645-722.
    • "Trust all" is red (primaryVariant="danger"), and "Disable trust all" is not.
    • The hide-muted secondary button is "New communities only", which maps to onSecondary, so the default is written without applying it to every community.
    • The trust-all dialog has only the default Cancel as its secondary button.
    • The row description "Skip the external link warning for all domains" matches ChatSettingsIndex.ts:556-568.
  5. Review Focus #1 (trusted domains merged, never replaced): "Trust all" replaces the list with ["*"]. That follows the original's setTrustAllDomains and its own wording ("Your existing trusted domains will be replaced"), so it is correct.

Findings

  • minor: hide_muted_default_confirm_choices only asserts patches(&effects) >= 1. It does not check that apply_to_all: true also writes hide_muted_channels for each community. The core test default_hide_muted_apply_to_all_follow_ups (22c) covers that, so this is coverage depth only.
  • minor: screens/settings/mod.rs is outside the task's Files list (11 lines: a State field, two apply_local arms and one overlay). It is needed to open the dialog, and no unmerged task owns that file, so it is accepted as recorded.

Verdict: APPROVED (0 blocking, 2 minor).

## Independent review: Daily use 37c (diff 26de473..847893b) **Verdict: approved.** No blocking findings. Local `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` passed in a fresh review worktree (exit 0). `trust_all_switch_binds`, `hide_muted_default_confirm_choices` and `settings_advanced_chat_matches_golden` all pass. **What I checked** 1. **Tests:** both tests the plan names exist. - `trust_all_switch_binds` checks four things. The row comes right after "Strip tracking parameters from URLs" and has the original's description. Turning the switch either way opens a dialog first. Cancel and Dismiss send nothing. "Trust all" writes `["*"]`, and "Disable trust all" writes `[]`. - `hide_muted_default_confirm_choices` covers all four (hide × choice) answers, checks that each becomes `SetDefaultHideMutedChannels { hide, apply_to_all }`, and checks that closing the dialog changes nothing. - Golden `settings_advanced_chat` was redrawn. 2. **Interfaces:** the trust switch goes through `SetChatSetting(ChatSettingChange::TrustAllLinks)`. Daily use 22c's `links.rs` handles that by writing `"*"` or removing it, with no new action. The hide-muted switch sends `SetDefaultHideMutedChannels { hide, apply_to_all }` only after the dialog is answered. These match the Produces line. 3. **Invariants:** - fluxer-ui adds no I/O. It reuses the `pub(crate)` helpers of `message_actions::confirm` and leaves `confirm.rs`, which Task 33 owns, untouched. - The change adds no fixtures and no secrets. - The parity docs are updated, and `parity_check_passes` moves `chat-settings-trust-domains` to done. 4. **Parity**, checked against fluxer-soundboard: - The titles, bodies and button labels of all four dialogs match `ChatSettingsTabLinksTab.tsx:33-95` and `AdvancedChatControls.tsx:645-722`. - "Trust all" is red (`primaryVariant="danger"`), and "Disable trust all" is not. - The hide-muted secondary button is "New communities only", which maps to `onSecondary`, so the default is written without applying it to every community. - The trust-all dialog has only the default Cancel as its secondary button. - The row description "Skip the external link warning for all domains" matches `ChatSettingsIndex.ts:556-568`. 5. **Review Focus #1** (trusted domains merged, never replaced): "Trust all" replaces the list with `["*"]`. That follows the original's `setTrustAllDomains` and its own wording ("Your existing trusted domains will be replaced"), so it is correct. **Findings** - *minor:* `hide_muted_default_confirm_choices` only asserts `patches(&effects) >= 1`. It does not check that `apply_to_all: true` also writes `hide_muted_channels` for each community. The core test `default_hide_muted_apply_to_all_follow_ups` (22c) covers that, so this is coverage depth only. - *minor:* `screens/settings/mod.rs` is outside the task's Files list (11 lines: a State field, two `apply_local` arms and one overlay). It is needed to open the dialog, and no unmerged task owns that file, so it is accepted as recorded. Verdict: **APPROVED** (0 blocking, 2 minor).
Author
Owner

Scope: git diff 26de473..847893b (this task's two commits only).

Checks

  1. Tests: trust_all_switch_binds and hide_muted_default_confirm_choices exist in crates/fluxer-ui/tests/settings_chat.rs. They check the row order (directly after "Strip tracking parameters from URLs"), that each switch asks before writing, that Cancel and Dismiss write nothing, the ["*"] and [] writes, the four SetDefaultHideMutedChannels { hide, apply_to_all } answers, and every dialog string. The settings_advanced_chat golden was redrawn and shows the new row. The parity id chat-settings-trust-domains moved to done.
  2. Interfaces: the trust-all switch writes "*" and removes it through SetChatSetting(TrustAllLinks(_)), which goes to core 22c. The hide-muted confirm emits UserAction::SetDefaultHideMutedChannels { hide, apply_to_all } exactly as written in the plan.
  3. Invariants: the change is UI only. It adds no I/O, no new fixtures, no secrets and no panics on server data. The trusted-domain merge is still core 22c's job. Trust-all replaces the list on purpose, as the original does ("Your existing trusted domains will be replaced").
  4. Parity spot checks against fluxer-soundboard:
    • TrustedDomain.setTrustAllDomains writes ['*'] or []. Matches.
    • ChatSettingsTabLinksTab.tsx:33-95: the titles and bodies match, "Trust all" uses primaryVariant="danger", and "Disable trust all" is not a danger button. Matches.
    • AdvancedChatControls.tsx:645-722: the primary button means apply to all, onSecondary ("New communities only") sends the default only, and closing the dialog does nothing. Matches.
    • AdvancedChatControls.tsx:258/262: Trust all comes after Strip tracking. Matches.
      Escape in the dialog: the Intercept widget captures the key, and the app-level WindowEvent::Escape only fires when the key is Ignored. So Escape closes the dialog without also closing the settings.
  5. Review Focus 1 (trusted domains merged, not replaced) belongs to 22c, and this change does not touch it.
  6. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci on 847893b: all steps passed. settings_advanced_chat_matches_golden passed and none failed.

Findings

  • [minor] docs/parity/settings.toml chat-settings-hide-muted-channels note still says "Stored only ... the switch's confirm ... is left out until then". 37c built that confirm, so the note is now stale.
  • [minor] docs/parity/textchat.md, the Advanced → chat controls row still says "Partial: hide muted channels is stored only". It should now say that the default and its confirm are synced (22c/37c).
  • [minor] screens/settings/mod.rs (11 lines, the chat_confirm state) is outside the plan's Files list. The change is needed and small, so this is not a problem.

Verdict: APPROVE. There are no blocking findings and the local CI is green.

## Independent review: Task 37c (ui-trust-links-hide-muted), head 847893b Scope: `git diff 26de473..847893b` (this task's two commits only). **Checks** 1. Tests: `trust_all_switch_binds` and `hide_muted_default_confirm_choices` exist in `crates/fluxer-ui/tests/settings_chat.rs`. They check the row order (directly after "Strip tracking parameters from URLs"), that each switch asks before writing, that Cancel and Dismiss write nothing, the `["*"]` and `[]` writes, the four `SetDefaultHideMutedChannels { hide, apply_to_all }` answers, and every dialog string. The `settings_advanced_chat` golden was redrawn and shows the new row. The parity id `chat-settings-trust-domains` moved to done. 2. Interfaces: the trust-all switch writes `"*"` and removes it through `SetChatSetting(TrustAllLinks(_))`, which goes to core 22c. The hide-muted confirm emits `UserAction::SetDefaultHideMutedChannels { hide, apply_to_all }` exactly as written in the plan. 3. Invariants: the change is UI only. It adds no I/O, no new fixtures, no secrets and no panics on server data. The trusted-domain merge is still core 22c's job. Trust-all replaces the list on purpose, as the original does ("Your existing trusted domains will be replaced"). 4. Parity spot checks against fluxer-soundboard: - `TrustedDomain.setTrustAllDomains` writes `['*']` or `[]`. Matches. - `ChatSettingsTabLinksTab.tsx:33-95`: the titles and bodies match, "Trust all" uses `primaryVariant="danger"`, and "Disable trust all" is not a danger button. Matches. - `AdvancedChatControls.tsx:645-722`: the primary button means apply to all, `onSecondary` ("New communities only") sends the default only, and closing the dialog does nothing. Matches. - `AdvancedChatControls.tsx:258/262`: Trust all comes after Strip tracking. Matches. Escape in the dialog: the `Intercept` widget captures the key, and the app-level `WindowEvent::Escape` only fires when the key is `Ignored`. So Escape closes the dialog without also closing the settings. 5. Review Focus 1 (trusted domains merged, not replaced) belongs to 22c, and this change does not touch it. 6. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` on 847893b: **all steps passed**. `settings_advanced_chat_matches_golden` passed and none failed. **Findings** - [minor] `docs/parity/settings.toml` `chat-settings-hide-muted-channels` note still says "Stored only ... the switch's confirm ... is left out until then". 37c built that confirm, so the note is now stale. - [minor] `docs/parity/textchat.md`, the Advanced → chat controls row still says "Partial: hide muted channels is stored only". It should now say that the default and its confirm are synced (22c/37c). - [minor] `screens/settings/mod.rs` (11 lines, the `chat_confirm` state) is outside the plan's Files list. The change is needed and small, so this is not a problem. **Verdict: APPROVE.** There are no blocking findings and the local CI is green.
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:49 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.