Skip to content

feat(ui): add session content search via API#7050

Merged
DOsinga merged 11 commits intoblock:mainfrom
tfsq:feature/session-content-search
Feb 6, 2026
Merged

feat(ui): add session content search via API#7050
DOsinga merged 11 commits intoblock:mainfrom
tfsq:feature/session-content-search

Conversation

@tfsq
Copy link
Contributor

@tfsq tfsq commented Feb 6, 2026

Summary

Add server-side content search for sessions, replacing the client-side title-only filtering.

Changes

  • Backend: Added /sessions/search endpoint that calls existing search_chat_history function
  • Frontend: Updated SessionListView to call search API with fallback to client-side filtering

How it works

  1. User types in session search box
  2. Debounced search term triggers API call to /sessions/search?query=...
  3. Backend searches message content using existing ChatHistorySearch
  4. Frontend filters session list to matching session IDs
  5. Falls back to client-side title search if API fails

Closes #7045

tfsq added 8 commits February 6, 2026 12:10
Adds the ability to search within session message content, not just titles.

Backend changes:
- Add /sessions/search endpoint in session.rs
- Endpoint calls existing search_chat_history function
- Returns matching session IDs with relevance scores

Frontend changes:
- SessionListView now calls searchSessions API when searching
- Falls back to client-side title search on API error
- Maintains existing UX with debounced search

Closes block#7045
Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work, if you address my concerns let's get this in

async fn search_sessions(
State(state): State<Arc<AppState>>,
axum::extract::Query(params): axum::extract::Query<SearchSessionsQuery>,
) -> Result<Json<SearchSessionsResponse>, StatusCode> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would make sense to return an actual Conversation object here with the truncated messages. it is all local so it should be fast enough and that way we don't create an extra type which is handy when we want to do other things with the returned session

});
} catch (error) {
console.error('Search failed, falling back to client-side:', error);
// Fallback to client-side search on error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not. the backend shouldn't error.

const filtered = sessions.filter((session) => matchedSessionIds.has(session.id));

startTransition(() => {
setFilteredSessions(filtered);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah so for now we're not actually returning the matches? maybe just return sessions without messages then?

tfsq added 3 commits February 6, 2026 14:04
- Remove custom SearchMatch, SearchSessionResult, SearchSessionsResponse types
- Return Vec<Session> directly from search endpoint
- Remove try/catch fallback in frontend (backend shouldn't error)
- Simplify frontend to use session IDs from response
@tfsq tfsq requested a review from DOsinga February 6, 2026 19:18
@DOsinga DOsinga added this pull request to the merge queue Feb 6, 2026
Merged via the queue into block:main with commit 459ae33 Feb 6, 2026
18 checks passed
@tfsq tfsq deleted the feature/session-content-search branch February 6, 2026 19:38
zanesq added a commit that referenced this pull request Feb 7, 2026
* 'main' of github.com:block/goose:
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
tlongwell-block added a commit that referenced this pull request Feb 9, 2026
* origin/main: (55 commits)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  fix: remove Option from model listing return types, propagate errors (#7074)
  fix: lazy provider creation for goose acp (#7026) (#7066)
  Smoke tests: split compaction test and use debug build (#6984)
  fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061)
  feat: expose AGENT_SESSION_ID env var to extension child processes (#7072)
  fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882)
  Remove clippy too_many_lines lint and decompose long functions (#7064)
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  ...

# Conflicts:
#	scripts/test_subrecipes.sh
lifeizhou-ap added a commit that referenced this pull request Feb 9, 2026
* main: (101 commits)
  fix: lazy provider creation for goose acp (#7026) (#7066)
  Smoke tests: split compaction test and use debug build (#6984)
  fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061)
  feat: expose AGENT_SESSION_ID env var to extension child processes (#7072)
  fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882)
  Remove clippy too_many_lines lint and decompose long functions (#7064)
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  Document max_turns settings for recipes and subagents (#7044)
  feat: update Groq declarative data with Preview Models (#7023)
  ...
jh-block added a commit that referenced this pull request Feb 9, 2026
* origin/main: (54 commits)
  chore: strip posthog for sessions/models/daily only (#7079)
  tidy: clean up old benchmark and add gym (#7081)
  fix: use command.process_group(0) for CLI providers, not just MCP (#7083)
  added build notify (#6891)
  test(mcp): add image tool test and consolidate MCP test fixtures (#7019)
  fix: remove Option from model listing return types, propagate errors (#7074)
  fix: lazy provider creation for goose acp (#7026) (#7066)
  Smoke tests: split compaction test and use debug build (#6984)
  fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061)
  feat: expose AGENT_SESSION_ID env var to extension child processes (#7072)
  fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882)
  Remove clippy too_many_lines lint and decompose long functions (#7064)
  refactor: move disable_session_naming into AgentConfig (#7062)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  ...
dianed-square added a commit that referenced this pull request Feb 9, 2026
* origin/main: (141 commits)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  Document max_turns settings for recipes and subagents (#7044)
  feat: update Groq declarative data with Preview Models (#7023)
  fix(codex): propagate extended PATH to codex subprocess (#6874)
  Switch tetrate tool filtering back to supports_computer_use (#7024)
  feat(ui): add inline rename for chat sessions in sidebar (#6995)
  fix: handle toolnames without underscores (#7015)
  feat(claude-code): use stream-json protocol for persistent sessions (#7029)
  test(providers): add model listing to live provider suite (#7038)
  Agent added too much (#7036)
  ...
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
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.

Add content search for past sessions

2 participants