Skip to content

Commit e260c45

Browse files
committed
fix(migration): Clarify reports and dev startup
Successful migrations showed warnings for expected exclusions, while View Report only refreshed an already displayed summary. Development startup also required a manually built Migrator and an environment flag. - Open report details with per-domain results and grouped explanations. - Treat excluded session paths and orphaned parent relationships as informational, and count warnings by their actual severity. - Exclude normal built-in MiniApp storage imports from conflict counts while preserving existing target-conflict handling. - Simplify migration instructions in English and both Chinese locales. - Automatically retry denied Windows Job breakaway in Debug builds without an environment flag; retain Release launch behavior. - Incrementally build Data Migrator before Desktop dev and preview startup, and stop with an error if preparation fails. Validation: focused migration tests, Web and locale checks, Migrator script checks, and dev script syntax checks passed. Application startup and UI interaction were not exercised.
1 parent a22e57b commit e260c45

29 files changed

Lines changed: 214 additions & 139 deletions

File tree

‎OpenBitFun-Installer/src-tauri/src/installer/commands.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ pub(crate) fn launch_legacy_data_migrator(
872872
{
873873
let _ = request;
874874
return Err(
875-
"Legacy BitFun data migration is not supported by this Installer platform.".to_string(),
875+
"Legacy data migration is not supported by this Installer platform.".to_string(),
876876
);
877877
}
878878

@@ -882,13 +882,13 @@ pub(crate) fn launch_legacy_data_migrator(
882882
let roots = MigrationRoots::resolve_current_user()
883883
.map_err(|_| "Could not resolve the current-user migration storage.".to_string())?;
884884
let Some(source) = probe_legacy_source(&roots, ProbeLimits::default())
885-
.map_err(|_| "Could not safely inspect older BitFun data.".to_string())?
885+
.map_err(|_| "Could not safely inspect older data.".to_string())?
886886
else {
887887
return Ok(false);
888888
};
889889
if !source.supported {
890890
return Err(
891-
"The discovered BitFun data format is not supported by this Data Migrator."
891+
"The discovered legacy data format is not supported by this Data Migrator."
892892
.to_string(),
893893
);
894894
}

‎OpenBitFun-Installer/src/i18n/locales/en.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
},
227227
"complete": {
228228
"finish": "Finish",
229-
"migrateLegacyData": "Migrate old BitFun data after installation",
229+
"migrateLegacyData": "Migrate legacy data after installation",
230230
"migrateLegacyDataDescription": "Starts the installed Data Migrator. It keeps the old data unchanged, asks you to confirm the scope, and reopens OpenBitFun when migration ends."
231231
},
232232
"uninstall": {

‎OpenBitFun-Installer/src/i18n/locales/zh-TW.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
},
227227
"complete": {
228228
"finish": "完成",
229-
"migrateLegacyData": "安裝完成後遷移舊 BitFun 資料",
229+
"migrateLegacyData": "安裝完成後遷移舊 舊版資料",
230230
"migrateLegacyDataDescription": "啟動已安裝的 Data Migrator。它會保持舊資料不變,請你確認遷移範圍,並在遷移結束後重新開啟 OpenBitFun。"
231231
},
232232
"uninstall": {

‎OpenBitFun-Installer/src/i18n/locales/zh.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
},
227227
"complete": {
228228
"finish": "完成",
229-
"migrateLegacyData": "安装完成后迁移旧 BitFun 数据",
229+
"migrateLegacyData": "安装完成后迁移旧版 数据",
230230
"migrateLegacyDataDescription": "启动已安装的 Data Migrator。它会保持旧数据不变,请你确认迁移范围,并在迁移结束后重新打开 OpenBitFun。"
231231
},
232232
"uninstall": {

‎docs/interactive-capabilities/capabilities.json‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"title": "OpenBitFun Playbook",
55
"origin": "https://playbook.openbitfun.com",
66
"source": "src/shared/interactive-capabilities/catalog.json",
7-
"digest": "cf1a4fae19862b0613cb1144cead8fcaaa7559b47d5a5f0f3a2c361be991083b",
7+
"digest": "8d4ae13f253a7a10f6247435a773e9694c22d51d0bb0fcf936e6634130be9f7a",
88
"ownerDigest": "c0e5c187cf62bc6ed06196ce8520b3eb427bf268cf24659b72d2552fb1d99c54",
99
"searchAcceptance": [
1010
{
@@ -29850,37 +29850,37 @@
2985029850
"categoryId": "data",
2985129851
"titleZh": "旧版数据迁移",
2985229852
"titleEn": "Legacy data migration",
29853-
"summaryZh": "从本机旧版 BitFun 安装扫描并导入受支持的数据,查看去敏报告,同时保持旧来源不变。",
29854-
"summaryEn": "Scan and import supported data from a local legacy BitFun installation, inspect redacted reports, and leave the legacy source unchanged.",
29853+
"summaryZh": "从本机旧版 安装扫描并导入受支持的数据,查看去敏报告,同时保持旧来源不变。",
29854+
"summaryEn": "Scan and import supported data from a local legacy installation, inspect redacted reports, and leave the legacy source unchanged.",
2985529855
"keywordsZh": [
2985629856
"旧版数据迁移",
29857-
"BitFun 数据",
29857+
"旧版数据",
2985829858
"迁移报告",
2985929859
"导入旧数据",
2986029860
"Data Migrator"
2986129861
],
2986229862
"keywordsEn": [
2986329863
"legacy data migration",
29864-
"BitFun data",
29864+
"legacy data",
2986529865
"migration report",
2986629866
"import old data",
2986729867
"Data Migrator"
2986829868
],
2986929869
"highlightsZh": [
29870-
"只读扫描本机旧版 BitFun 数据",
29870+
"只读扫描本机旧版 数据",
2987129871
"按五个高层数据组选择迁移范围",
2987229872
"通过独立 Data Migrator 导入并查看去敏报告"
2987329873
],
2987429874
"highlightsEn": [
29875-
"Read-only scan of local legacy BitFun data",
29875+
"Read-only scan of local legacy data",
2987629876
"Choose migration scope across five high-level data groups",
2987729877
"Import through the standalone Data Migrator and inspect redacted reports"
2987829878
],
2987929879
"items": [
2988029880
{
2988129881
"id": "scan",
29882-
"titleZh": "只读扫描本机旧版 BitFun 来源及所选数据组",
29883-
"titleEn": "Read-only scan the local legacy BitFun source and selected data groups",
29882+
"titleZh": "只读扫描本机旧版 来源及所选数据组",
29883+
"titleEn": "Read-only scan the local legacy source and selected data groups",
2988429884
"control": {
2988529885
"kind": "open",
2988629886
"reasonCode": "unstructuredInteraction",
@@ -29945,11 +29945,11 @@
2994529945
],
2994629946
"agentExamplesZh": [
2994729947
"打开旧版数据迁移",
29948-
"带我查看 BitFun 迁移报告"
29948+
"带我查看 数据迁移报告"
2994929949
],
2995029950
"agentExamplesEn": [
2995129951
"Open legacy data migration",
29952-
"Show me the BitFun migration report"
29952+
"Show me the data migration report"
2995329953
],
2995429954
"destination": {
2995529955
"kind": "settings",
@@ -29963,22 +29963,22 @@
2996329963
"Legacy data migration",
2996429964
"数据与诊断",
2996529965
"Data & diagnostics",
29966-
"BitFun 数据",
29966+
"旧版数据",
2996729967
"迁移报告",
2996829968
"导入旧数据",
2996929969
"Data Migrator",
2997029970
"legacy data migration",
29971-
"BitFun data",
29971+
"legacy data",
2997229972
"migration report",
2997329973
"import old data",
29974-
"只读扫描本机旧版 BitFun 数据",
29974+
"只读扫描本机旧版 数据",
2997529975
"按五个高层数据组选择迁移范围",
2997629976
"通过独立 Data Migrator 导入并查看去敏报告",
29977-
"Read-only scan of local legacy BitFun data",
29977+
"Read-only scan of local legacy data",
2997829978
"Choose migration scope across five high-level data groups",
2997929979
"Import through the standalone Data Migrator and inspect redacted reports",
29980-
"只读扫描本机旧版 BitFun 来源及所选数据组",
29981-
"Read-only scan the local legacy BitFun source and selected data groups",
29980+
"只读扫描本机旧版 来源及所选数据组",
29981+
"Read-only scan the local legacy source and selected data groups",
2998229982
"选择设置、扩展、会话、记忆和远程连接迁移范围",
2998329983
"Choose settings, extensions, sessions, memory, and remote-connection migration scope",
2998429984
"确认关闭影响后启动独立 Data Migrator",
@@ -29988,9 +29988,9 @@
2998829988
"恢复已关闭的首次启动迁移提醒",
2998929989
"Restore the first-start migration reminder after it was disabled",
2999029990
"打开旧版数据迁移",
29991-
"带我查看 BitFun 迁移报告",
29991+
"带我查看 数据迁移报告",
2999229992
"Open legacy data migration",
29993-
"Show me the BitFun migration report"
29993+
"Show me the data migration report"
2999429994
],
2999529995
"docsUrl": "https://playbook.openbitfun.com/capabilities/setting.data.migration/"
2999629996
},

‎docs/interactive-capabilities/capabilities/setting.data.migration.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ title_en: "Legacy data migration"
1111

1212
> 设置 / Setting
1313
14-
从本机旧版 BitFun 安装扫描并导入受支持的数据,查看去敏报告,同时保持旧来源不变。
14+
从本机旧版 安装扫描并导入受支持的数据,查看去敏报告,同时保持旧来源不变。
1515

16-
Scan and import supported data from a local legacy BitFun installation, inspect redacted reports, and leave the legacy source unchanged.
16+
Scan and import supported data from a local legacy installation, inspect redacted reports, and leave the legacy source unchanged.
1717

1818
## 完整功能清单 / Everything included
1919

20-
- **Agent 可定位入口,需交互完成 / Agent opens; interaction required** · 只读扫描本机旧版 BitFun 来源及所选数据组
21-
- Read-only scan the local legacy BitFun source and selected data groups
20+
- **Agent 可定位入口,需交互完成 / Agent opens; interaction required** · 只读扫描本机旧版 来源及所选数据组
21+
- Read-only scan the local legacy source and selected data groups
2222
- **Agent 可定位入口,需交互完成 / Agent opens; interaction required** · 选择设置、扩展、会话、记忆和远程连接迁移范围
2323
- Choose settings, extensions, sessions, memory, and remote-connection migration scope
2424
- **Agent 可定位入口,需交互完成 / Agent opens; interaction required** · 确认关闭影响后启动独立 Data Migrator
@@ -55,8 +55,8 @@ Scan and import supported data from a local legacy BitFun installation, inspect
5555

5656
- “打开旧版数据迁移”
5757
- “Open legacy data migration”
58-
- “带我查看 BitFun 迁移报告”
59-
- “Show me the BitFun migration report”
58+
- “带我查看 数据迁移报告”
59+
- “Show me the data migration report”
6060

6161
Agent 会先查找相关功能或设置,确认目标后再替你打开、执行或修改。完整能力目录不会预先塞进对话上下文。
6262

‎docs/interactive-capabilities/technical/product-control-open-audit.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
4-
"catalogDigest": "cf1a4fae19862b0613cb1144cead8fcaaa7559b47d5a5f0f3a2c361be991083b",
4+
"catalogDigest": "8d4ae13f253a7a10f6247435a773e9694c22d51d0bb0fcf936e6634130be9f7a",
55
"count": 217,
66
"reasonCounts": {
77
"externalAuth": 4,
@@ -3752,8 +3752,8 @@
37523752
{
37533753
"capabilityId": "setting.data.migration",
37543754
"itemId": "scan",
3755-
"titleZh": "只读扫描本机旧版 BitFun 来源及所选数据组",
3756-
"titleEn": "Read-only scan the local legacy BitFun source and selected data groups",
3755+
"titleZh": "只读扫描本机旧版 来源及所选数据组",
3756+
"titleEn": "Read-only scan the local legacy source and selected data groups",
37573757
"reasonCode": "unstructuredInteraction",
37583758
"reasonZh": "扫描依赖当前设备上的旧版数据、实时范围选择和结果状态;Agent 会打开精确入口,并把选择与扫描保留在用户可见界面。",
37593759
"reasonEn": "Scanning depends on legacy data on the current device, live scope selection, and result state; the Agent opens the exact entry and keeps selection and scanning visible to the user.",

‎docs/interactive-capabilities/technical/tauri-command-map.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 2,
33
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
4-
"catalogDigest": "cf1a4fae19862b0613cb1144cead8fcaaa7559b47d5a5f0f3a2c361be991083b",
4+
"catalogDigest": "8d4ae13f253a7a10f6247435a773e9694c22d51d0bb0fcf936e6634130be9f7a",
55
"commandCount": 671,
66
"coverage": {
77
"commandCount": 671,

‎scripts/dev.cjs‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ function runCommandPrefixed(prefix, cmd, args, cwd = ROOT_DIR, envOverrides = {}
153153
const child = spawn(cmd, args, {
154154
cwd,
155155
shell: process.platform === 'win32',
156+
windowsHide: true,
156157
stdio: ['ignore', 'pipe', 'pipe'],
157158
env: {
158159
...process.env,
@@ -672,6 +673,22 @@ async function main() {
672673
process.exit(1);
673674
}
674675

676+
// Build after version generation and before Desktop starts. Cargo checks
677+
// freshness so an existing but stale Migrator is rebuilt as well.
678+
if (desktopMode) {
679+
printInfo('Preparing Data Migrator (incremental Debug build)');
680+
const migratorBuild = await runCommandPrefixed(
681+
'data-migrator',
682+
'cargo',
683+
['build', '-p', 'openbitfun-data-migrator', '--bin', 'openbitfun-data-migrator'],
684+
);
685+
if (!migratorBuild.ok) {
686+
printError('Data Migrator build failed; Desktop was not started');
687+
if (migratorBuild.error?.message) printError(migratorBuild.error.message);
688+
process.exit(1);
689+
}
690+
}
691+
675692
if (desktopMode) {
676693
const baselineHelperUrl = pathToFileURL(
677694
path.join(__dirname, 'frontend-workbench-dev-baseline.mjs')

‎scripts/product-identity-audit.mjs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const productIdentityOwner = 'src/crates/contracts/core-types/src/product_identi
2121
const retiredIdentityDataBoundaryFiles = new Set([
2222
'OPENBITFUN_LEGACY_DATA_MIGRATION_IMPLEMENTATION_PLAN.md',
2323
'OPENBITFUN_LEGACY_DATA_MIGRATION_INVENTORY.md',
24+
'src/apps/desktop/src/api/legacy_migration_api.rs',
25+
'src/web-ui/src/locales/en-US/settings/legacy-migration.json',
26+
'src/web-ui/src/locales/zh-CN/settings/legacy-migration.json',
27+
'src/web-ui/src/locales/zh-TW/settings/legacy-migration.json',
2428
'deploy/openbitfun-host/README.md',
2529
'deploy/openbitfun-host/migrate-market-data-v1.py',
2630
'src/apps/relay-server/README.md',

0 commit comments

Comments
 (0)