Motivation
Find / FindPage / List return matched issues but no information about why a text ~ "..." query matched. UIs that render search results have nothing to highlight.
Concretely, beads-workbench's search results carry a Snippet field that is currently always empty, because the SDK exposes no match context — only the matched *Issue.
Proposal (additive, optional)
For text (text ~) searches, optionally surface per-result match context — e.g. a short snippet around the match, or match field + byte offsets — so consumers can render highlights. Possible shapes:
- a new optional method/return (e.g.
FindPage returning results with an optional Snippet/Matches alongside each issue), or
- a helper that, given an issue + query text, returns the snippet (keeps
Find unchanged).
Low priority / nice-to-have — purely additive; no behavior change for existing callers.
Motivation
Find/FindPage/Listreturn matched issues but no information about why atext ~ "..."query matched. UIs that render search results have nothing to highlight.Concretely, beads-workbench's search results carry a
Snippetfield that is currently always empty, because the SDK exposes no match context — only the matched*Issue.Proposal (additive, optional)
For text (
text ~) searches, optionally surface per-result match context — e.g. a short snippet around the match, or match field + byte offsets — so consumers can render highlights. Possible shapes:FindPagereturning results with an optionalSnippet/Matchesalongside each issue), orFindunchanged).Low priority / nice-to-have — purely additive; no behavior change for existing callers.