Skip to content

Commit a729f58

Browse files
committed
feat: deepen ownership discovery for v0.1.2
1 parent 58aec32 commit a729f58

12 files changed

Lines changed: 851 additions & 69 deletions

File tree

electron/analyzer.ts

Lines changed: 697 additions & 23 deletions
Large diffs are not rendered by default.

electron/store.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,12 @@ function sanitizeOwnershipMap(value: unknown): OwnershipMapResult | undefined {
473473
if (!value || typeof value !== "object") return undefined;
474474
const input = value as Partial<OwnershipMapResult>;
475475
if (
476+
input.schemaVersion !== 3 ||
476477
typeof input.drive !== "string" ||
477478
typeof input.scannedAt !== "string" ||
478479
typeof input.durationMs !== "number" ||
480+
typeof input.scannedDirectories !== "number" ||
481+
typeof input.scanTruncated !== "boolean" ||
479482
typeof input.installedApplications !== "number" ||
480483
typeof input.portableExecutables !== "number" ||
481484
!Array.isArray(input.entries) ||

electron/types.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,14 @@ export interface AnalysisResult {
310310
export interface OwnershipMapEntry {
311311
path: string;
312312
name: string;
313-
zone: "drive-root" | "program-files" | "program-data" | "app-data" | "user-profile";
313+
zone:
314+
| "drive-root"
315+
| "program-files"
316+
| "application-library"
317+
| "application-data"
318+
| "program-data"
319+
| "app-data"
320+
| "user-profile";
314321
category: AnalysisResult["category"];
315322
risk: AnalysisResult["risk"];
316323
recommendation: AnalysisResult["recommendation"];
@@ -321,9 +328,12 @@ export interface OwnershipMapEntry {
321328
}
322329

323330
export interface OwnershipMapResult {
331+
schemaVersion: number;
324332
drive: string;
325333
scannedAt: string;
326334
durationMs: number;
335+
scannedDirectories: number;
336+
scanTruncated: boolean;
327337
installedApplications: number;
328338
portableExecutables: number;
329339
entries: OwnershipMapEntry[];

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cdriveshiftai",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"private": true,
55
"description": "CDriveShiftAI - AI-assisted Windows disk organizer and safe cross-drive directory migration tool",
66
"main": "dist-electron/main.js",

src/lib/api.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,12 @@ const browserFallback: CDriveShiftApi = {
701701
}
702702
];
703703
const result: OwnershipMapResult = {
704+
schemaVersion: 3,
704705
drive,
705706
scannedAt: new Date().toISOString(),
706707
durationMs: 182,
708+
scannedDirectories: 1_862,
709+
scanTruncated: false,
707710
installedApplications: 286,
708711
portableExecutables: 1_462,
709712
entries,

src/lib/i18n.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const english = {
6464
"page.overviewTitle": "All drive space at a glance",
6565
"page.overviewDescription": "Find the data, identify its owner, then move it with a recoverable transaction.",
6666
"page.ownershipTitle": "Disk directory ownership map",
67-
"page.ownershipDescription": "Identify installations and application data across drive roots, ProgramData, and the current user's AppData.",
67+
"page.ownershipDescription": "Identify installations and application data across drive roots, application libraries, ProgramData, and the current user's AppData.",
6868
"page.analyzeTitle": "Who owns this directory?",
6969
"page.analyzeDescription": "Correlate installed apps and local evidence first, then use AI and web evidence only when confidence remains low.",
7070
"page.migrateTitle": "Free space without breaking the original path",
@@ -237,7 +237,7 @@ const zhCN: TranslationTable = {
237237
"page.overviewTitle": "全盘空间,一目了然",
238238
"page.overviewDescription": "先找数据,再识别归属;通过可恢复事务迁往其他磁盘。",
239239
"page.ownershipTitle": "磁盘目录归属地图",
240-
"page.ownershipDescription": "识别盘符根目录、ProgramData 和当前用户 AppData 中的应用安装目录与应用数据。",
240+
"page.ownershipDescription": "识别盘符根目录、应用库、ProgramData 和当前用户 AppData 中的安装目录与应用数据。",
241241
"page.analyzeTitle": "这个目录,属于谁?",
242242
"page.analyzeDescription": "先核对已安装应用和本地证据,只有低可信结果才使用 AI 与网络补证。",
243243
"page.migrateTitle": "释放当前磁盘空间,不影响程序使用",

src/lib/releaseHistory.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,47 @@ const previousReleases: Array<{
99
zh: Omit<BundledReleaseNote, "version">;
1010
en: Omit<BundledReleaseNote, "version">;
1111
}> = [
12+
{
13+
version: "0.1.1",
14+
zh: {
15+
summary: "修复局部放大镜调节尺寸及滚轮缩放时的白屏、灰帧和抖动,并降低后台资源占用。",
16+
sections: [
17+
{
18+
title: "放大镜与滑杆",
19+
items: [
20+
"放大镜采用双缓冲画面交换,以鼠标为中心平滑缩放并隐藏放大的鼠标图标。",
21+
"尺寸滑杆只保存配置,松开后才同步最终宽高,修复拖动时整页白屏。"
22+
]
23+
},
24+
{
25+
title: "常驻稳定性",
26+
items: [
27+
"全局监听增加单实例互斥,快捷键录入期间暂停监听。",
28+
"后台索引器降低优先级并收缩可回收工作集。"
29+
]
30+
}
31+
]
32+
},
33+
en: {
34+
summary: "Fixed blank, gray, and jumping desktop-lens frames during resizing and wheel zoom, while reducing background resource use.",
35+
sections: [
36+
{
37+
title: "Lens and sliders",
38+
items: [
39+
"Double-buffered frames zoom smoothly around the pointer and omit the magnified cursor.",
40+
"Size sliders only save configuration and synchronize final dimensions on release, fixing full-page blanking."
41+
]
42+
},
43+
{
44+
title: "Resident stability",
45+
items: [
46+
"Global listeners use a single-instance guard and pause during shortcut recording.",
47+
"The background indexer lowers priority and trims reclaimable working-set pages."
48+
]
49+
}
50+
]
51+
}
52+
},
1253
{
1354
version: "0.1.0",
1455
zh: {

src/lib/releaseNotes.ts

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,79 +7,79 @@ export interface BundledReleaseNote {
77
}
88

99
export const bundledReleaseNotes: BundledReleaseNote = {
10-
version: "0.1.1",
11-
summary: "本版重点修复局部放大镜在调节尺寸与滚轮缩放时的白屏、灰帧和抖动,并加强常驻稳定性与后台效率。",
10+
version: "0.1.2",
11+
summary: "本版重做非系统盘归属扫描,深入识别普通安装应用、绿色便携应用和应用数据,同时修正受限目录统计。",
1212
sections: [
1313
{
14-
title: "局部放大镜显示",
14+
title: "深层目录扫描",
1515
items: [
16-
"放大镜改为双缓冲画面交换:新画面准备完成后再显示,避免滚轮缩放期间闪成灰色或空白。",
17-
"滚轮以鼠标所在位置为中心平滑调整倍率,采用短帧间隔插值,减少内容上下跳动后回位。",
18-
"放大区域继续显示清晰边框、隐藏放大的鼠标图标,并可在截图、录屏或远程画面中正常看到。"
16+
"非系统盘不再只查看根目录一两层,而是在时间和数量保护范围内递归扫描最多 8 层、60000 个目录。",
17+
"结果页显示实际扫描目录数;达到时间或数量上限时会明确标记结果可能不完整。",
18+
"自动跳过 node_modules、缓存、虚拟环境和系统噪声目录,兼顾覆盖率与后台资源占用。"
1919
]
2020
},
2121
{
22-
title: "尺寸滑杆稳定性",
22+
title: "应用与绿色版识别",
2323
items: [
24-
"宽度和高度滑杆在事件回调内立即读取数值,修复拖动后 React 事件失效导致的整页白屏。",
25-
"拖动滑杆只更新并保存配置,不再误创建或显示放大镜窗口。",
26-
"松开滑杆后再把最终尺寸同步给原生监听器;实际使用放大镜时严格采用用户保存的宽高。"
24+
"根据深层可执行文件、卸载标记、app.asar、portable.ini 等证据识别无安装记录的绿色便携应用。",
25+
"将 bin、resources、runtime、Binaries 等内部目录归并到应用根目录,减少一个应用被拆成多条记录。",
26+
"解析 Steam appmanifest 文件,补充 Steam 游戏的正式名称与实际安装目录。"
2727
]
2828
},
2929
{
30-
title: "常驻与快捷键",
30+
title: "应用数据归属",
3131
items: [
32-
"全局监听器增加单实例互斥,避免同时运行旧版、便携版或安装版时争抢同一组按键与滚轮。",
33-
"单独按修饰键不会显示放大镜;录入快捷键期间暂停全局监听,确保组合键和滚轮能够被设置页接收。",
34-
"窗口渲染进程异常时自动恢复一次,降低极端情况下主界面停留在空白页的概率。"
32+
"识别应用附近的 data、config、profiles、saves、logs、userdata 等数据目录并关联到对应应用。",
33+
"应用库目录即使缺少注册表记录,也会依据本地文件结构给出保守的归属结果和可信度。",
34+
"弱注册表名称匹配不再覆盖更可靠的目录与可执行文件证据。"
3535
]
3636
},
3737
{
38-
title: "资源与验证",
38+
title: "受限目录与缓存",
3939
items: [
40-
"索引器在后台运行时降低进程优先级并收缩可回收工作集,减少静默常驻时的 CPU 与内存压力。",
41-
"新增原生放大镜画面、尺寸滑杆拖动和多实例监听冲突的自动化回归测试。",
42-
"更新与诊断继续提供逐条折叠并可滚动的离线历史,本版将 0.1.0 收录为上一版本。"
40+
"不存在的标准目录不再误报为权限受限;回收站、System Volume Information 等系统目录按系统项处理。",
41+
"受限统计只记录真实读取或权限错误,并在界面中使用准确提示。",
42+
"归属缓存结构升级到版本 3,旧的浅层扫描缓存会自动失效并重新扫描。"
4343
]
4444
}
4545
]
4646
};
4747

4848
export const bundledReleaseNotesEnglish: BundledReleaseNote = {
49-
version: "0.1.1",
49+
version: "0.1.2",
5050
summary:
51-
"This release fixes blank, gray, and jumping frames while resizing or zooming the desktop lens, and improves resident stability and efficiency.",
51+
"This release rebuilds non-system-drive ownership discovery to find installed apps, portable apps, and application data more deeply while correcting restricted-directory reporting.",
5252
sections: [
5353
{
54-
title: "Desktop lens rendering",
54+
title: "Deep directory scanning",
5555
items: [
56-
"The lens now swaps between two buffered surfaces only after a complete frame is ready, preventing blank or gray flashes during wheel zoom.",
57-
"Magnification eases at short frame intervals around the pointer, reducing the jump-and-return effect.",
58-
"The bordered lens still omits the magnified cursor and remains visible in screenshots, recordings, and remote sessions."
56+
"Non-system drives are recursively inspected up to 8 levels and 60,000 directories instead of stopping near the root.",
57+
"The result reports the actual directory count and explicitly marks scans truncated by time or quantity limits.",
58+
"Dependency, cache, virtual-environment, and system-noise trees are skipped to balance coverage with background cost."
5959
]
6060
},
6161
{
62-
title: "Size slider stability",
62+
title: "Installed and portable apps",
6363
items: [
64-
"Width and height values are captured synchronously inside React callbacks, fixing the full-page blank screen caused by an expired event during dragging.",
65-
"Dragging only previews and persists configuration; it no longer creates or shows a lens window.",
66-
"The final size is sent to the native listener after release and is used exactly when the lens is activated."
64+
"Deep executables, uninstall markers, app.asar, portable.ini, and similar evidence identify unpacked portable applications.",
65+
"Internal bin, resources, runtime, and Binaries folders are grouped under the application root.",
66+
"Steam app manifests provide official names and actual installation directories."
6767
]
6868
},
6969
{
70-
title: "Resident mode and shortcuts",
70+
title: "Application data ownership",
7171
items: [
72-
"A named single-instance guard prevents installed, portable, or older builds from competing for the same global keyboard and wheel hook.",
73-
"Modifier keys alone do not open the lens, and global listening pauses during shortcut recording.",
74-
"The main window attempts one renderer recovery after an unexpected render-process failure."
72+
"Nearby data, config, profiles, saves, logs, and userdata directories are associated with their applications.",
73+
"Application-library directories receive conservative local ownership evidence even without registry records.",
74+
"Weak registry name matches no longer override stronger filesystem and executable evidence."
7575
]
7676
},
7777
{
78-
title: "Efficiency and verification",
78+
title: "Restricted paths and cache",
7979
items: [
80-
"The background indexer lowers its process priority and trims reclaimable working-set pages to reduce idle CPU and memory pressure.",
81-
"Automated regression coverage now includes native lens frames, slider dragging, and multi-instance listener conflicts.",
82-
"Update & diagnostics retains independently collapsible, scrollable offline history and now includes 0.1.0."
80+
"Missing standard folders no longer count as access restrictions, while protected system folders are classified as system entries.",
81+
"Only real read or permission failures contribute to the restricted-path warning.",
82+
"Ownership cache schema version 3 invalidates stale shallow-scan results automatically."
8383
]
8484
}
8585
]

src/types.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,14 @@ export interface AnalysisResult {
345345
export interface OwnershipMapEntry {
346346
path: string;
347347
name: string;
348-
zone: "drive-root" | "program-files" | "program-data" | "app-data" | "user-profile";
348+
zone:
349+
| "drive-root"
350+
| "program-files"
351+
| "application-library"
352+
| "application-data"
353+
| "program-data"
354+
| "app-data"
355+
| "user-profile";
349356
category: AnalysisResult["category"];
350357
risk: AnalysisResult["risk"];
351358
recommendation: AnalysisResult["recommendation"];
@@ -356,9 +363,12 @@ export interface OwnershipMapEntry {
356363
}
357364

358365
export interface OwnershipMapResult {
366+
schemaVersion: number;
359367
drive: string;
360368
scannedAt: string;
361369
durationMs: number;
370+
scannedDirectories: number;
371+
scanTruncated: boolean;
362372
installedApplications: number;
363373
portableExecutables: number;
364374
entries: OwnershipMapEntry[];

0 commit comments

Comments
 (0)