Add IPC backoff/retries and safer disposal

Introduce exponential backoff, jitter and retry logic across IPC components to improve robustness and avoid tight retry loops; make disposal idempotent and add connection guards. Key changes:
- LauncherCoordinatorIpcServer / LauncherIpcServer: add backoff constants, ComputeBackoff(), consecutive error tracking and delayed retries with jitter.
- LanMountainDesktopIpcClient / LauncherIpcClient: add connect retry loops, timeouts, delayed retries, improved error logging, and use ArrayPool for buffered async writes; ensure proper cleanup on failures.
- PublicIpcHostService: add disposed flag, guard OnPeerConnected and Dispose, and clear connected peers on dispose.
- Add many auto-generated commit analysis docs under docs/auto_commit_md and new scripts for analyzing/generating commit docs.
These changes aim to make IPC connection handling more resilient and resource-safe.
This commit is contained in:
lincube
2026-05-07 21:39:21 +08:00
parent 84caca02bf
commit d8f75e86be
159 changed files with 8809 additions and 31 deletions

View File

@@ -0,0 +1,84 @@
# Commit 深度分析报告
**提交哈希**: `5b4b9f32b5e18ec19961405908e879cb6959887a`
**提交时间**: 2025-05-24 09:29:25
**作者**: lincube <lincube3@hotmail.com>
**重要性**: FEATURE
## 提交消息
```
Add OOBE redesign, theme & data location support
```
## 变更统计
- **新增文件**: 25
- **修改文件**: 18
- **删除文件**: 5
### 文件类型分布
- `.cs`: 35 个文件
- `.axaml`: 10 个文件
- `.json`: 3 个文件
## 变更文件列表
| 文件路径 | 变更类型 |
|---------|---------|
| `LanMountainDesktop/Views/OOBE/` | 新增 |
| `LanMountainDesktop/ViewModels/OOBE/` | 新增 |
| `LanMountainDesktop/Services/DataLocation/` | 新增 |
## 影响分析
- 受影响的模块: LanMountainDesktop, Views, ViewModels, Services
- 涉及 35 个 C# 文件变更
- 涉及 UI/XAML 文件变更
- 这是一个功能新增提交,扩展了项目能力
## 代码审查要点
- ⚠️ 关键文件变更: App.axaml - 需要特别关注
- ⚠️ 数据位置变更可能影响现有用户数据
## 详细分析
### 1. OOBE 重新设计
OOBEOut-of-Box Experience开箱体验得到了全面重新设计
- **新用户引导**: 改进了首次启动的用户引导流程
- **主题选择**: 在 OOBE 中增加了主题选择功能
- **数据位置配置**: 允许用户选择数据存储位置
### 2. 主题系统增强
- 支持更多主题选项
- 改进了主题切换的流畅性
- 添加了主题预览功能
### 3. 数据位置支持
- **便携式模式**: 支持将数据存储在应用目录
- **系统模式**: 支持将数据存储在系统标准位置
- **迁移工具**: 提供了数据迁移功能
### 4. 技术实现要点
```csharp
public enum DataLocationType
{
Portable, // 应用目录
System, // 系统标准位置
Custom // 自定义位置
}
public class DataLocationService
{
public DataLocationType CurrentLocation { get; set; }
public string GetDataPath() { /* ... */ }
}
```
### 5. 潜在风险
- 数据位置变更可能导致数据丢失
- 需要处理权限问题
- 跨平台路径兼容性
## 建议
1. 添加数据位置变更的确认提示
2. 提供数据备份功能
3. 完善权限检查和错误提示
4. 添加数据迁移向导