Skip to content

Prepare 1.14.0 with IndexedDB Jieba storage and declarative settings - #38

Merged
aidenlx merged 12 commits into
mainfrom
codex/jieba-idb-declarative-settings
Oct 11, 2026
Merged

aidenlx merged 12 commits into
mainfrom
codex/jieba-idb-declarative-settings

Conversation

@aidenlx

@aidenlx aidenlx commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare plugin 1.14.0: store Jieba WASM in versioned IndexedDB using idb, install it without reloading, and replace imperative settings with Obsidian's declarative settings.

 Jieba component
-  filesystem cache with desktop and vault-specific paths
+  versioned IndexedDB cache shared by same-origin vaults
+  download or manually import WASM and activate immediately
+  delete individual IndexedDB versions through settings
+  reinstall when upgrading from filesystem storage; manually remove old files

 editor and development
+  adapt Obsidian 1.14.4 Vim behavior in linted TypeScript
+  document extracting the Vim reference from that version's runtime ASAR
+  pin Node 26 / pnpm 11.0.9 in mise
+  use the official Obsidian review workflow with policy ESLint and general oxlint
+  bump package and manifest to 1.14.0 and record Obsidian 1.14.4 compatibility

Same-origin vaults share the cache; separate devices and storage partitions need their own installation. Installation and engine selection apply immediately, and editor patches register once. Installation preserves engine selections made while settings are saving. Imported bytes must match the pinned Jieba WASM SHA-256 before replacing the shared cache.

Legacy filesystem cache handling is removed entirely, along with its Electron remote dependency. The plugin does not load, scan, migrate, or delete previous cache files. The README explains reinstalling Jieba and manually removing old files. Settings manage only IndexedDB cache versions. Dictionary edits and Vim option changes still require reload. Removing Vim patches after disabling the plugin requires a full Obsidian reload, as documented in the README. CodeMirror patches continue to use monkey-around with unload cleanup.

Evidence

  • pnpm typecheck, pnpm lint, pnpm lint:obsidian, pnpm format, and the production build pass. The official reviewer reports 0 errors, 0 warnings, and 1 recommendation for the expected external WASM reference. Unit tests and their test-only dependency are removed; CI retains type checking, both linters, and official review.
  • Live Obsidian 1.14.4 desktop checks verified downloading, the manual file-selection handler, shared cache visibility across vaults, persisted settings/custom dictionary, IndexedDB version deletion, Chinese double-click and Alt-Backspace, and Vim w/e/b, f/t, repeat and reverse search. No errors were captured in the isolated test vault. Mobile UI and native file-dialog interaction were not exercised.
  • Immediate activation was verified on the same plugin instance: downloading changed the editor word range from 中文 (0–2) to 中文分词测试 (0–6); repeated installation did not duplicate patches; switching Intl/Jieba applied immediately. With Intl unavailable and no cache, manual installation registered the missing patches.
  • A temporary conversion smoke check compared 2,592 word-motion and character-search cases with the previous JavaScript implementation; all matched. Both Vim TypeScript files now participate in linting and formatting. Oxlint runs type-aware checks through oxlint-tsgolint; typescript/unbound-method is an error. The extracted cut callback uses a function-property type, and the original warning was confirmed before fixing it.
  • Cache deletion marks its entry deleted; explicit Refresh updates the list. Deletion and subsequent refresh passed in an isolated vault. An earlier ZotLit fixture freeze during immediate settings reconstruction was recovered; the underlying cause was not established.

Merge Danger

Door: two-way

Code can be reverted. User-selected IndexedDB deletion cannot be reversed by code rollback; reinstall the component. Existing filesystem files remain untouched, and upgrading from filesystem storage requires reinstalling Jieba.

Blast Radius: editor

Changes affect segmentation initialization, Chinese selection/deletion, Vim motions, settings, and review CI. Deleting an IndexedDB version affects future loads in all vaults sharing that origin and storage partition. The cache is not synced. This minor release requires Obsidian 1.14.4.

@aidenlx aidenlx changed the title Move jieba WASM cache to IndexedDB and adopt declarative settings Prepare 1.14.0 with IndexedDB Jieba storage and declarative settings Oct 11, 2026
@aidenlx
aidenlx merged commit 7e7e5ce into main Oct 11, 2026
1 check passed
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