Points: starts on the Emulator source, its main use (Selector start)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-20 08:32:18 +01:00
1 parent f21fcebeae
commit 2be232b91d
3 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
aimsight-app: the control station of the AIMsight diagnostic (`README.md`): the web app, and the launching of processes whose code lives elsewhere. A camera follows targets on a structure; the detectors read the displacement series of the stations and flag the moments when the curves must not be trusted (rain, fog, spider web, turbulence…) or a real movement. The architecture of the repositories: `docs/architecture.drawio`.
- **The processes**: the Analysis tab launches `agents:analyst` (plugin `agents/`) on a range, with `instructions/analyst.md` and `DETECTORS: no` (labels and report in `labeling/auto/analyses/<STATION>_<start>_<end>/`, submitted to `labeling/auto/<STATION>.jsonl`); "Optimize the detectors" launches `/optimize` in `optimizer/` on the analysis (its request in `app/server/analysis.py`, its summary in `optimizer/sessions/<analysis>_<time>/summary.md`), which commits the detectors in `detectors/` and the reading tools in `tools/`; the Support tab launches `agents:support` on a range with a question and `instructions/support.md` (its answer in `labeling/auto/support/<STATION>_<start>_<end>/answer.md`; it may launch the analyst itself; nothing submitted); the Conversations page launches `libredesk/conversations/pomper.sh` (read-only on LibreDesk, its key in `~/aimsight-libredesk/.env`), each conversation in `labeling/auto/conversations/<reference>/` (`transcript.md`, `messages.json`, `attachments/`). The Points page launches nothing: the user sets each measurement of a range valid or not, in `labeling/points/<STATION>_<start>_<end>.csv` (`app/server/validity.py`).
- **The processes**: the Analysis tab launches `agents:analyst` (plugin `agents/`) on a range, with `instructions/analyst.md` and `DETECTORS: no` (labels and report in `labeling/auto/analyses/<STATION>_<start>_<end>/`, submitted to `labeling/auto/<STATION>.jsonl`); "Optimize the detectors" launches `/optimize` in `optimizer/` on the analysis (its request in `app/server/analysis.py`, its summary in `optimizer/sessions/<analysis>_<time>/summary.md`), which commits the detectors in `detectors/` and the reading tools in `tools/`; the Support tab launches `agents:support` on a range with a question and `instructions/support.md` (its answer in `labeling/auto/support/<STATION>_<start>_<end>/answer.md`; it may launch the analyst itself; nothing submitted); the Conversations page launches `libredesk/conversations/pomper.sh` (read-only on LibreDesk, its key in `~/aimsight-libredesk/.env`), each conversation in `labeling/auto/conversations/<reference>/` (`transcript.md`, `messages.json`, `attachments/`). The Points page launches nothing: the user sets each measurement of a range valid or not, mainly on the runs of the emulator (`<SERIAL>@<run>`), in `labeling/points/<STATION>_<start>_<end>.csv` (`app/server/validity.py`).
- **The links** (ignored by git, one copy of each repository on the workstation): `data/`, `labeling/`, `detectors/`, `tools/`, `agents/`, `optimizer/`, `models/` (the pilot of learned detectors), `libredesk/` (the LibreDesk conversations); each thing is committed in its own repository, never here. This repository carries no agent, no reading tool, no workflow.
- **The truth**: the labels of `labeling/auto/`; the labeling knowledge is in `labeling/`.
- **The contracts**: the app calls the methods of the other repositories and holds no domain logic: with the detectors, `detectors/CLAUDE.md` (`categories.window`, `bench/score.py`); with the labels, `labeling/CLAUDE.md` (`scripts/validate.py` `check`, `scripts/ids.py` `assign`, `scripts/client.py`, `scripts/points.py` for the point labels); with the data, `~/aimsight-data` (`extraction/pumping.py`; the weather is pumped into `data/<STATION>/weather/`; the runs of `data_diff/<SERIAL>/runs/<run>/` are stations `<SERIAL>@<run>` of the Data page, with the labels of `<SERIAL>`, not for the agents); with the agents, `agents/README.md` (the requests of the analyst and of the support); with Optimizer, `optimizer/README.md` (the request of `/optimize`); with LibreDesk, `libredesk/conversations/pompage.py` (`start`, `running`, `log`). A renaming over there requires the change here. One reader of the measurements, `tools/scripts/data.py`, for the Data page, the tools and the detectors (benchmark and Optimizer included): a reading fix there changes the benchmark.
+4 -3
View File
@@ -20,10 +20,11 @@ export async function call(path, method = "GET", body) {
// The station and the range (UTC, To excluded; empty: the whole period), shared by the pages through the address. Source:
// Cloud, the stations of data/; Emulator, the runs of data_diff/, <SERIAL>@<run> for the server
const SOURCES = [{ value: "cloud", label: "Cloud" }, { value: "emulator", label: "Emulator" }];
const sourceOf = station => (station || "").includes("@") ? "emulator" : "cloud";
// without a station, the page's own default (Points: the emulator, its main use)
const sourceOf = (station, start = "cloud") => !station ? start : station.includes("@") ? "emulator" : "cloud";
export function Selector({ selection, choose }) {
const [stations, setStations] = useState([]), [s, setS] = useState(selection), [source, setSource] = useState(sourceOf(selection.station));
export function Selector({ selection, choose, start = "cloud" }) {
const [stations, setStations] = useState([]), [s, setS] = useState(selection), [source, setSource] = useState(sourceOf(selection.station, start));
useEffect(() => { call("/api/stations").then(l => l && setStations(l)); }, []);
useEffect(() => { setS(selection); if (selection.station) setSource(sourceOf(selection.station)); }, [selection]); // a new object at each change of the address
const [serial, run] = (s.station || "").split("@");
+2 -2
View File
@@ -3,7 +3,7 @@ import { Badge, Button, Card, Group, Loader, SegmentedControl, Select, Stack, Te
import { call, Selector } from "../common.jsx";
// Points: the point labels (labeling/points/, labeling/scripts/points.py), one boolean per measurement of a range, valid or
// not, set by hand: the ground truth of the benchmarks. A dataset per station and range, created with every point valid;
// not, set by hand: the ground truth of the benchmarks. Mainly on the runs of the emulator: the page starts on that source. A dataset per station and range, created with every point valid;
// one target at a time, corr_x above corr_y; a click on a point switches it, a box sets every point inside it (mode).
// Each change is saved at once.
const VALID = "#2a78d6", INVALID = "#e03131";
@@ -43,7 +43,7 @@ export default function Points({ selection, choose }) {
<Text c="dimmed">Each measurement of a range, valid or not, set by hand: the ground truth of the benchmarks
(labeling/points/). A click on a point switches it; a box sets every point inside it.</Text>
</div>
<Selector selection={selection} choose={choose} />
<Selector selection={selection} choose={choose} start="emulator" />
{list.length > 0 && <Group gap="xs">
<Text size="sm" c="dimmed">Datasets of {station}:</Text>
{list.map(x => <Button key={x.name} size="compact-sm" variant={x.name === name ? "filled" : "light"}