mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
feat: value history heatmap, write-fail guard, crash handler hardening
- Value history ring buffer (10 slots) tracks per-node change frequency - Three-level heatmap: cold (blue), warm (amber), hot (red) via theme - Heat persists indefinitely (no fade) — shows analysis history - Calltip on hover shows previous values list - Old themes auto-derive heat colors from existing palette - Write failures no longer apply optimistic visual updates - Crash handler: re-entrancy guard, context dump before risky APIs
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
"indHoverSpan": "#E6B450",
|
||||
"indCmdPill": "#2a2a2a",
|
||||
"indDataChanged": "#8fbc7a",
|
||||
"indHeatCold": "#569cd6",
|
||||
"indHeatWarm": "#E6B450",
|
||||
"indHeatHot": "#f44747",
|
||||
"indHintGreen": "#5a8248",
|
||||
"markerPtr": "#f44747",
|
||||
"markerCycle": "#e5a00d",
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
"indHoverSpan": "#b180d7",
|
||||
"indCmdPill": "#2d2d30",
|
||||
"indDataChanged": "#8fbc7a",
|
||||
"indHeatCold": "#569cd6",
|
||||
"indHeatWarm": "#d69d85",
|
||||
"indHeatHot": "#f44747",
|
||||
"indHintGreen": "#5a8248",
|
||||
"markerPtr": "#f44747",
|
||||
"markerCycle": "#e5a00d",
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
"indHoverSpan": "#AA9565",
|
||||
"indCmdPill": "#2a2a2a",
|
||||
"indDataChanged": "#6B959F",
|
||||
"indHeatCold": "#6B959F",
|
||||
"indHeatWarm": "#AA9565",
|
||||
"indHeatHot": "#A05040",
|
||||
"indHintGreen": "#464646",
|
||||
"markerPtr": "#6B3B21",
|
||||
"markerCycle": "#AA9565",
|
||||
|
||||
@@ -28,6 +28,9 @@ const ThemeFieldMeta kThemeFields[] = {
|
||||
{"indHoverSpan", "Hover Span", "Indicators", &Theme::indHoverSpan},
|
||||
{"indCmdPill", "Cmd Pill", "Indicators", &Theme::indCmdPill},
|
||||
{"indDataChanged","Data Changed", "Indicators", &Theme::indDataChanged},
|
||||
{"indHeatCold", "Heat Cold", "Indicators", &Theme::indHeatCold},
|
||||
{"indHeatWarm", "Heat Warm", "Indicators", &Theme::indHeatWarm},
|
||||
{"indHeatHot", "Heat Hot", "Indicators", &Theme::indHeatHot},
|
||||
{"indHintGreen", "Hint Green", "Indicators", &Theme::indHintGreen},
|
||||
{"markerPtr", "Pointer", "Markers", &Theme::markerPtr},
|
||||
{"markerCycle", "Cycle", "Markers", &Theme::markerCycle},
|
||||
@@ -50,6 +53,14 @@ Theme Theme::fromJson(const QJsonObject& o) {
|
||||
if (o.contains(kThemeFields[i].key))
|
||||
t.*kThemeFields[i].ptr = QColor(o[kThemeFields[i].key].toString());
|
||||
}
|
||||
// Derive heat colors from the theme's own palette when keys are absent
|
||||
// cold = keyword blue, warm = hover/string amber, hot = marker red
|
||||
if (!t.indHeatCold.isValid())
|
||||
t.indHeatCold = t.syntaxKeyword;
|
||||
if (!t.indHeatWarm.isValid())
|
||||
t.indHeatWarm = t.indHoverSpan.isValid() ? t.indHoverSpan : t.syntaxString;
|
||||
if (!t.indHeatHot.isValid())
|
||||
t.indHeatHot = t.markerPtr;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,10 @@ struct Theme {
|
||||
// ── Indicators ──
|
||||
QColor indHoverSpan; // hover link text
|
||||
QColor indCmdPill; // command row pill bg
|
||||
QColor indDataChanged; // changed data values
|
||||
QColor indDataChanged; // changed data values (legacy, fallback for old themes)
|
||||
QColor indHeatCold; // heatmap level 1 (changed once)
|
||||
QColor indHeatWarm; // heatmap level 2 (moderate changes)
|
||||
QColor indHeatHot; // heatmap level 3 (frequent changes)
|
||||
QColor indHintGreen; // comment/hint text
|
||||
|
||||
// ── Markers ──
|
||||
|
||||
Reference in New Issue
Block a user