Follow-up to #355.
crates/web/src/app.rs builds IndexableMessage from the messages signal and currently hard-codes letter_id: None because there is no active-letter signal in crates/web/src/state.rs to read from. Letters/DMs is specced in docs/specs/2026-04-19-ui-design/letters-dms.md but the feature has not landed:
- No
letter_id / current_letter signal in AppState.
command_palette + tab_bar reference letters as a feature-flagged future surface.
SearchScope::ThisLetter(id) and SearchScope::AllLetters exist in the executor and rely on Posting.letter_id, but no code path produces a non-None letter_id today.
When letters-dms.md ships:
- Add
current_letter: ReadSignal<Option<String>> (or equivalent) to AppState.
- Subscribe to it in the search-index Effect in
crates/web/src/app.rs alongside current_channel / active_server.
- Set
letter_id: current_letter.get() (or per-message lookup if the messages signal mixes channels and letters).
- Add a
client-tier test confirming SearchScope::ThisLetter returns the expected hits.
Unblocks the documented in:#letter / scope-flip operator behaviour. Severity: medium (UX gap, not security).
Follow-up to #355.
crates/web/src/app.rsbuildsIndexableMessagefrom the messages signal and currently hard-codesletter_id: Nonebecause there is no active-letter signal incrates/web/src/state.rsto read from. Letters/DMs is specced indocs/specs/2026-04-19-ui-design/letters-dms.mdbut the feature has not landed:letter_id/current_lettersignal inAppState.command_palette+tab_barreference letters as a feature-flagged future surface.SearchScope::ThisLetter(id)andSearchScope::AllLettersexist in the executor and rely onPosting.letter_id, but no code path produces a non-Noneletter_idtoday.When letters-dms.md ships:
current_letter: ReadSignal<Option<String>>(or equivalent) toAppState.crates/web/src/app.rsalongsidecurrent_channel/active_server.letter_id: current_letter.get()(or per-message lookup if the messages signal mixes channels and letters).client-tier test confirmingSearchScope::ThisLetterreturns the expected hits.Unblocks the documented
in:#letter/ scope-flip operator behaviour. Severity: medium (UX gap, not security).