Search: in-channel FTS (/) and workspace search modal (ctrl+f)#85
Merged
Conversation
… ASCII fold fast path
# Conflicts: # cmd/slk/main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/): vim-style search over the current channel's cached history, backed by a new SQLite FTS5 index (messages_fts, external-content table with trigger sync + backfill; LIKE fallback if FTS5 is unavailable). Matches highlight in the message pane;n/Njump between them (wrapping), status line shows/query 3/17, Esc clears. Accent/case-insensitive word-prefix matching.ctrl+f): modal backed by Slack'ssearch.messageswith raw query pass-through (from:@user,in:#channel,before:modifiers work). Results render as structured blocks —#channel author date, timeheader with indented 2-line snippets, searched terms highlighted, mrkdwn entities flattened (mentions/links/usergroups), DM names resolved. Modal sizes to 70% of the terminal; Enter jumps to the message (thread replies open the thread panel); hits in non-member channels toast instead of dead-ending.FetchAround): fetches a window around a target ts when it's outside the loaded buffer — used by search jumps and also upgrades the permalink-navigation path from Add 'o' keybinding to open links, with in-app Slack permalink navigation (#62) #71 (which previously toasted "older than loaded history").Notable hardening along the way: ANSI/OSC-safe highlight renderer, generation-counter guards against stale async search results, anchor-guarded older-history prepends (fixes a latent buffer race), read-only user lookups on the search goroutine (avoids a concurrent map write), contiguous-window guarantee in
GetHistoryAround.Design doc:
docs/superpowers/specs/2026-06-10-search-design.mdPlan:
docs/superpowers/plans/2026-06-10-search.mdTest Plan
go test ./...(48 packages),go vet ./...,-raceon the new search pathssearch.messages;/highlights + n/N + off-buffer jumps;ctrl+fmodifiers, cross-channel/thread jumps, non-member toast; permalink jump to old messagecache.db(backfill runs once on first start)Known v1 limitations (deliberate)
/search (replies aren't displayable in the channel pane); workspace search covers them