mirror of
https://github.com/sotashimozono/obsidian-remote-ssh.git
synced 2026-07-22 06:52:07 +00:00
Dogfooding: even chunked (#448/beta.15), a deep dir-heavy vault (work/Vault with tens of thousands of dirs nested deep) is too heavy to walk + materialise in full at connect. Load ONE folder level at a time instead. A real-Obsidian spike settled the two runtime unknowns: (U2) a childless TFolder still renders an expand arrow (mod-collapsible), so an unloaded folder is openable; (U1) File Explorer renders from the in-memory model and does NOT call adapter.list on expand, so deepen-on-expand is driven by a DOM .nav-folder-title click hook (the element carries the folder's data-path). - BulkWalker.walk gains a `recursive` param; recursive:false returns just a folder's immediate children (fs.walk / one-level adapter.list), honouring walkIgnoreDirs per level. - LazyFolderLoader: idempotent, deduped per-folder deepen (walk one level -> buildChunked). Unit tests cover recursive-false walk, idempotency, concurrent-dedup, markLoaded, retry-on-failure, reset. - populateVaultFromRemote: with `lazyFolderLoad` (default true) it walks only the root level, wires the loader, marks root loaded, and installs a capture-phase .nav-folder-title click hook that deepens on first expand. `lazyFolderLoad:false` restores the full eager walk. Loader dropped on disconnect. ignore (reduce N) and lazy (limit depth) compose; the live fs.changed watch still works against a partial tree via ensureParents. Graph/search see only loaded branches for now (accepted; revisit later). tsc/lint/vitest green (1202). Ships as beta.16. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| e2e | ||
| scripts | ||
| src | ||
| tests | ||
| esbuild.config.mjs | ||
| eslint.config.mjs | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| styles.css | ||
| tsconfig.json | ||
| versions.json | ||
| vitest.config.ts | ||
| vitest.integration.config.ts | ||
| vitest.replay.config.ts | ||
| vitest.setup.ts | ||