2026-04-22 10:25:46 +08:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace LanMountainDesktop.PluginIsolation.Contracts;
|
|
|
|
|
|
|
|
|
|
[JsonSourceGenerationOptions(
|
|
|
|
|
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
|
|
|
|
|
PropertyNameCaseInsensitive = true,
|
|
|
|
|
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
|
|
|
|
[JsonSerializable(typeof(PluginCapabilityDeclaration))]
|
|
|
|
|
[JsonSerializable(typeof(List<PluginCapabilityDeclaration>))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSessionHandshakeRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSessionHandshakeResponse))]
|
|
|
|
|
[JsonSerializable(typeof(PluginReadyNotification))]
|
|
|
|
|
[JsonSerializable(typeof(PluginInitializeRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginInitializeResponse))]
|
|
|
|
|
[JsonSerializable(typeof(PluginStopRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginRestartRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginLifecycleStateChanged))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSettingsSnapshotRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSettingsSnapshotResponse))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSettingsWriteRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSettingsWriteResponse))]
|
|
|
|
|
[JsonSerializable(typeof(PluginSettingsChangedNotification))]
|
|
|
|
|
[JsonSerializable(typeof(PluginAppearanceSnapshotRequest))]
|
Introduce render gate and chart caching
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.
2026-05-06 16:00:45 +08:00
|
|
|
[JsonSerializable(typeof(PluginMaterialSurfaceSnapshot))]
|
2026-04-22 10:25:46 +08:00
|
|
|
[JsonSerializable(typeof(PluginAppearanceSnapshot))]
|
|
|
|
|
[JsonSerializable(typeof(PluginAppearanceChangedNotification))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiSurfaceDescriptor))]
|
|
|
|
|
[JsonSerializable(typeof(List<PluginUiSurfaceDescriptor>))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiAttachRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiAttachResponse))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiDetachNotification))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiCommandRequest))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiCommandResponse))]
|
|
|
|
|
[JsonSerializable(typeof(PluginUiStateChangedNotification))]
|
|
|
|
|
[JsonSerializable(typeof(PluginHeartbeatPing))]
|
|
|
|
|
[JsonSerializable(typeof(PluginHeartbeatPong))]
|
|
|
|
|
[JsonSerializable(typeof(PluginLogEntry))]
|
|
|
|
|
[JsonSerializable(typeof(PluginFaultReport))]
|
|
|
|
|
public partial class PluginIsolationJsonContext : JsonSerializerContext;
|