Bugfixes 1 - #95
Merged
Merged
Bugfixes 1#95
Conversation
…nd hooks
Redesigns the vehicle command center into modular components (hero, readiness strip, workspace, safety panel, activity feed) under features/system/components/command-center/, replacing the monolithic VehicleCommandCenter with domain-grouped command browsing and a dedicated /vehicles/{id}/command endpoint contract.
Introduces useRangeState with shared cross-page localStorage persistence (SHARED_RANGE_STORAGE_KEY) so date-range selections propagate between pages, and migrates all range-picker consumers (StatisticsPage, EnergyPage, ChargingListPage, CostAnalysisPage, DriveScorePage, DrivesListPage, DrivetrainHealthPage, EfficiencyPage, RouteEfficiencyPage, TripListPage, MyActivityPage) off ad-hoc useUrlString/useUrlBatch date defaults.
Adds a refetchInterval to useCommandLatest, normalizes command-query invalidation keys via a shared commandKeys helper, fixes MediaPlayerPage volume formatting to respect global precision, and removes an unstable Tesla charging-history sort parameter. Also relaxes several Go/TS command types to optional/nullable fields and adds CollapsibleCommandGroup vehicleKey prop rename.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds vehicle management APIs, partner-token support, cached metadata, enterprise operations, privacy-safe audit logging, and a React workspace with confirmation flows for paid and state-changing requests.
Move warranty API routes and Tesla requests to vehicle/VIN-scoped endpoints, update frontend hooks and widgets, and handle empty management responses with updated tests and SLO routes.
Replace VehicleManagementPage's inline Select/Badge vehicle picker with the shared VehicleSelect component from @/components/forms, always showing the dropdown even for single-vehicle fleets. Removes now-unused useMemo-based option building and manual selected-name logic. Adds a test asserting the dropdown remains visible with one vehicle.
Add structured views for options, specifications, warranties, subscriptions, and enterprise roles, with technical response details, improved endpoint cards, and expanded test coverage. Keep vehicle selection visible for single-vehicle fleets.
Converts the weekly-digest feature (types, useWeeklyDigest, and all section components) from mixed display-unit fields (km, kWh, min, Wh/km) to SI-canonical fields (m, Wh, s, Wh/m), converting only at the render boundary via useUnits(). Adds a shared formatEfficiencyFromSI helper and a useAlertHistory hook backed by a bounded /alerts?limit= query. Drive/charging fetches are now scoped to an explicit two-week analytical window instead of relying on default pagination, and alerts are filtered by vehicle_id. Updates all associated tests and i18n strings to match.
Add discovered charging places, effective-dated geofence rates, protected cost provenance, historical backfill, and drive/charge geofence attribution. Expose pricing lifecycle, rate preview/apply, summaries, and activity APIs with a complete Charging Places workspace. Add migration, metrics, tracing, SLO dashboards, alerts, and coverage audit updates.
Render Home and the current page for registered top-level routes, and move the quick-search hint into the global breadcrumb chrome. Update layout and breadcrumb tests accordingly.
Normalize Tesla charging energy and power to Wh/W, repair historical data, and preserve display-boundary conversions. Unify geofence and charging-place management with categories, alerts, bulk actions, search, and protected-session attribution.
Use rolling seven-day defaults with versioned shared date-range preferences, and improve charging-rate preview actions with clearer guidance, focus, and modal scrolling.
Reworks VehicleTwin's SVG to trace real Model Y proportions (traced body/DLO paths, clipped shading, redesigned Gemini-style wheels/spokes, refined lights and glass gradients) and adds an optional photo mode: a new `teslaCompositor.ts` builds a Tesla configurator side-view render URL per paint/model, which VehicleTwin overlays live telemetry indicators on top of, aligning the SVG coordinate system to the photo's traced geometry. Falls back to the hand-drawn SVG if the photo fails to load. Passes `model` through from DigitalTwinWidget, DigitalTwinMiniWidget, and DigitalTwinPage. Also boosts paint palette opacity stops in vehicleColors.ts so the body reads as a solid painted surface rather than translucent.
Keep vector wheels visible during drive-in and driving, then fade them out when the parked photo settles so the photo's wheels are revealed.
Shrink the wheel crop radius (34→28) so the crop stays strictly on the rim face; larger radii dragged the tire's baked-in lighting/aero deflector around the hub, reading as a wobbling second wheel. Also gate the entry spin animation on photo load timing: if the vehicle photo arrives more than 700ms after mount, the drive-in slide has already finished, so skip the spin instead of playing it against an already-parked car.
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)