mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 15:44:25 +08:00
Replace UI DispatcherTimer polling with a StudySnapshotRenderGate across multiple widgets to queue and apply only the latest analytics snapshot; components updated include StudyDeductionReasonsWidget, StudyEnvironmentWidget, StudyInterruptDensityWidget, StudyNoiseCurveWidget. Add StudySnapshotRenderGate implementation to coordinate rendering and monitoring leases and update subscription/lease lifecycle handling (subscribe/unsubscribe, Acquire/Dispose leases, Clear/Dispose gate). Rewrite chart controls (StudyNoiseCurveChartControl and StudyNoiseDistributionScatterChartControl) to use stable logical-time origins, split series into static vs dynamic tails, add geometry/sample caching, stable jitter/coordinate mapping helpers, and expose internal helpers & counts for testing. Add unit tests (StudyComponentRenderingTests) covering the render gate and chart behaviors (layer counts, logical X mapping, stable jitter, cache rebuild). These changes improve rendering correctness and performance by avoiding redundant renders and enabling deterministic chart layout.
PLONDS 骨架
Penguin Logistics Online Network Distribution System(企鹅物流在线网络分发系统),简称 PLONDS,是 LanMountainDesktop 的独立更新分发骨架。
本目录有意与主应用和启动器隔离,仅包含新的分发协议、一个轻量级的只读 API,以及示例 S3 风格的元数据文件。
目录结构
PenguinLogisticsOnlineNetworkDistributionSystem/
README.md
src/
Plonds.Shared/
Plonds.Api/
sample-data/
meta/
channels/
stable/
windows-x64/
windows-x86/
linux-x64/
distributions/
项目说明
Plonds.Shared提供协议常量和数据模型。Plonds.Core负责哈希计算、差异生成、对象仓库生成、清单生成、签名和发布编排。Plonds.Tool是面向 CI 的命令行入口。PowerShell 脚本应保持为围绕此工具的薄包装层。Plonds.Api是一个轻量级只读 API,从类似 S3 布局的本地文件夹中读取元数据。
架构设计
PLONDS 有意围绕单一的 C# 实现栈构建,以确保协议和发布行为不会在不同语言之间产生偏差。
宿主应用
-> 检查更新、下载对象、暂存传入的负载
启动器
-> 验证签名、应用文件映射、切换部署、回滚
PLONDS.Api
-> 面向客户端的只读元数据投影
PLONDS.Tool
-> CI/发布命令界面
PLONDS.Core
-> 哈希/差异/对象仓库/签名/发布实现
PLONDS.Shared
-> 协议常量和 DTO
v1 规则
- 核心协议行为应位于
Plonds.Core中,而非 PowerShell 脚本。 scripts/*.ps1仅可作为 GitHub Actions 和本地便利的薄包装层保留。- 宿主应用保留下载职责。
- 启动器保留应用、原子切换、快照和回滚职责。
存储布局
第一版本保持固定的对象根目录:
lanmountain/update/
repo/sha256/<前缀>/<哈希>
meta/channels/<频道>/<平台>/latest.json
meta/distributions/<分发ID>.json
installers/<平台>/<版本>/...
已规划但 v1 中未启用:
lanmountain/update/repo-compressed/<算法>/<前缀>/<哈希>
lanmountain/update/patches/<算法>/<基础哈希>/<目标哈希>
公共接口
API 基础路径为 /api/plonds/v1。
GET /healthz- 健康检查GET /api/plonds/v1/metadata- 获取元数据目录GET /api/plonds/v1/channels/{channel}/{platform}/latest?currentVersion=...- 获取指定频道和平台的最新版本GET /api/plonds/v1/distributions/{distributionId}- 获取指定分发版本的完整信息
本地运行
dotnet run --project src/Plonds.Api
默认情况下,API 从 sample-data 读取元数据。