| Principle | What it means for you | |
|---|---|---|
| Tree in Rust | Canonical structure, watch, walk, and search live natively. JS owns expansion, selection, scroll. | |
| Snapshot reads | All sync reads go through an immutable MirrorSnapshot. Safe during React render; identity-stable until the next change. |
|
| Flat over nested | Rows and entries cross NAPI as flat records. Virtualizers never walk a nested object tree. | |
| Stable EntryId | Session-scoped ids stay stable across renames/moves. Capped at 2^53-1 for JS safety. |
|
| Typed errors | Expected FS failures throw FileSystemError with POSIX-like codes — use try/catch, not Result unions. |
|
| Version channels | treeVersion and decorationVersion bump independently so SCM churn does not thrash row caches. |
Monotonic id assigned in Rust. Stable across renames and moves within a session. Reassigned on process boot. Safe as a React key, Map key, or JSON value.