Skip to content

Commit e68a6d5

Browse files
Restore dropped XML docs in AppSettingsService
- Re-add summary for AccuracyRatioDivergenceLimit that was lost when the property moved into the App State block. - Document that Load() returns the shared cached instance so callers know not to mutate it and corrupt the cache for everyone else. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ae901ae commit e68a6d5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/PlanViewer.App/Services/AppSettingsService.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ static AppSettingsService()
4848
/// Loads settings from disk. Returns default settings if the file is missing or corrupt.
4949
/// Migrates legacy format settings from the old standalone file if present.
5050
/// </summary>
51+
/// <remarks>
52+
/// Returns the in-process cached instance — callers must not mutate it. Use
53+
/// <see cref="AppSettings.Clone"/> if you need an editable copy, or <see cref="Save"/>
54+
/// to persist new state (which also refreshes the cache).
55+
/// </remarks>
5156
public static AppSettings Load()
5257
{
5358
if (_cached != null)
@@ -192,6 +197,10 @@ internal sealed class AppSettings
192197
[JsonPropertyName("open_plans")]
193198
public List<string> OpenPlans { get; set; } = new();
194199

200+
/// <summary>
201+
/// Divergence limit for accuracy ratio coloring on plan links. Default 10.
202+
/// Links with accuracy ratio between 1/limit and limit keep the default edge color.
203+
/// </summary>
195204
[JsonPropertyName("accuracy_ratio_divergence_limit")]
196205
public double AccuracyRatioDivergenceLimit { get; set; } = 10;
197206

0 commit comments

Comments
 (0)