From fedb0317bc5b4baf1ce9a34dab1741d220fc8cb2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 13:02:37 +0100 Subject: [PATCH] ax(mining): replace restatement comments on settings structs with usage examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2 — comments must show HOW with real values, not restate WHAT the type already says. WindowState, MinerDefaults and AppSettings all had prose descriptions ("stores…") replaced with concrete call-site examples. Co-Authored-By: Charon --- pkg/mining/settings_manager.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/mining/settings_manager.go b/pkg/mining/settings_manager.go index 3b0028f..02c7b94 100644 --- a/pkg/mining/settings_manager.go +++ b/pkg/mining/settings_manager.go @@ -12,7 +12,8 @@ import ( const settingsFileName = "settings.json" -// WindowState stores the last window position and size +// state := settingsManager.GetWindowState() +// if state.Maximized { w.SetSize(state.Width, state.Height) } type WindowState struct { X int `json:"x"` Y int `json:"y"` @@ -21,7 +22,7 @@ type WindowState struct { Maximized bool `json:"maximized"` } -// MinerDefaults stores default configuration for miners +// settingsManager.SetMinerDefaults(MinerDefaults{DefaultPool: "pool.minexmr.com:4444", CPUMaxThreadsHint: 50}) type MinerDefaults struct { DefaultPool string `json:"defaultPool,omitempty"` DefaultWallet string `json:"defaultWallet,omitempty"` @@ -30,7 +31,8 @@ type MinerDefaults struct { CPUThrottleThreshold int `json:"cpuThrottleThreshold,omitempty"` // Throttle when CPU exceeds this % } -// AppSettings stores application-wide settings +// settings := settingsManager.Get() +// if settings.Theme == "dark" { applyDarkMode() } type AppSettings struct { // Window settings Window WindowState `json:"window"`