From 27dc5849c3eaf4824d79938e7077abdbe2c82e24 Mon Sep 17 00:00:00 2001 From: grothedev Date: Fri, 29 May 2026 21:34:16 -0400 Subject: updates from claude. need to review. archiving rust and cpp stuff, going completely TS --- web-timeplot/ARCHITECTURE.md | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'web-timeplot/ARCHITECTURE.md') diff --git a/web-timeplot/ARCHITECTURE.md b/web-timeplot/ARCHITECTURE.md index 1cfc3f1..73c4cb6 100644 --- a/web-timeplot/ARCHITECTURE.md +++ b/web-timeplot/ARCHITECTURE.md @@ -12,6 +12,8 @@ The restarted TimePlot app is built around five small systems: The current implementation is intentionally compact, but each system is already separated enough to grow without turning the app into a monolith again. +Core workspace configuration is also persisted in `localStorage`, so plot settings, routing, and source setup survive reloads without persisting transient runtime state. + ## Runtime flow ```text @@ -21,7 +23,7 @@ Store.time updated ↓ SourceRegistry.update(plotTime) ↓ -SyntheticWaveSource emits samples +Synthetic / CSV replay / WebSocket sources emit samples ↓ PlotBuffer stores bounded history ↓ @@ -80,12 +82,24 @@ The plot is GPU-rendered with PixiJS. Controls, labels, and config panels stay i hoveredPoint, tooltip, }, - source: { - activeId, - preset, - sampleRateHz, - amplitude, - noise, + sources: { + signalA: { + type, + preset, + sampleRateHz, + amplitude, + noise, + replayRate, + wsUrl, + wsReconnectMs, + }, + signalB: { + ... + }, + }, + graphs: { + primary: { sourceKey, transform, title }, + secondary: { sourceKey, transform, title }, }, panels: { status, @@ -119,6 +133,14 @@ Generates sample streams from a preset waveform. Right now it supports: - `chirp` - `burst` +### `src/data/csv-replay-source.js` + +Replays uploaded CSV datasets on the shared plot timebase. + +### `src/data/websocket-source.js` + +Streams live samples from a WebSocket server and reconnects automatically. + ### `src/plot/plot-buffer.js` Maintains bounded history so rendering and hover picking only operate on a manageable number of samples. @@ -147,6 +169,7 @@ The old project had useful ideas but too many concerns were mixed together. The - data generation is separate from app wiring - UI is separate from GPU drawing - state is centralized and observable +- persisted configuration is separated from transient runtime state - adding a new source or panel no longer requires rewriting the whole app ## Recommended next steps -- cgit v1.2.3