- No unexpected error (about a replicator) during early stage of initialisation.
### New features
- Now we can configure multiple Remote Databases of the same type, e.g, multiple CouchDBs or S3 remotes.
- We can switch between multiple Remote Databases in the settings dialogue.
The P2P test suite relies on several specific environment variables (e.g., `P2P_TEST_ROOM_ID`, `P2P_TEST_PASSPHRASE`, `P2P_TEST_RELAY`) loaded from `.env` or `.test.env`. Because these are not documented anywhere in the repository, new contributors will be unable to configure their local environment to run the P2P tests successfully.
Affected files: vitest.config.p2p.ts
Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
- Add inline TODO comment in runCommand.ts about standardising
replication failure cause identification logic.
- Add test-sync-locked-remote-linux.sh that verifies:
1. sync succeeds when the remote milestone is not locked.
2. sync fails with an actionable error when the remote milestone
has locked=true and accepted_nodes is empty.
When the remote database is locked and the CLI device is not in the
accepted_nodes list, openReplication returns false with no CLI-specific
guidance. The existing log message ('Fetch rebuilt DB, explicit
unlocking or chunk clean-up is required') is aimed at the Obsidian
plugin UI.
Check the replicator's remoteLockedAndDeviceNotAccepted flag after
sync failure and print a clear message directing the user to unlock
from the Obsidian plugin.
Ref: #832
Node.js v25 provides a built-in localStorage on globalThis, but without
`--localstorage-file` it is an empty object lacking getItem/setItem.
The existing check `!("localStorage" in globalThis)` passes, so the
polyfill is skipped and the CLI crashes with:
TypeError: localStorage.getItem is not a function
Check for getItem as well so the polyfill is applied when the native
implementation is incomplete.
- Fixed flaky timing issues in P2P synchronisation.
- Fixed more binary file handling issues in CLI.
### Tests
- Rewrite P2P end-to-end tests to use the CLI as host.