Remove persisted annual summary snapshots whenever a session is deleted through shared or desktop cleanup paths. Drop cached in-memory snapshots when their backing files disappear so stale responses cannot expose deleted session data.
An ambient npm_config_runtime=electron (common in Electron dev shells
and CI) makes bare prebuild-install "succeed" with an Electron-ABI
binding, bypassing the source-build fallbacks and leaving the CLI
unable to start. Pin -r node -t to the current system Node instead.
Co-authored-by: Cursor <cursoragent@cursor.com>
prebuild-install was invoked with -r napi, but better-sqlite3 only
publishes per-ABI node/electron prebuilds, so the download branch always
failed and every run fell back to a ~1.5min node-gyp source build.
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid switching legacy DELETE-journal session databases to WAL from readonly validation paths. This prevents sync existence checks from treating valid databases as unreadable and deleting them.
The UI stayed on "parsing messages" during the whole post-parse phase:
the importer emitted an 'importing' stage the frontend had no text for,
and on CLI Web the synchronous DB writes / index / FTS build starved the
event loop so buffered SSE progress events only arrived after the import
finished.
- Replace 'importing' with 'saving' (message writes) and a new 'indexing'
stage (indexes / FTS / session index) in ParseProgress, with UI texts
for all four locales.
- Yield a macrotask between native parser batches and before heavy
synchronous steps so SSE progress events flush while importing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add @openchatlab/parser-native (napi-rs v3) with a shared byte-level JSON
scanner and two format kernels. Parsing large exports is 4-10x faster in
real-data benchmarks. The native module is an optional local build; the
pure-TS parsers remain as automatic fallback when it is unavailable,
disabled via CHATLAB_DISABLE_NATIVE_PERF=1, or rejects off-spec files.
The ChatLab kernel also parses the members array structurally, fixing the
TS head-regex heuristic that silently dropped avatars/roles for files with
nested arrays or long member lists.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clamp CLI SQL output after execution so user-provided LIMIT clauses cannot bypass the requested row cap. Add a deterministic message id tie-breaker for response-time statistics.
Start stable desktop update downloads in the background during automatic checks, then prompt only after the update is ready to install.
Keep manual update checks interactive so users still confirm the download after explicitly checking.
Return a recorded SOCKS proxy before a fallback DIRECT rule so local model downloads fail explicitly instead of silently bypassing the configured system proxy.
Make desktop proxy saves await Electron session proxy application before model download proxy resolution.
Resolve HTTP, HTTPS, and SOCKS system proxy rules for semantic index model downloads while preserving DIRECT precedence.
Combine the PR review fixes for push import validation, deduplication, system sender handling, and pull import lock scoping into one reviewable change.
- Change default port from 5200 to 3110 in sync config-manager, Vue store,
and settings UI to match CLI DEFAULT_API_PORT
- Desktop API server now tries up to 10 consecutive ports when preferred
port is occupied (e.g. CLI already running); reports actual bound port
- Scope Desktop import route lock to session (Set<string>) matching the
push-importer fix
- Docs: remove unimplemented JSONL/X-Dry-Run claims, fix port references,
replace platform-specific examples with generic ones
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes the legacy apps/cli/src/import/importer.ts (hand-rolled FTS, dedup,
session-ID generation) and apps/cli/src/import/chatlab-reader.ts (buffered
in-memory JSON/JSONL parser). DirectImporter in sync/adapters.ts now calls
streamImport / incrementalImport from stream-import.ts, which use the
@openchatlab/parser streaming pipeline and node-runtime shared logic.
Changes:
- Add sessionId? to StreamImportOptions so callers can fix the target session
ID instead of auto-generating one (needed by pull engine full-import path)
- Rewrite DirectImporter.incrementalImportFile and fullImportFile to use
the shared importers; map IncrementalImportResult fields to ImportResult
- Remove legacy exports from apps/cli/src/import/index.ts
- Rewrite importer.test.ts to use streamImport + a temp ChatLab JSON file
(same two data-dir compatibility gate assertions as before)
- Delete importer.ts and chatlab-reader.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Session index is now built inside the shared incremental-importer, so the
explicit post-import worker.generateIncrementalSessions(sessionId) calls in
the Desktop layer were no-ops. Remove all four call sites.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>