Next experiments#81
Merged
Merged
Conversation
New /drive-dna page turns a single drive's telemetry into a unique, reproducible radial genome bloom: angle=journey progress, radius=speed, hue=power flow (regen cool / draw warm), lightness=SoC, concentric rings= elevation bands. Derives human traits (Spirited/Mountainous/Regen-rich/ Cold-start), a stable 7-char signature, and an exportable standalone SVG. Pure/deterministic + null-safe engine with co-located tests (5 cases). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
New /what-if page decomposes a real drive's actual energy into first- principles components (aero ∝ v², rolling, elevation work, climate) plus a measured residual anchored to observed Wh, then recomputes under user knobs: average speed, tire pressure, HVAC on/off, ambient temperature. Shows before/after energy, arrival SoC (pack inferred from the drive's SoC drop), duration, a component breakdown, and a plain-language takeaway. Deterministic, null-safe engine with co-located tests (5 cases). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion
Reconstruct a vehicle's COMPLETE signal state at any past instant from the
signal_log hypertable, with a DVR-style timeline scrubber.
Backend internal/api/timemachine:
- GET /vehicles/{id}/time-machine?at=<RFC3339> -> DISTINCT ON (field) last
value <= at per field, typed by value_kind; age measured vs the scrub instant
- GET /vehicles/{id}/time-machine/range -> earliest/latest/field_count bounds
- migration 000215: guarded PIT index (safe no-op; 000186 already ships an
equivalent (vehicle_id, field, ts DESC) index)
- table-driven + fake-pool handler tests
Frontend: useTimeMachine hooks + TimeMachinePage (Slider scrubber over
[earliest,latest], presets -1h/-1d/-1w/Now, fields grouped by category with
freshness chips, per-section Skeleton/QueryError/EmptyState).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
EU-Battery-Passport-aligned tamper-evident certificate (distinct from the
BatteryDegradation analytics page).
Backend internal/api/batterypassport:
- GET /vehicles/{id}/battery-passport -> SoH, capacity, equivalent full cycles,
fast-charge ratio, thermal exposure, A-F health grade, degradation trend,
recommendations, and a SHA-256 provenance_hash over pinned canonical facts
- GET /vehicles/{id}/battery-passport/verify?hash= -> tamper check (recompute)
- migration 000217->000216 tesla_battery_passport_ledger (issued-snapshot audit
ledger); ledger write is best-effort + counted, never fails the read
- pure scoring/hash functions + table-driven & fake-pool tests (golden hash,
determinism, tamper sensitivity, ledger-failure-still-serves)
Frontend: useBatteryPassport/useVerifyPassport hooks + certificate page (SoH
gauge, metric cards, degradation area, thermal bars, provenance hash w/ copy,
JSON export) with per-section states.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Attributes a real CO2 footprint to each charging session by the grid carbon
intensity at the hour it charged; tracks lifetime CO2 saved vs a gas car,
scores charging-timing greenness (0-100), recommends the greenest window.
Self-hosted-safe via a seeded 24h diurnal grid curve (no external API).
Backend internal/api/carbon: GET /carbon/intensity (curve + greenest/dirtiest),
GET /vehicles/{id}/carbon/summary (per-session CO2, gas-equiv @0.192kg/km,
saved, green_score, monthly), GET /vehicles/{id}/carbon/recommendation
(greenest window + potential saving). migration 000218->000217 grid_carbon_intensity
table seeded 24 rows (solar midday trough, evening peak). Pure CO2/score/window
functions + table-driven & fake-pool tests.
Frontend: useCarbon hooks + CarbonIntelligencePage (green-score gauge, 24h
intensity area w/ greenest/dirtiest markers, monthly CO2, recommendation card).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Forecasts remaining life (days + km), replace-by date, confidence, and status
for HV battery, 12V, tires, brakes, cabin filter — beyond detect-only dashboards.
Backend internal/api/rul: GET /vehicles/{id}/rul (all components) +
/rul/{component} (detail w/ decay forecast series). Battery RUL from an OLS fit
of the SoH trend (rate + R2 confidence) projected to 70% EOL; tires/brakes from
odometer km/day vs nominal life; 12V/filter age-based. migration 000219->000218
component_lifespans table seeded + admin-editable. Pure prognostics fns (LinearFit,
status classify, EOL projection) with table-driven & fake-pool tests; sparse data
=> low confidence, never NaN.
Frontend: useRUL hooks + RemainingUsefulLifePage (next-service banner, per-
component gauges/status, selectable decay forecast w/ confidence band).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #
Type of Change
Checklist
Screenshots (if applicable)