Skip to content

Add generic JSON-configured CSV receiver and CSVs pane - #61

Merged
mcroomp merged 2 commits into
mainfrom
feat/generic-csv-receiver
Nov 18, 2026
Merged

mcroomp merged 2 commits into
mainfrom
feat/generic-csv-receiver

Conversation

@mcroomp

@mcroomp mcroomp commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add an optional generic POST /v1/csv?filename=... receiver configured by runtime JSON (--csv-map / LINKHUB_CSV_MAP), including an ESP32 strain-gauge example.
  • Validate mapped types, column counts, filenames, content type and body size; support CSV quoting, escaped quotes, CRLF, header-only requests and headerless batches. Validate the full batch before journaling.
  • Store samples in LinkHub's existing diagnostic journal with filename/sequence retry deduplication and experiment inclusion.
  • Expose ordered output columns, the latest reading and a bounded five-row history through GET /v1/csv.
  • Add a generic CSVs pane that appears on received data, preserves configured column order, shows host receive times, handles errors explicitly and polls independently of MAVLink.
  • Document configuration, receiver semantics, ESP32 setup and pane usage. Keep the offline demo honest about having no CSV feed.

Validation

  • cargo test --locked -p linkhub: 98 tests passed (92 library + 6 CLI).
  • Focused Vitest CSV pane/API/demo tests: 38 passed.
  • Production UI type-check/build and Rust server build passed.
  • Built-server HTTP smoke test: eight synthetic rows accepted, eight retry rows deduplicated, exactly five recent rows retained (4 through 8).
  • Browser inspection confirmed the CSV pane and mapped rows while no vehicle heartbeat was present. Screenshot capture was unavailable in the browser tool.

Hardware status

No real ESP32 readings were captured during validation. Its original CSV target was restored after the earlier investigation; this feature does not reconfigure the device or firewall automatically. Firmware dumps/downloaded tools and unrelated work are not included.

mcroomp and others added 2 commits November 18, 2026 18:27
Receive mapped CSV batches in the LinkHub journal and show the five latest accepted rows in a sensor-agnostic UI pane.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the pre-heartbeat status documentation alongside CSV feed semantics and update the merged camera test for the CSV-enabled router.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mcroomp
mcroomp merged commit 37bb2b1 into main Nov 18, 2026
13 checks passed
@mcroomp
mcroomp deleted the feat/generic-csv-receiver branch November 18, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant