dsh-config-manager 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.d.ts +21 -2
- package/lib/client.js +558 -550
- package/lib/core/messages-core.d.ts +1 -0
- package/lib/core/messages-core.js +2 -0
- package/lib/core/migration-history.d.ts +18 -2
- package/lib/core/migration-history.js +19 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -3
- package/lib/sync/autosync-scheduler.js +6 -2
- package/lib/sync/baseline-heal.d.ts +35 -0
- package/lib/sync/baseline-heal.js +39 -0
- package/lib/sync/push-precheck.d.ts +35 -0
- package/lib/sync/push-precheck.js +58 -0
- package/lib/sync/sync-engine.d.ts +9 -12
- package/lib/sync/sync-engine.js +24 -43
- package/lib/ui/history-model.js +3 -2
- package/lib/ui/overview-view.d.ts +3 -3
- package/lib/ui/overview-view.js +9 -1
- package/package.json +1 -1
- package/src/client/history/history-locales.ts +2 -0
- package/src/client/home/HomePanel.tsx +9 -3
- package/src/client/locales.ts +2 -0
- package/src/client/sync/history-model.ts +3 -0
- package/src/client/sync/sync-locales.ts +2 -0
- package/src/core/messages-core.ts +2 -0
- package/src/core/migration-history.test.ts +19 -0
- package/src/core/migration-history.ts +28 -5
- package/src/index.ts +3 -3
- package/src/sync/autosync-scheduler.test.ts +23 -0
- package/src/sync/autosync-scheduler.ts +6 -2
- package/src/sync/baseline-heal.ts +74 -0
- package/src/sync/push-precheck.ts +75 -0
- package/src/sync/sync-engine.test.ts +88 -0
- package/src/sync/sync-engine.ts +33 -43
- package/src/ui/history-model.test.ts +2 -1
- package/src/ui/history-model.ts +3 -2
- package/src/ui/overview-view.test.ts +12 -0
- package/src/ui/overview-view.ts +12 -4
package/src/ui/overview-view.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface OverviewSyncLite {
|
|
|
45
45
|
export interface OverviewHistoryLite {
|
|
46
46
|
at: string
|
|
47
47
|
kind: string
|
|
48
|
-
result: 'success' | 'failed' | 'skipped'
|
|
48
|
+
result: 'success' | 'failed' | 'skipped' | 'pending'
|
|
49
49
|
summary: string
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -290,8 +290,8 @@ export function overviewKindKey(kind: string): string {
|
|
|
290
290
|
|
|
291
291
|
export interface OverviewActivityItem {
|
|
292
292
|
at: string
|
|
293
|
-
/** 徽章语义(success→ok / failed→error / skipped→warn,与 history-model 同判定)。 */
|
|
294
|
-
badge: 'ok' | 'error' | 'warn'
|
|
293
|
+
/** 徽章语义(success→ok / failed→error / skipped→warn / pending→pending,与 history-model 同判定)。 */
|
|
294
|
+
badge: 'ok' | 'error' | 'warn' | 'pending'
|
|
295
295
|
/** UI 渲染 key(`overview.kind.<kind>`;未知 kind 归一为 other → `overview.kind.other`)。 */
|
|
296
296
|
kindKey: string
|
|
297
297
|
/** 原始摘要(上层渲染前 redact())。 */
|
|
@@ -311,7 +311,15 @@ export function overviewActivity(
|
|
|
311
311
|
})
|
|
312
312
|
return sorted.slice(0, limit).map((e) => ({
|
|
313
313
|
at: e.at,
|
|
314
|
-
badge: e.result === 'success'
|
|
314
|
+
badge: e.result === 'success'
|
|
315
|
+
? 'ok'
|
|
316
|
+
: e.result === 'failed'
|
|
317
|
+
? 'error'
|
|
318
|
+
// pending:跑完了但仍有待裁决项(自动同步下行冲突未裁决)—— 首页必须说「待裁决」,
|
|
319
|
+
// 既不能红成「失败」,也不该混进「跳过」(那一轮确有上传/应用发生)
|
|
320
|
+
: e.result === 'pending'
|
|
321
|
+
? 'pending'
|
|
322
|
+
: 'warn',
|
|
315
323
|
kindKey: overviewKindKey(e.kind),
|
|
316
324
|
summary: e.summary,
|
|
317
325
|
}))
|