Skip to content

956 - Move from Generic Sensor to specific pH, Salinity, and Hydrophone sensor data - #1004

Open
matthewcflam wants to merge 7 commits into
mainfrom
956-move-from-generic-sensors-to-specific-sensors
Open

956 - Move from Generic Sensor to specific pH, Salinity, and Hydrophone sensor data#1004
matthewcflam wants to merge 7 commits into
mainfrom
956-move-from-generic-sensors-to-specific-sensors

Conversation

@matthewcflam

@matthewcflam matthewcflam commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR resolves #956. It splits the Generic Sensor Data (which has been split on the backend) into pH, Salinity, and Hydrophone data on the website. Graphs were added for pH and Salinity, and downloads were added for all 3.

Graph layout files were changed to allow users who already configured their graph layouts (which persist) to see the new graphs.

Verification

Local simulation files and cucumber tests were all added and passed.

image image

Made with simulation data

Note: The diff looks MASSIVE, but a lot of it is just copy and paste.

Added their associated graphs and data set, simulation files, and cucumber (manual) tests
@matthewcflam
matthewcflam requested a review from yuekaifred July 12, 2026 08:32
@matthewcflam matthewcflam self-assigned this Jul 12, 2026
@raghumanimehta

Copy link
Copy Markdown
Contributor

The graph pictures look really good! Thanks for the work.

@minjunminji minjunminji left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff and traced it against the backend and simulation. Overall this is a clean, well-structured slice — the three sensors mirror the existing WindSensors pattern, and I confirmed the backend (sailbot_db.cpp) already writes identical document shapes to the same temp_sensors / ph_sensors / salinity_sensors collections, so the models, routes, and seed data line up end-to-end.

mergeMissingGraphIds is a nice touch: it stops cached sessionStorage layouts from silently hiding the newly added graphs, and it's unit-tested.

Two things I'd like addressed before merge — left inline below.

batteries: new BatteriesSagas().forkSagas(),
windSensors: new WindSensorsSagas().forkSagas(),
genericSensors: new GenericSensorsSagas().forkSagas(),
tempSensors: new TempSensorsSagas().forkSagas(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is titled move from Generic Sensors, but GenericSensors is only removed from the datasets route and the download UI — the store, saga, reducer, model, and /api/generic-sensors route all remain. Since forkSagas() starts every saga, genericSensors still polls /api/generic-sensors on every interval and dispatches into a reducer nothing reads anymore (dead polling + dead state).

Either fully remove GenericSensors (store dir, model, route, the endpoints.ts / interfaces.ts / given.ts entries, the rootReducer + rootSaga registrations, and genericsensors.feature), or if it's intentionally kept during the transition, please note that in the PR description.

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.

WEB: Move from Generic Sensor to Specific Sensors We are Using

3 participants