feat: show persisted sync errors

This commit is contained in:
2026-06-29 03:23:45 +08:00
parent f0c7b31c9e
commit a4d4e5ed0e
3 changed files with 26 additions and 0 deletions
+2
View File
@@ -223,6 +223,8 @@ if command -v node &>/dev/null; then
report "browser inbox frontend behavior" $?
node "$ROOT/scripts/smoke-search-plugin.js"
report "search frontend behavior" $?
node "$ROOT/scripts/smoke-sync-plugin.js"
report "sync frontend behavior" $?
else
echo " ⚠️ node not available — skipping frontend smoke"
fi
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const root = path.resolve(__dirname, '..');
const sourcePath = path.join(root, 'plugins', 'sync', 'frontend', 'src', 'SyncSettings.svelte');
const source = fs.readFileSync(sourcePath, 'utf8');
if (!source.includes('settings.lastError')) {
throw new Error('SyncSettings must render persisted settings.lastError');
}
if (!source.includes('sanitizeError(settings.lastError)')) {
throw new Error('SyncSettings must sanitize persisted sync errors before rendering');
}
if (!source.includes('Last sync error')) {
throw new Error('SyncSettings must label the persisted sync error');
}
console.log('sync plugin smoke passed');