feat(search): broaden Home search beyond DMs to include accessible rooms #42

Merged
nrupard merged 1 commit from fix/search-include-rooms into main 2026-05-06 17:03:23 +02:00
Owner
  • The Home search input previously matched only DM rooms the caller participated in. As soon as a caller's daily search of "hello" returned no hits while the same word was visible in #general, the input felt broken. Broaden the home scope to include every room the caller can read: their DMs plus non-DM rooms in any enclave they belong to, with private rooms still gated on room_members.
  • Site admins additionally see every non-DM room regardless of enclave membership; their DM scope still requires explicit room_members so they cannot quietly page through other users' DMs.
  • Rename the boolean parameter from home_dm_only to home_scope to reflect the broader semantics. Update the doc comment on search_messages accordingly.
  • Add four db_search tests pinning the new behavior: rooms outside the caller's enclaves are hidden, public rooms inside their enclaves match, private rooms only match for room_members, and admins see all non-DM rooms regardless of enclave.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

- The Home search input previously matched only DM rooms the caller participated in. As soon as a caller's daily search of "hello" returned no hits while the same word was visible in #general, the input felt broken. Broaden the home scope to include every room the caller can read: their DMs plus non-DM rooms in any enclave they belong to, with private rooms still gated on `room_members`. - Site admins additionally see every non-DM room regardless of enclave membership; their DM scope still requires explicit `room_members` so they cannot quietly page through other users' DMs. - Rename the boolean parameter from `home_dm_only` to `home_scope` to reflect the broader semantics. Update the doc comment on `search_messages` accordingly. - Add four `db_search` tests pinning the new behavior: rooms outside the caller's enclaves are hidden, public rooms inside their enclaves match, private rooms only match for `room_members`, and admins see all non-DM rooms regardless of enclave. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- The Home search input previously matched only DM rooms the caller participated in. As soon as a caller's daily search of "hello" returned no hits while the same word was visible in #general, the input felt broken. Broaden the home scope to include every room the caller can read: their DMs plus non-DM rooms in any enclave they belong to, with private rooms still gated on `room_members`.
- Site admins additionally see every non-DM room regardless of enclave membership; their DM scope still requires explicit `room_members` so they cannot quietly page through other users' DMs.
- Rename the boolean parameter from `home_dm_only` to `home_scope` to reflect the broader semantics. Update the doc comment on `search_messages` accordingly.
- Add four `db_search` tests pinning the new behavior: rooms outside the caller's enclaves are hidden, public rooms inside their enclaves match, private rooms only match for `room_members`, and admins see all non-DM rooms regardless of enclave.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nrupard deleted branch fix/search-include-rooms 2026-05-06 17:03:23 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!42
No description provided.