Skip to content

Muse spark - #105

Merged
atulmgupta merged 24 commits into
mainfrom
muse-spark
Sep 13, 2026
Merged

atulmgupta merged 24 commits into
mainfrom
muse-spark

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 24 commits September 7, 2026 11:10
Two related charging-accuracy fixes:

1. Charge energy delta baselines now use State() strictly before StartedAt instead of at StartedAt, since Fleet Telemetry can emit the session-start batch after energy has already begun accumulating, causing undercounted energy in both the live handler and the completed-session tracker.

2. New Tesla Supercharger invoice overlay: ChargingHandler.Get resolves the vehicle's VIN and matches it against tesla_charging_history via a new FindBestMatch repo method (closest charge_start_datetime within a 2h window). When a match is found, billed energy/cost/currency/rate are added to the response and preferred for display on the frontend KPI tiles, with vehicle-measured energy shown as a secondary subtitle.
Treat spurious trip-meter resets and implausible counter jumps as discontinuities instead of driven distance. Adds reset/restore cursor logic and tests so include_fields zero snap-backs do not inflate FSD or driving aggregates.
Adds a live Grok powertrain read to Driving Dynamics using motor and chassis signals, with interpretation logic and tests. Also adds shared client-side pagination for FSD insight lists and DataTable-backed FSD tables.
Adds honesty-focused UI across the fleet dashboard, status bar, charging, battery, driving, and FSD views. Surfaces Supercharger bill site/fee metadata, preserves signal ingest timestamps for Tesla physics clocks, paginates physics evidence instead of truncating it, and fixes nav highlighting to prefer the most specific active route.
Add trip selection and date-scoped motor history, preserve active drives, and evenly sample backend history responses across the selected window.
Preserve and backfill charge coordinates without creating geofences from stale GPS, use Tesla billed energy for tariff pricing, and resolve date windows in the vehicle timezone.
Expand the drive detail FSD insights range to look around 24 hours so sparse counter bookends are included, preventing unknown/blank attribution for valid deltas. Adds backend and frontend regression coverage for the wider range behavior.
Adds drive_id support for FSD insights with a 7-day bookend lookup and focused attribution, while filtering negligible fidget drives so they do not steal sparse counter deltas. Updates drive detail and list UI to use the drive-scoped hook and omit unknown FSD badges.
Wire always-on charge autopilot, shared-charger queue planning, OCPP charge
points, Tesla bill variance, session share reports, TCO fixed ledger, and
related warranty, silence, and trip copilot surfaces.

Register new i18n namespaces (autopilot, chargeQueue, ocpp) so the strict
namespace audit and Docker web build pass. Fix TypeScript i18n count types,
geofence hook typing, and AutomationFull.conflicts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep ChargingDetailPage share-session UI from muse-spark and billed-energy
display from main (#104).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add per-vehicle autopilot profiles, TOU-based charge previews, health guardrails, and savings tracking. Integrate the configuration and preview panel into Smart Charge with API and UI tests.
Add next-charge recommendations comparing home TOU costs with Supercharger quotes, surfaced on dashboards and vehicle details. Expand automation, routine, and alert template catalogs with category filtering, localization, and tests.
Adds ecosystem automation presets and routine templates covering more Tesla commands, locations, charging, climate, media, and security scenarios. Updates catalogue tests and alert rule template coverage thresholds for the expanded preset set.
Watches Open-Meteo forecasts at each armed vehicle's home coords and
pre-charges before storms: hourly evaluator raises the charge limit on
fresh warnings when SOC is below target. Includes status/config/events
API, StormGuardPanel on Emergency Resilience, and backend+UI tests.
Polls a per-vehicle ICS subscription, finds the next offsite event in
the lead window, and preconditions once per event (5-minute evaluator).
Includes next/config/now/runs API, ComfortPanel on Automations, offline
refusal for the actuation endpoint, and backend+UI tests.
BuildClaimDraft assembles a ready-to-paste ticket from the owner issue,
live warranty countdown, matched TSBs, ranked symptoms, and evidence.
New claim-draft endpoint, ClaimDraftPanel on Service Intelligence, and
backend+UI tests.
Flags recent drives that fit no named profile and sit far from their
cluster centroid (median-adaptive score, deterministic pure function).
New GET /driver-attribution/ghost-drives endpoint plus a GhostDrivesPanel
on the Driver Attribution page with alert banner, score table, and
one-click labelling that re-anchors the cluster.
Predicts queue waits per site and arrival time: hour-of-week demand
from tesla_charging_sessions feeds Little's-law load plus an Erlang-C
queue model (stalls estimated from peak overlap, documented lower
bound). Read-only GET /waitoracle/sites + /forecast; WaitOraclePanel
on the fleet sessions page with site/arrival pickers, verdict hero,
best-hour suggestion, and the full-day wait curve.
Allow one Tesla 1-mile wire quantum above the physical travel threshold so valid 10-second counter samples are retained, while still rejecting implausible jumps. Add unit and drive analytics regression coverage.
Route new panels through Icons, SI seconds for wait forecasts, queryPolicy/scopedPath on hooks, ICS host allowlist, catalog i18n keys, and useDataState fatalError surfaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Slice 1 of Journey Autopilot: persistent journey_sessions
(planned/active/paused/completed/aborted, one active per vehicle,
race-safe conditional transitions) plus append-only versioned plans
for future replan diffs. New /journeys page with session manager:
plan form, status filter, lifecycle actions driven by server
next_statuses, plan history.

Also regenerates routetemplates_gen.go, absorbing 19 previously
unregenerated routes so the freshness gate passes.
Refresh the VitePress theme, navigation, landing pages, and onboarding. Add generated screen catalogues, Markdown page tools, and new homepage visuals.
Cap journey list limits at 100 with safe defaults and tests. Localize status labels and inherit theme-aware icon colors.
Add English translations for planned, active, paused, completed, and aborted journey statuses.
Copilot AI lite review requested due to automatic review settings September 13, 2026 05:48
@atulmgupta
atulmgupta merged commit 55a2804 into main Sep 13, 2026
4 of 10 checks passed
@atulmgupta
atulmgupta deleted the muse-spark branch September 13, 2026 05:49

Copilot AI commented Sep 13, 2026

Copy link
Copy Markdown

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Verify TypeScript build

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

Copilot stopped reviewing on behalf of atulmgupta due to an error September 13, 2026 06:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

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.

2 participants