Skip to content

feat(search): unified recall across memories + documents (uteke 0.9.0)#184

Merged
ajianaz merged 1 commit into
developfrom
feat/unified-search
Jul 21, 2026
Merged

feat(search): unified recall across memories + documents (uteke 0.9.0)#184
ajianaz merged 1 commit into
developfrom
feat/unified-search

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Unifies semantic search so one query finds both memories and documents — today CorIn's Memories search is memory-only and Documents search is a separate view. Uses uteke 0.9.0's search_type param on POST /recall.

Backend:

  • uteke_client.rs: UnifiedSearchResult struct (mirrors uteke 0.9.0 — result_type discriminator + memory/doc fields) + recall_unified() method.
  • commands.rs: recall_unified command, gated on uteke ≥ 0.9.0.
  • lib.rs: register + deserialization test (memory + document hits).

Frontend (TS layer only — UI wiring is a follow-up):

  • types.ts: UnifiedSearchResult interface.
  • ipc.ts: utekeServer.recallUnified(query, {searchType, namespace, limit}).

Verified against running uteke 0.9.0: POST /recall search_type=all[{result_type:"memory"}×2, {result_type:"document"}×1], deserializes cleanly. All checks green: cargo fmt/clippy(-D warnings)/test (18), svelte-check (0 err), vitest (61), npm build.

Follow-up PR will add the UI: a "Memories | All (memories + documents)" toggle in MemoryList and unified-result rendering with type badges (memory → detail, document → open in Documents view).

This is part of the 0.9.0 alignment work; pairs with #183 (HTTP-only version gate).

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

Add a unified semantic-search path that finds BOTH memories and documents
in one query, via uteke 0.9.0's `search_type` parameter on POST /recall.

Backend:
- uteke_client.rs: `UnifiedSearchResult` struct (mirrors uteke 0.9.0's
  UnifiedSearchResult — result_type discriminator + memory/doc fields, all
  optional fields serde-defaulted for forward-compat) + `recall_unified()`
  method (POST /recall with search_type).
- commands.rs: `recall_unified` Tauri command, gated on uteke ≥ 0.9.0.
- lib.rs: register command + a deserialization unit test covering both a
  memory hit and a document chunk hit.

Frontend (TS layer — UI wiring is a follow-up):
- types.ts: `UnifiedSearchResult` interface.
- ipc.ts: `utekeServer.recallUnified(query, {searchType, namespace, limit})`.

Verified empirically against uteke 0.9.0: POST /recall search_type=all
returns a mixed [{result_type:"memory"}, {result_type:"document"}] list
that deserializes cleanly. cargo fmt/clippy(-D warnings)/test (18),
svelte-check (0 err), vitest (61), npm build.

The MemoryList search UI still uses memory-only `recall`; a follow-up PR
will add a "Memories | All (memories + documents)" toggle and render
unified results with type badges (memory → detail, document → open doc).
@ajianaz
ajianaz force-pushed the feat/unified-search branch from f3b1b0d to 3466461 Compare July 21, 2026 02:44
@ajianaz
ajianaz merged commit 3cf1145 into develop Jul 21, 2026
8 checks passed
ajianaz added a commit that referenced this pull request Jul 21, 2026
Wires the unified-recall backend (#184) into the MemoryList UI:

- Add a "Memories | All" scope toggle next to the search bar. "All" runs
  `utekeServer.recallUnified` (search_type=all) and renders a mixed list of
  memory + document hits, each badged (💾 Memory / 📄 Doc). "Memories" keeps
  the existing memory-only recall path.
- Memory hits → `onmemoryclick(id)` (opens detail, unchanged).
- Document hits → new `ondocumentclick(slug)` prop → App.openDocument →
  stashes the slug in a `pendingDocSlug` store + navigates to Documents.
- DocumentsView consumes `pendingDocSlug` on mount via a `$effect` and opens
  the doc by slug (`navigateToSlug`), then clears it.

New: src/lib/stores/nav.ts (pendingDocSlug store).

Verified: svelte-check (0 err), vitest (61), npm build. (Recall/TS layer
from #184 already empirically validated against uteke 0.9.0.)
ajianaz added a commit that referenced this pull request Jul 21, 2026
…ion (#185)

Wires the unified-recall backend (#184) into the MemoryList UI:

- Add a "Memories | All" scope toggle next to the search bar. "All" runs
  `utekeServer.recallUnified` (search_type=all) and renders a mixed list of
  memory + document hits, each badged (💾 Memory / 📄 Doc). "Memories" keeps
  the existing memory-only recall path.
- Memory hits → `onmemoryclick(id)` (opens detail, unchanged).
- Document hits → new `ondocumentclick(slug)` prop → App.openDocument →
  stashes the slug in a `pendingDocSlug` store + navigates to Documents.
- DocumentsView consumes `pendingDocSlug` on mount via a `$effect` and opens
  the doc by slug (`navigateToSlug`), then clears it.

New: src/lib/stores/nav.ts (pendingDocSlug store).

Verified: svelte-check (0 err), vitest (61), npm build. (Recall/TS layer
from #184 already empirically validated against uteke 0.9.0.)
@ajianaz ajianaz mentioned this pull request Jul 21, 2026
ajianaz added a commit that referenced this pull request Jul 21, 2026
* chore(release): v0.3.3

Patch release — auto-update now works, unified search, HTTP-only version
gate, server version in Settings, bun tooling.

- bump version 0.3.2 → 0.3.3 (package.json, Cargo.toml, Cargo.lock,
  tauri.conf.json)
- CHANGELOG entry

Contents (since v0.3.2):
- Added: unified search across memories + documents — "Memories | All"
  toggle (#184, #185)
- Fixed: auto-update — generates latest.json manifest (workaround
  tauri-action#1098 that left every release since v0.2.0 without it) (#187)
- Changed: version detection fully HTTP-only (#183); uteke server version
  in Settings → Connections (#186); tooling switched to bun (#186, #187)

Verified: cargo fmt/clippy(-D warnings)/test (18), svelte-check (0 err),
vitest (61), npm build.

* feat(settings): make codecora.dev clickable (opens in browser)

The "codecora.dev" line under CorIn vX.Y.Z in the Settings sidebar is now
a link — clicking opens https://codecora.dev in the system browser via
@tauri-apps/plugin-shell (preventDefault + shellOpen), matching how
DocumentsView handles external links. Accessible (real href) + hover style.
@ajianaz ajianaz mentioned this pull request Jul 21, 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.

1 participant