FreeLattice · Celeste reading home

Public, free to read, reuse, and adapt — Kirk Patrick Miller's notice for this edition. Not a patent grant.

GROK_NEXT_TEMPERATURE_GAUGE_v0.1_2026-10-02.txt · c03

91d95bab4c · words 1200 · characters 21376–29558

Previous section · Next section

Exact section text · Full source · Source index

Archive pages whose extracted text matched this section: 1766, 1767. Unmatched pages stay on the source record with the checked page method. They are not guessed into a section.

No topic tag was earned for this page under the recorded evidence rule.

 Rewriting sophia garden body · inventing USPTO · Bridge binaries · Quiet Room · merging chairs · politics essay · requiring Kirk input mid-PR.
diff --git a/docs/library/TEMPERATURE_GAUGE_v0.1.md b/docs/library/TEMPERATURE_GAUGE_v0.1.md
new file mode 100644
index 00000000..49481526
--- /dev/null
+++ b/docs/library/TEMPERATURE_GAUGE_v0.1.md
@@ -0,0 +1,46 @@
+# Temperature Gauge v0.1 (v-temperature-gauge-v0.1)
+
+FreeLattice layer. October 2, 2026. Built from Celeste's audit of every Temperature Gauge page in both repos.
+
+**Temperature:** the glass shows every line in the color you chose, and the long lines reach all the way across.
+
+## Where the gauge lives
+
+| Page | What it is | Data |
+|---|---|---|
+| `docs/temperature-gauge.html` | the live gauge (Chart.js 4.4.0 in `lib/`, zoom plugin) | live: Yahoo Finance v8 chart API through our own Cloudflare worker (`desktop/data-proxy-worker`), then public CORS proxies as fallback. No demo data. |
+| `docs/temperature-playground.html` | Fable's phi-spiral reference | a slider plus a seeded random 34-reading ribbon (a demo, never market data) |
+| `docs/code-temperature-gauge.html`, `docs/code-temperature.html`, `docs/for-fable-go12-temperature.html` | Code Mirror and review pages about the standalone Python app | no charts |
+| FreeLattice-Alpha | no gauge page; the research galaxy has a "Gauge" lumino and the words "Gauge is experimental, nothing auto-trades" | none |
+
+## What was wrong (checked in a browser on main 0218d570, SPY, all five timeframes)
+
+- Changing a color blanked the price chart. Chart.js puts back a canvas's first inline style when its chart is destroyed, and the first price chart was made while the loading screen had the canvas hidden. Every direct `renderChart` (a swatch, Stack, Log) left the main chart empty. Only a fresh Analyze brought it back.
+- The Temperature, Delta T and IPS swatches changed only their label. Temperature and Delta T bars are colored by zone and sign, and the TP Spread line was a fixed gold (its swatch and label said coral).
+- Price, Bollinger bands, EMA 200, Gravity, Buy and Sell markers, and the Gyro Hub, Ring and Orbit lines had fixed colors. No color picker reached the EMA lines in price mode.
+- EMA 200 used the same faint lavender as the bands, drew only on 1D and 1W, and on 1D covered only the last 53 of 252 bars (an EMA of N bars needs N bars before it starts). EMA 50 started at bar 50.
+- The band shading ran from the lower band to EMA 8 (`fill: '+1'`), not to the upper band.
+- 1W labels showed clock times; intraday labels had no day.
+- 5M failed early in a trading day ("Not enough data", 4 bars at 7:36 AM MDT).
+- Index symbols such as `^VIX` failed: the page sends `%5EVIX`, and the worker matched the path before decoding it. The public fallback proxies did not answer from the build box either.
+- Never merged: the Sept 17 "line select" paste (`FLINT_TEMP_GAUGE_LINE_SELECT_v0`, click a line to recolor it, buy and sell trigger marks in `fl_tg_triggers_v0`).
+
+## What v0.1 changes
+
+- `tgLineColor(id, default)` next to `getIndicatorColor`: no saved color keeps the old look exactly; a saved color keeps the old line's alpha. Every line on every chart reads it.
+- Temperature and Delta T panels gain a thin line in their chosen color over the bars (the bars keep their zone and sign colors). TP Spread reads the IPS color, RSI Spread reads the RSI color.
+- A "Lines and colors" card lists all 17 lines with a picker each, plus Reset colors.
+- Moving averages: a second fetch from the same feed (1D 2y, 1W 10y, 1H 6mo, 15M and 5M 1mo) warms the EMAs, lined up by timestamp, so all five start at the left edge. Signals and the sidebar still use the loaded window, and the card says so. EMA 200 shows on every timeframe with enough bars, in its own color. Monotone curves, no overshoot. Compose mode can promote the fifth EMA.
+- The price canvas is shown again inside `renderChart`, so a color change no longer blanks it.
+- Band fill between the bands. Dated labels on 1W and intraday. 5M looks at 5 days when the day is still short.
+- Your marks: a buy mark and a sell mark per symbol, drawn as dashed lines, kept in `fl_tg_triggers_v0` on this device. The card says how far each is from the last close. Display only: no alert, no order, nothing sent.
+- A wider look: one tap loads HYG, LQD, XLP, XLY, GLD, DX-Y.NYB or VIXY through the same feed and the same math. Not a stress index, and not advice.
+- `desktop/data-proxy-worker/worker.js` decodes the path, so `^VIX` and other index symbols load after the worker is deployed again. Until then they still fail; VIXY stands in.
+
+## Not here
+
+- No new indicator math, no SMA, no auto-trade, no alerts.
+- The Temperature line itself needs about 50 bars before it starts; that is the Temperature formula and is unchanged.
+- The worker change needs `wrangler deploy` by Kirk to take effect.
+
+Smoke: `SMOKE_OK temperature gauge v0.1` (`docs/scripts/smoke-temperature-gauge-v0.1.js`). Layer, never delete.
diff --git a/docs/scripts/smoke-temperature-gauge-v0.1.js b/docs/scripts/smoke-temperature-gauge-v0.1.js
new file mode 100644
index 00000000..4b44439d
--- /dev/null
+++ b/docs/scripts/smoke-temperature-gauge-v0.1.js
@@ -0,0 +1,149 @@
+#!/usr/bin/env node
+// Smoke: Temperature Gauge v0.1 (v-temperature-gauge-v0.1)
+// Every line takes its color, the moving averages start at the left edge, your own
+// buy and sell marks (display only), a wider look through the same feed, and the price
+// chart no longer goes blank after a color change. No network. Leave sw.js alone.
+// Usage: node docs/scripts/smoke-temperature-gauge-v0.1.js
+
+'use strict';
+
+const assert = require('assert');
+const fs = require('fs');
+const path = require('path');
+const vm = require('vm');
+
+const root = path.join(__dirname, '..');
+const gauge = fs.readFileSync(path.join(root, 'temperature-gauge.html'), 'utf8');
+const worker = fs.readFileSync(path.join(root, '..', 'desktop', 'data-proxy-worker', 'worker.js'), 'utf8');
+const notes = fs.readFileSync(path.join(root, 'library', 'TEMPERATURE_GAUGE_v0.1.md'), 'utf8');
+
+assert.ok(/v-temperature-gauge-v0\.1/.test(gauge), 'gauge carries the marker');
+
+// 1. Colors: every line reads tgLineColor (or getIndicatorColor) in price mode
+[
+  ["label: 'Price'", "tgLineColor('price'"],
+  ["label: 'BB Upper'", "tgLineColor('bollinger'"],
+  ["label: 'BB Lower'", "tgLineColor('bollinger'"],
+  ["label: 'EMA ' + EP_RC[4]", "tgLineColor('ema200'"],
+  ["label: 'Gravity'", "tgLineColor('gravity'"],
+  ["label: 'Buy'", "tgLineColor('buy'"],
+  ["label: 'Sell'", "tgLineColor('sell'"],
+  ["label: 'Hub'", "tgLineColor('hub'"],
+  ["label: 'Ring'", "tgLineColor('ring'"],
+  ["label: 'Orbit'", "tgLineColor('orbit'"],
+  ["label: 'Temperature', data: a.temps", "tgLineColor('temperature'"],
+  ["label: '\\u0394T', data: dtData", "tgLineColor('dt'"],
+  ["label: 'TP Spread'", "tgLineColor('ips'"],
+  ["label: 'RSI Spread'", "tgLineColor('rsi'"]
+].forEach(function (pair) {
+  const i = gauge.indexOf('{ ' + pair[0]);
+  assert.ok(i > 0, 'dataset present: ' + pair[0]);
+  const line = gauge.slice(i, gauge.indexOf('\n', i));
+  assert.ok(line.indexOf(pair[1]) > 0, pair[0] + ' reads ' + pair[1]);
+});
+['ema8', 'ema12', 'ema24', 'ema50'].forEach(function (id) {
+  assert.ok(new RegExp("data: " + id + ", borderColor: getIndicatorColor\\('" + id + "'").test(gauge), id + ' reads its color');
+});
+assert.ok(/fill: '-1', backgroundColor: tgLineColor\('bollinger'/.test(gauge), 'band fill sits between the two bands');
+assert.ok(/value="#e8b019" onchange="setIndicatorColor\('ips'/.test(gauge), 'IPS swatch shows the color the line is drawn in');
+
+// 2. The price chart stays visible after a direct renderChart (color change, Stack, Log)
+const rc = gauge.slice(gauge.indexOf('function renderChart(candles, a) {'), gauge.indexOf('// RSI sub-chart'));
+assert.ok(/document\.getElementById\('mainChart'\)\.style\.display = 'block';\s*$/.test(rc.trimEnd()), 'renderChart shows the price canvas again');
+
+// 3. Moving averages
+assert.ok(/var show200 = ema200\[closes\.length - 1\] != null;/.test(gauge), 'fifth line