Skip to content

[Feature] Full-text search across session messages #706

Description

@azeitler

Problem

The global command palette (Cmd+K) finds projects and sessions by metadata only: session name, label, worktree name, project name. But you often remember what was said in a session, not what it was called.

Today the only way to search message content is Magic → Load Context (src/components/magic/hooks/useLoadContextData.ts), which lowercases and includes()-scans every message of every session client-side. That is acceptable inside a modal you open deliberately; it is not viable as a global, keystroke-responsive search.

Proposal

Real full-text search over session message content, surfaced in the command palette — likely behind a mode or prefix so it does not dilute the fast metadata results — showing a matching snippet with the query highlighted, and jumping to that message inside the session.

Implementation notes

  • list_all_sessions (jean-core/src/chat/commands.rs) already returns every message of every session, so the bottleneck is the client-side payload, not data availability.
  • A real implementation should search Rust-side via a new search_session_messages command, registered in both src-tauri/src/lib.rs generate_handler![] and src-tauri/src/http_server/dispatch.rs so it works over web access too.
  • Re-scanning session JSONL on every keystroke will not scale; this probably wants an index (SQLite FTS5) kept in sync as runs complete.
  • Needs debouncing plus snippet extraction with surrounding context.

Acceptance criteria

  • Search message content across all projects and worktrees
  • Results show project · worktree · session plus a highlighted snippet
  • Selecting a result opens the session scrolled to that message
  • Stays responsive with thousands of sessions
  • Works over web access as well as in the native app

Related

Follow-up to adding session entries to the command palette (recent sessions + metadata search).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions