Filter the inbox with the connected account's mute list (CLS-1264) #325

Merged
stephen merged 2 commits from cls-1264-inbox-scope into main 2026-11-12 11:13:31 +00:00
Owner

CLS-1264, broad half, part 2 of 2 (part 1 was #324).

fj status connected a client, then called account_scope(host), which loads hosts.toml again to work out the mute scope. A switch from another terminal between the two could filter one account's notifications with another account's mute list.

  • muted::client_scope(&client) builds the scope from the host configuration the client connected with (client.config(), added in #324). fj status uses it.
  • account_scope stays for status mute, unmute and muted, which never connect and read once. Its doc comment now says so.

Tests:

  • the_inbox_scope_follows_the_connected_client_not_the_disk connects, switches the account on disk, and checks the client's scope is still the original account's while account_scope now names the other one (so it fails if the reload comes back).
  • the_inbox_scope_follows_the_connected_fjord_instance: each Fjord instance has its own scope.
  • tests/status_mute_scope.rs end to end: status mute under one account, then status hides that repo for that account only, which also shows client_scope equals the scope mute stored.

Self-review (two rounds, BLOCKING 0) left one Low: a test that switches hosts.toml between connect and the scope lookup inside inbox itself. That window has no network call and no seam, so a subprocess test cannot interleave there, and I did not add a test-only hook to production code. The call site is one line (client_scope(&client)).

CLS-1264, broad half, part 2 of 2 (part 1 was #324). `fj status` connected a client, then called `account_scope(host)`, which loads `hosts.toml` again to work out the mute scope. A switch from another terminal between the two could filter one account's notifications with another account's mute list. - `muted::client_scope(&client)` builds the scope from the host configuration the client connected with (`client.config()`, added in #324). `fj status` uses it. - `account_scope` stays for `status mute`, `unmute` and `muted`, which never connect and read once. Its doc comment now says so. Tests: - `the_inbox_scope_follows_the_connected_client_not_the_disk` connects, switches the account on disk, and checks the client's scope is still the original account's while `account_scope` now names the other one (so it fails if the reload comes back). - `the_inbox_scope_follows_the_connected_fjord_instance`: each Fjord instance has its own scope. - `tests/status_mute_scope.rs` end to end: `status mute` under one account, then `status` hides that repo for that account only, which also shows `client_scope` equals the scope `mute` stored. Self-review (two rounds, BLOCKING 0) left one Low: a test that switches `hosts.toml` between `connect` and the scope lookup inside `inbox` itself. That window has no network call and no seam, so a subprocess test cannot interleave there, and I did not add a test-only hook to production code. The call site is one line (`client_scope(&client)`).
Test the inbox scope against a switch after connect (CLS-1264)
All checks were successful
ci / check (pull_request) Successful in 15m12s
ci / live-e2e (pull_request) Successful in 3m26s
ci / coverage (pull_request) Successful in 4m11s
4ac3d246dd
gerri approved these changes 2026-11-12 10:54:34 +00:00
gerri left a comment

Automated Codex review (read-only) of head 4ac3d246dd.

No new correctness, security, or failure-path problems found against STANDARDS.md. The PR body's deferred Low test gap remains unchanged: switching configuration inside inbox is not directly exercised.

Review was read-only; tests were not run.

BLOCKING: 0

Reviewed head 4ac3d246dd at 2026-11-12T10:54:33Z by codex exec (read-only sandbox).

Automated Codex review (read-only) of head 4ac3d246dd49b9189c6e15b4aec828a437923401. No new correctness, security, or failure-path problems found against STANDARDS.md. The PR body's deferred Low test gap remains unchanged: switching configuration inside `inbox` is not directly exercised. Review was read-only; tests were not run. BLOCKING: 0 --- Reviewed head 4ac3d246dd49b9189c6e15b4aec828a437923401 at 2026-11-12T10:54:33Z by codex exec (read-only sandbox).
Sign in to join this conversation.
No description provided.