fix(data): harden migration cleanup flow

Show the pending cleanup notice in CLI Web after initialization while excluding the browser-only runtime.\n\nStub config persistence in the cleanup test so it cannot overwrite the user's real data directory settings.
This commit is contained in:
digua committed 2026-07-18 16:15:19 +08:00
1 parent 355d6cfd4d
commit 1f3069f359
2 files changed
+12 -7

No files matched your search

@@ -274,7 +274,14 @@ test('pending data directory cleanup can be dismissed and deleted explicitly', (
const switchResult = createNodeDataDirSwitch({ systemDir, currentDir, targetDir, migrate: true })
assert.equal(switchResult.success, true)
assert.equal(applyPendingNodeDataDirMigration(systemDir).success, true)
assert.equal(
applyPendingNodeDataDirMigration(systemDir, {
writeConfigField() {
// Config persistence is covered by the preceding adapter-level test.
},
}).success,
true
)
const [cleanup] = getPendingDataDirCleanups(systemDir)
assert.ok(cleanup)