Skip to content

Next experiments#81

Merged
atulmgupta merged 10 commits into
mainfrom
next-experiments
Jul 18, 2026
Merged

Next experiments#81
atulmgupta merged 10 commits into
mainfrom
next-experiments

Conversation

@atulmgupta

Copy link
Copy Markdown
Contributor

Description

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would break existing functionality)
  • Documentation update
  • Infrastructure / CI change

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing tests pass locally
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Screenshots (if applicable)

atulmgupta and others added 8 commits July 6, 2026 10:19
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>
@atulmgupta
atulmgupta merged commit 2e79a60 into main Jul 18, 2026
10 of 13 checks passed
@atulmgupta
atulmgupta deleted the next-experiments branch July 18, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant