Commit graph

947 commits

Author SHA1 Message Date
42c9d55489 split: sync-engine rewrite (sync-operations + sync-client.ts)
Replace the single unrestricted-syncer.ts with a two-loop architecture:
- syncer.ts drains the FIFO wire queue (HTTP + WS handlers).
- reconciler.ts moves files to make localPath match remoteRelativePath
  (topo-sorted move graph, in-memory cycle resolution with crash-safe
  swap markers).
- sync-event-queue.ts holds the byDocId / byLocalPath indexes and the
  pending-create promise chain.
- offline-change-detector.ts, expected-fs-events.ts, types.ts, and a
  rewritten cursor-tracker.ts / file-change-notifier.ts round it out.
Plus sync-client.ts wiring, tracing/sync-history.ts updates, index.ts
re-exports, and sync-client tsconfig/webpack/package.json.
2026-05-08 21:37:26 +01:00
0fda95ff8e split: sync-client file-operations + persistence
Rewrite file-operations and safe-filesystem-operations (and their tests),
update filesystem-operations. Drop persistence/database.ts (in-memory
record store moved into sync-event-queue). Update persistence/settings.ts.
2026-05-08 21:36:54 +01:00
45b86cffe4 split: sync-client services layer
Add build-vault-url helper. Rewrite fetch-controller and websocket-manager
(plus their tests). Update server-config and sync-service to consume the
new error types and the regenerated API types from previous chunks.
2026-05-08 21:36:41 +01:00
9d99a4ac23 split: sync-client utils and errors reorganization
Move error classes from services/ and file-operations/ into a new errors/
directory (authentication-error, server-version-mismatch-error,
sync-reset-error, file-not-found-error), plus add file-already-exists-error
and http-client-error. Update consts.ts and utils/* (await-all,
create-client-id, hash, rate-limit, find-matching-file). Replace
data-structures (locks, min-covered, event-listeners, fix-sized-cache) and
add debugging utilities (in-memory-file-system, log-to-console,
slow-web-socket-factory). Removes utils/create-promise.ts.
2026-05-08 21:36:29 +01:00
f7beb31d8f split: regenerated TS API type bindings
Auto-generated TS types regenerated from Rust ts-rs derives, mirrored into
frontend/sync-client/src/services/types/ and frontend/history-ui/src/lib/types/.
Adds ListVaultsResponse, VaultHistoryResponse, VaultInfo and updates several
existing types; removes DeleteDocumentVersion and UpdateDocumentVersion.
2026-05-08 21:36:13 +01:00
042233c4d7 split: server websocket + cursors
src/server/websocket.rs handshake/catch-up rewrite, app_state/cursors.rs,
app_state/websocket/{broadcasts,models,utils}.rs.
2026-05-08 21:35:52 +01:00
4ba439b874 split: server REST endpoints + rate limiting
server.rs router rewrite, auth.rs, device_id_header.rs, requests.rs,
responses.rs, plus per-endpoint changes: create/update/delete_document,
fetch_document_version{,_content,s}, fetch_latest_documents, index.rs.
Adds: fetch_vault_history, list_vaults, rate_limit (new files).
2026-05-08 21:35:41 +01:00
2d5edc6ec5 split: server database (app_state, migrations, models)
src/app_state.rs, src/app_state/database.rs (large schema/query rewrite),
two new migrations (add_idempotency_key, add_creation_vault_update_id),
and src/app_state/database/models.rs.
2026-05-08 21:35:30 +01:00
a9ce09b59d split: server foundation (Cargo, config, errors, utils, main)
Cargo.{toml,lock} bumps, build.rs, config-e2e.yml, rust-toolchain.toml,
src/config/* (database/logging/server/user configs), src/consts.rs,
src/errors.rs, src/main.rs, and src/utils/* (dedup_paths,
find_first_available_path, rotating_file_writer, sanitize_path).
2026-05-08 21:35:18 +01:00
70f97c4b16 split: CI workflows, scripts, root tooling, and docs
Some checks failed
Check / build (pull_request) Has been cancelled
E2E tests / build (pull_request) Has been cancelled
Publish CLI / publish-docker (pull_request) Has been cancelled
Publish server Docker image / publish-docker (pull_request) Has been cancelled
Forgejo workflows (new), GitHub workflow tweaks, .gitignore/.vscode, root
package-lock, rustfmt.toml, scripts/* updates, docs/ updates including
data-flow / authentication / server-setup, CLAUDE.md and README updates.
2026-05-08 21:35:07 +01:00
9a75569e83 Bump versions to 0.14.0 2025-12-14 23:31:40 +00:00
5efe30d9d6 Format & lint 2025-12-14 17:19:25 +00:00
0e0a85df82 Check node version 2025-12-14 17:19:25 +00:00
42a77a5cd5 Upload logs instead of printing them 2025-12-14 17:19:25 +00:00
4fb3839b3e Add lock tests 2025-12-14 17:19:25 +00:00
7daa363723 Unsubscribe in SyncClient 2025-12-14 17:19:25 +00:00
47f24e168b Wait for idle instead 2025-12-14 17:19:25 +00:00
b6ab01d56a Handle websocket race condition 2025-12-14 17:19:25 +00:00
580c993071 Reject pending locks on reset 2025-12-14 17:19:25 +00:00
299c3baea9 Don't publish PRs 2025-12-14 17:19:25 +00:00
1b71f3e780 Always kill server 2025-12-14 17:19:25 +00:00
8aba8ee44a Extract const 2025-12-14 17:19:25 +00:00
079cd26faa Bump versions to 0.13.1 2025-12-11 22:10:21 +00:00
f6dccc4492 Try fixing E2E tests more 2025-12-11 22:08:48 +00:00
387e7afd58 Allow-list error type 2025-12-10 23:14:50 +00:00
056fb96ce8 chmod +x 2025-12-10 22:35:44 +00:00
9ac7fdbeb7
Improve CI (#181) 2025-12-10 22:03:13 +00:00
8e4ac3a26a Fix manifests 2025-12-08 20:11:56 +00:00
e2b24725ef Bump versions to 0.13.0 2025-12-07 19:29:15 +00:00
2db49da654 Fix cron 2025-12-07 16:42:23 +00:00
dbc63fcecd Once an hour 2025-12-07 16:42:23 +00:00
ce6d44f26b Add log line 2025-12-07 16:42:23 +00:00
6608804d34 Refactor & lint 2025-12-07 16:42:23 +00:00
e47d8a8179 Fix file watching 2025-12-07 16:42:23 +00:00
e9252955b4 Align prettier & editorconfig 2025-12-07 16:42:23 +00:00
570c41299b Create vault dir if doesn't exist 2025-12-07 16:42:23 +00:00
78a706ab8d Move log level to config file 2025-12-07 16:42:23 +00:00
8439bd8b92 Delete temp folder before test 2025-12-07 16:42:23 +00:00
504ddb6ff6 Pick up new events API 2025-12-07 16:42:23 +00:00
0a5bbbf20e Fix and apply editorconfig 2025-12-07 16:42:23 +00:00
b05e415acf Apply editorconfig 2025-12-07 16:42:23 +00:00
ad3191957a Add event handler class 2025-12-07 16:42:23 +00:00
1ed22c72d7 Enforce editorconfig 2025-12-07 16:42:23 +00:00
e6bfefd2d5 Fix file creation deduplication 2025-12-07 16:42:23 +00:00
9e06d99512 Run all tests 2025-12-07 16:42:23 +00:00
3f2ecfb0b6 Use efficient filters 2025-12-07 16:42:23 +00:00
07cb8491e2 Bump versions to 0.12.0 2025-12-06 22:21:55 +00:00
aca1ca50a4 Update reconcile to 0.8.0 2025-12-06 22:20:31 +00:00
2885026d2f Remove serde_with and use human serde instead 2025-12-06 22:14:20 +00:00
e6f7543114 Fix broken endpoint 2025-12-06 22:01:01 +00:00