refactor(js): extract sync module from app.js monofile (§3.1)
Second slice of the app.js split (after crypto). Moves the WebDAV sync section to js/app.sync.js: transport (_webdavCall), buildSyncSnapshot, applyRemoteSnapshot (merge + tombstone arbitration), runSyncNow, and the sync settings UI. - Byte-for-byte identical to the extracted block (verified before removal); no duplicate const; no top-level sync reference left in app.js. - Load order: AFTER app.js (unlike crypto, which loads before) because this module has a top-level side effect — `Bridge.onWebdavResult = …` — that needs Bridge/state/api already declared. Rule documented in CLAUDE.md. - index.html + BuildAssets whitelist + harness APP_PARTS updated; assets rebuilt to embed the new file. - Safety net: the existing merge tests exercise applyRemoteSnapshot / buildSyncSnapshot from the extracted file and stay green (42/42). app.js: 11936 → 11256 lines (crypto + sync now separate). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// Auto-generated by BuildAssets.ps1 - do not edit by hand.
|
||||
const
|
||||
EMBEDDED_ASSET_COUNT = 5;
|
||||
EMBEDDED_ASSET_COUNT = 6;
|
||||
EMBEDDED_ASSETS: array[0..EMBEDDED_ASSET_COUNT-1] of TEmbeddedAsset = (
|
||||
(UrlPath: '/index.html'; ResName: 'INDEX_HTML'),
|
||||
(UrlPath: '/js/argon2.js'; ResName: 'JS_ARGON2_JS'),
|
||||
(UrlPath: '/js/app.crypto.js'; ResName: 'JS_APP_CRYPTO_JS'),
|
||||
(UrlPath: '/js/app.js'; ResName: 'JS_APP_JS'),
|
||||
(UrlPath: '/js/app.sync.js'; ResName: 'JS_APP_SYNC_JS'),
|
||||
(UrlPath: '/css/style.css'; ResName: 'CSS_STYLE_CSS')
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user