7.1 KiB
The AIMsight web app
The tool of the manual diagnostic: two pages, Data and Stations.
The Data page
-
The plots: one at the start (displacements, camera, image quality, system metrics), "Add a plot" to see several, aligned in time, the cross to remove one; a click on a curve sets the images to the image nearest to that moment. The zones of the labels are barely visible there (opacity 0.05, 0.07 in dark mode).
-
The labels, under the plots, and their bar, according to the chosen source:
- Detectors (default): the detectors' events (
detectors/scripts/categories.py,window: the range with its 3 days of history), read-only. The bar carries only their family, the tooltip their targets; on click: their dates, their sensors (targets and references), the message and the action (labeling/scripts/client.py: the first sentence of the text of the event; the "For the client" columns oflabeling/families.md, per family, refined per variety); - LLM:
labeling/auto/<STATION>.jsonl, read-only; - Analysis: the same labels, to edit or delete; writes in
labeling/auto/<STATION>.jsonl, each label checked by the rules of labeling (labeling/scripts/validate.py,check: one of the six families, no numeric value…) and given its id (ids.py,assign).
With Detectors and LLM, dragging on the bar zooms in time; with Analysis, it selects a range to analyze. A click highlights a label on the plots and the bar, sets the images to its start and opens it (with Analysis: bounds, family, text, Save, Delete); a click elsewhere on the bar closes it. The page does not show
labeling/manual/. - Detectors (default): the detectors' events (
-
The camera images, on the right, on the same station and the same range: slider, ◀ ▶ and keyboard arrows; wheel to zoom, drag to move, double click for the whole image; Names box; a range on the bar under the slider draws the displacement arrow of each sensor. An arrow at the top left enlarges the image and pushes the plots to the left; the reverse arrow brings it back.
-
The diagnostic settings, under the image: "Focus on event curves" (with an event open, the plots show only its sensors: those of the detectors, or those the text of a label names), the families shown and, for Detectors only, the targets considered, the others removed before the detectors ("Rerun the detectors", parameter
targetsof/api/detectors). -
The weather: a station with a position gets, at Load, the hourly measurements of the nearest MeteoSwiss station (
weather/meteoswiss.pyof~/aimsight-data,hourly) as plots "Weather: …", next to the "System: …" ones; the place found and the station chosen are written under the selector (check them: the search of a place always returns its best match).
The address keeps the station and the range (UTC, end excluded): #/data?station=NIEDERHORN&start=2026-09-25&end=2026-10-08; without dates, the last 5 UTC days, today included.
The Stations page
The tracked stations, extraction/stations.txt of ~/aimsight-data (SERIAL [position]), to edit (serial, position: lat,lon or a Swiss place, for the weather of Data; empty for an indoor site: no weather), and the checked ones pumped (extraction/pump.sh, --delay 300; the list and the pumping through extraction/pumping.py of ~/aimsight-data, the app only calls it) over a range (by default every station, over the range of the address, from 3 days before: the history of the detectors) or, without dates, their missing days up to now; the end of out/pump.log follows. The end of a pumping launched by the app empties the cache of the detectors' events.
The Analysis tab
- Analyze the range: a range selected, optional hints, then
server/analysis.pylaunches the analyst of the agents repository byclaude -p(non-interactive), with its instructions (instructions/analyst.md) and without the detectors (DETECTORS: no). It writes inlabeling/auto/analyses/<STATION>_<start>_<end>/its labels and a diagnostic report (report.mdand its figures; its work and claude's log inwork/, outside git). The page follows its progress, then shows the report; the server submits its labels tolabeling/auto/<STATION>.jsonl(fieldanalysis). "View the report" on such a label opens it again. - The sidebar sorts the analyses of
labeling/auto/analyses/into folders, one per station (open by default if it has one running), and inside one analysis per range, the most recent first, with its state; a click opens Data on it. - The messages: after the report, the user writes to the analyst, the same session resumes (
--resume). An analysis stops with the server ("interrupted"); "continue" in the message field resumes it. - Optimize the detectors, on a finished analysis:
/optimizein Optimizer (optimizer/, with the pluginagents/) on the analysis: the detectors, then the reading tools; the detectors committed indetectors/, the reading tools intools/, each on its current branch. The page follows the thread of the session (work/optimization.jsonl), then shows its summary under the report (optimizer/sessions/<analysis>_<time>/summary.md, and the<analysis>/tools.mdof an older session). One optimization at a time; meanwhile, no analysis and no message to the analyst; an optimization cut by the server stopping is rerun with the button. The detectors' events are kept in memory until the end of an optimization: after an/optimizerun outside the app, restart the server.
Launch
The VS Code task Run app (.vscode/tasks.json), or by hand (Node 22 for the front end):
cd app/web && npm install && npm run build # once, and after each change of the page
.venv/bin/python app/server/server.py # .venv: see the README at the root
The page opens on http://127.0.0.1:8770. Settings by variables: AIMSIGHT_DATA (data, default data/), AIMSIGHT_LABELS (labels, default labeling/), AIMSIGHT_PORT (8770). To work on the page: npm run dev in app/web/ (http://localhost:5173), the Python server launched next to it.
The folders
server/server.py: FastAPI; serves the built page and the API under/api(stations, images, curves, detectors, labels, analyses); answers only the pages of the workstation (local Host, declared JSON).server/station.py: the data of the Data page; read-only ondata/(throughtools/scripts/data.py), writes only inlabeling/{auto,manual}/.server/analysis.py: the Analysis tab; launchesclaudewith the agentagents:analyst(Read, Write, Bash allowed without asking); and the optimization,/optimizein Optimizer (Read, Write, Edit, Bash, Agent).server/check.py: checks, without calling claude:.venv/bin/python app/server/check.py.web/: React (Vite) and Mantine;src/App.jsx(header, sidebar, address),src/pages/Data.jsx(the page),src/pages/Images.jsx(the images, in Data),src/common.jsx(requests, selector),src/main.jsx(theme). Plotly, dressed in Mantine's colours, loads only with Data.dist/andnode_modules/outside git.
The computation of server/station.py (images, curves, labels) comes from tools of the Support-Agent repository, copied on 2026-11-05 (commit 6e9f69a); it now evolves here.