Add Gemini CLI support and harden search/runtime workflows#45
Closed
chumyin wants to merge 1 commit intospool-lab:mainfrom
Closed
Add Gemini CLI support and harden search/runtime workflows#45chumyin wants to merge 1 commit intospool-lab:mainfrom
chumyin wants to merge 1 commit intospool-lab:mainfrom
Conversation
chumyin
added a commit
to chumyin/spool
that referenced
this pull request
Apr 8, 2026
The newly added Gemini/search coverage accidentally carried over personal-looking references from local history into fixture data. These tests only need stable synthetic strings, so the fixture corpus now uses neutral change-tracking examples while preserving the same search behavior and ranking assertions. Constraint: Fixture text must remain deterministic enough to preserve phrase-vs-all-terms coverage Rejected: Keep the original PR-specific wording | leaked user-specific context into repository fixtures Confidence: high Scope-risk: narrow Directive: Keep future fixture/session samples synthetic and non-attributable even when seeded from local transcripts Tested: tsc -p packages/core/tsconfig.json Tested: tsc -p packages/app/tsconfig.json Tested: playwright test fast-search.spec.ts Not-tested: Node-side search-query vitest after this string-only fixture sanitization Related: spool-lab#44 Related: spool-lab#45
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: spool-lab#44 Related: spool-lab#45
3b78655 to
cc07b20
Compare
doodlewind
reviewed
Apr 8, 2026
Contributor
doodlewind
left a comment
There was a problem hiding this comment.
This is a large PR that bundles three distinct concerns:
- Gemini CLI as a first-class session source (parser, sync, UI, ACP agent)
- Multi-term search overhaul (session-level FTS, trigram indexes, LIKE fallback, search plan builder)
- Dev/runtime infrastructure (native rebuild scripts, single-instance lock, search cache, Electron userData isolation)
Could you consider splitting them into standalone PRs?
doodlewind
pushed a commit
that referenced
this pull request
Apr 8, 2026
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
Contributor
|
Rebased onto current Conflicts resolved:
Core and CLI build clean after rebase. The PR can be merged from this branch when ready. |
Contributor
|
Closing in favor of #47, which has this PR's changes rebased onto current @chumyin Thanks for the contribution! Please review #47 — the code is identical to yours, just rebased with conflict resolution. We'll continue the review there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
better-sqlite3rebuild paths for Node vs Electron runtimesValidation
tsc -p packages/core/tsconfig.jsontsc -p packages/app/tsconfig.jsonvitest 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.tsvitest run packages/core/src/db/search-query.test.ts(after Node rebuild)electron-vite buildplaywright test fast-search.spec.ts(after Electron rebuild)Notes
better-sqlite3now has explicit Node/Electron rebuild guidance because the native binary cannot safely drift between runtimes.Closes #44