Skip to content

BR-6197: Search channel and DM messages with current access checks - #1857

Draft
mangomac wants to merge 7 commits into
mainfrom
fix/br-6197-unified-message-search
Draft

mangomac wants to merge 7 commits into
mainfrom
fix/br-6197-unified-message-search

Conversation

@mangomac

@mangomac mangomac commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Scope

  • Add trigram FTS5 search plus two-character Korean bigram lookup for new or edited channel and DM messages, with insert/update/delete maintenance through the message body limit.
  • Add workspace-wide and current-conversation search with current membership/visibility checks, kind filters, author/time/thread metadata, highlighted snippets, and stable cursor pagination.
  • Add m: command-palette search, a channel-header entry, load-more/error UI, and root/reply navigation.
  • Add migration, ACL, edit/delete, Korean/English, pagination, body-length, and UI regression tests.

Checks and remaining signoff

  • Targeted local suites reported by the author: search 7/7, migration 0219 1/1, body-length migration 5/5, palette 15/15. Worker typecheck, Vite build, proto lint and snapshot digest passed on the author's patch; the later 50k-tail regression and regenerated Rust output need full normal-host validation.
  • Rust generated bindings were refreshed in host commit c19288c after the richer proto changes. Verify the generated outputs and run the full contract, web typecheck, CI and host signoff before merge. This PR remains draft.
  • The owner chose new-message indexing only. Historical messages are intentionally excluded from search; no backfill is pending approval or planned in this PR. No production D1 write or backfill was performed. Do not describe this as historical coverage.

@mangomac

Copy link
Copy Markdown
Contributor Author

Follow-up on 92a814f: added two-character Korean bigram lookup, current channel/DM kind filters, author/time/thread metadata, highlighted snippets, prefix-first/recent-second sorting with stable cursor paging, and a load-more/error UI. The migration test now checks the original 16 channel-message triggers separately from the three FTS and three bigram triggers. Targeted local suites pass (search 7/7, migration 0219 1/1, body-length migration 5/5, palette 15/15); Worker typecheck, Vite build, proto lint and snapshot digest pass. Rust bindings still need regeneration for the updated proto, and the normal host must rerun full signoff. Per the owner's choice, only new/edited messages are indexed; preexisting messages are intentionally not searchable. No production D1 write or backfill occurred. This PR remains draft.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants