Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
Data view: a session's joint traces (intent against actual) #524
This adds the arm-side half of #521: each drive session now keeps a trace of every joint and stores it with the session. There is no session dialog yet, because `/admin/data` and `facts.sqlite` don't exist on main. I stored the traces in `precision.sqlite` with the session row and wrote the chart as a pure module, so the dialog can use it when it lands.
stopped parked by the crew deploy bfff47a
This adds the arm-side half of #521: each drive session now keeps a trace of every joint and stores it with the session. There is no session dialog yet, because /admin/data and facts.sqlite don't exist on main. I stored the traces in precision.sqlite with the session row and wrote the chart as a pure module, so the dialog can use it when it lands.
I ran the new tests, the precision tests and the server and admin tests, and they pass, except one src/server.test.ts model-route test that already fails on main. I didn't get a type check: bun x tsc couldn't find the bun type definitions in this sandbox. design-lint wasn't run, since nothing in src/web/ changed.
- Recording:
Tracker(src/precision.ts) records, per joint, the driver's target and the arm's read-back at most every 200 ms (5 Hz), capped at 3000 points per joint.trace()also returns the release and snap-back marks (cause and joint), on the same millisecond axis from session start. - Storage:
PrecisionHistorywrites the trace into a newsessions.tracecolumn. An existing database gets the column added on open. Only the newest 50 sessions keep their trace; older rows keep the summary card alone. Session rows fromGET /precisionnow carry anid. - Serving:
GET /precision/trace?id=Nreturns the traces and marks. It answers 400 for a bad id and 404 once the trace is gone. - Chart:
src/trace-chart.tshasreadTrace, which validates the network answer field by field, andtraceSvg(trace, jointId). The SVG draws the target dashed against the read-back solid, with this joint's marks and the session-wide ones as vertical lines on the same axis. Output is escaped and has no script.
To look at: whether you want facts.sqlite introduced separately, since the traces are in precision.sqlite for now. Wiring traceSvg into the dialog is the remaining work, once the Data view exists.
🤖 Generated with Claude Code
Parked by the crew: the preview's deploy failed and the decider saw no point in another try
This adds the arm-side half of #521: each drive session now keeps a trace of every joint and stores it with the session. There is no session dialog yet, because
/admin/dataandfacts.sqlitedon't exist on main. I stored the traces inprecision.sqlitewith the session row and wrote the chart as a pure module, so the dialog can use it when it lands.I ran the new tests, the precision tests and the server and admin tests, and they pass, except one
src/server.test.tsmodel-route test that already fails on main. I didn't get a type check:bun x tsccouldn't find thebuntype definitions in this sandbox.design-lintwasn't run, since nothing insrc/web/changed.Tracker(src/precision.ts) records, per joint, the driver's target and the arm's read-back at most every 200 ms (5 Hz), capped at 3000 points per joint.trace()also returns the release and snap-back marks (cause and joint), on the same millisecond axis from session start.PrecisionHistorywrites the trace into a newsessions.tracecolumn. An existing database gets the column added on open. Only the newest 50 sessions keep their trace; older rows keep the summary card alone. Session rows fromGET /precisionnow carry anid.GET /precision/trace?id=Nreturns the traces and marks. It answers 400 for a bad id and 404 once the trace is gone.src/trace-chart.tshasreadTrace, which validates the network answer field by field, andtraceSvg(trace, jointId). The SVG draws the target dashed against the read-back solid, with this joint's marks and the session-wide ones as vertical lines on the same axis. Output is escaped and has no script.To look at: whether you want
facts.sqliteintroduced separately, since the traces are inprecision.sqlitefor now. WiringtraceSvginto the dialog is the remaining work, once the Data view exists.🤖 Generated with Claude Code
Closes #521