Skip to content

Add Gemini CLI support and harden search/runtime workflows#47

Merged
doodlewind merged 2 commits intomainfrom
feat/gemini-cli-search-hardening
Apr 9, 2026
Merged

Add Gemini CLI support and harden search/runtime workflows#47
doodlewind merged 2 commits intomainfrom
feat/gemini-cli-search-hardening

Conversation

@doodlewind
Copy link
Copy Markdown
Contributor

Rebased version of #45 (by @chumyin) onto current main, with OpenCLI removal conflicts resolved.

Summary

This PR expands Spool's session/search workflow so Gemini CLI is treated as a first-class source and local verification is repeatable across Node and Electron runtimes.

What changed

  • add Gemini CLI session indexing, filtering, resume commands, badges/counts, docs, and built-in ACP agent support
  • add Gemini fixtures and fast-search e2e coverage
  • improve current search/session behavior around multi-term search flows and Codex transcript filtering
  • add explicit better-sqlite3 rebuild paths for Node vs Electron runtimes
  • isolate Electron Playwright user data so e2e runs do not conflict with a live local Spool instance

Conflict resolution (vs #45)

  • types.ts — kept SessionSource with 'gemini', removed 'opencli' from Source
  • db.ts — kept gemini source + session_search tables, removed opencli tables
  • queries.ts — removed OpenCLISource import
  • main/index.ts — kept searchSessionPreview, removed OpenCLI imports
  • acp.ts — Gemini in agent list + connector-based description
  • SourcesPanel.tsx — kept geminiCount, removed OpenCLI state
  • Docs/landing — merged Gemini + connector references

Supersedes #45. Closes #44.

🤖 Generated with Claude Code

This branch expands Spool's local session/search surface so Gemini CLI
is treated as a first-class source while keeping verification reliable
across Node and Electron runtimes. It adds Gemini CLI indexing,
filtering, resume support, built-in ACP agent wiring, UI/docs updates,
fixture coverage, and the runtime-specific rebuild/test hardening needed
for repeatable local validation.

The follow-up fixture corpus is intentionally synthetic. Search and e2e
coverage now use neutral change-tracking examples instead of
personal-looking transcript fragments, preserving the same ranking and
matching behavior without carrying over user-specific context.

Constraint: Gemini CLI stores project chats under .gemini/tmp with project identity resolved via history markers
Constraint: better-sqlite3 must be rebuilt separately for Node and Electron runtimes
Constraint: Fixture text must remain deterministic enough to preserve phrase-vs-all-terms coverage
Rejected: Share the default Electron userData directory in tests | caused launch conflicts with live Spool instances
Rejected: Keep one implicit native rebuild path | led to NODE_MODULE_VERSION drift between Node and Electron
Rejected: Keep the original PR-specific wording | leaked user-specific context into repository fixtures
Confidence: high
Scope-risk: moderate
Directive: Use rebuild:native:node before Node-side tests and rebuild:native:electron before Electron/e2e runs; keep future fixture/session samples synthetic and non-attributable
Tested: tsc -p packages/core/tsconfig.json
Tested: tsc -p packages/app/tsconfig.json
Tested: vitest run packages/core/src/parsers/claude.test.ts packages/core/src/parsers/codex.test.ts packages/core/src/parsers/gemini.test.ts packages/core/src/sync/source-paths.test.ts packages/app/src/shared/resumeCommand.test.ts packages/app/src/main/sessionResume.test.ts packages/app/src/main/acp.test.ts
Tested: vitest run packages/core/src/db/search-query.test.ts (after Node rebuild)
Tested: electron-vite build
Tested: playwright test fast-search.spec.ts (after Electron rebuild)
Not-tested: Full turbo test matrix
Related: #44
Related: #45
@chumyin
Copy link
Copy Markdown
Contributor

chumyin commented Apr 8, 2026

hi @doodlewind ! just reviewed your comments, sorry for putting this whole lot of lines of codes into one single PR, at first actually there were 2 commits (thought still not so many lol), then i squashed into one. next time i will take good care and split big PR into smaller, easily-reviewable PRs in order not to make you some burden!

no more comments on this, i think this PR is good to go, have run tests locally before submitting. thanks!

@doodlewind doodlewind merged commit a2b9d8e into main Apr 9, 2026
3 checks passed
@doodlewind doodlewind deleted the feat/gemini-cli-search-hardening branch April 9, 2026 08:37
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 Gemini CLI support and harden search/runtime workflows

2 participants