You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLI/reporter shows AWS's authoritative rec.SavingsPercentage directly (internal/reporter/reporter.go:45, sourced from AWS EstimatedMonthlySavingsPercentage in parser_ri.go; the Azure and GCP converters also set SavingsPercentage). But SavingsPercentage is dropped at the API boundary -- it was never on config.RecommendationRecord, so it is never serialized to the frontend.
Because of that, the GUI re-derives the effective savings % client-side via effectiveSavingsPct(savings, on_demand_cost, ...). That recomputation:
can drift from the provider's authoritative number, and
The CLI never has these problems because it uses the provider value directly. This is a CLI-vs-GUI parity gap on a money-path display.
Fix (full-stack)
Backend struct (internal/config/types.go): add nullable RecommendationRecord.SavingsPercentage *float64 (nil = provider did not report a %). Persisted via the recommendations row's JSONB payload column -- no DDL/migration needed (recs are stored as JSONB; same as OnDemandCost). Absent represented as nil, never 0.
Mapping (internal/scheduler/scheduler.goconvertRecommendations, the only builder mapping a common rec to a record): set SavingsPercentage: nonZeroPtr(rec.SavingsPercentage), parity with OnDemandCost. A provider 0 round-trips as nil.
Frontend type (frontend/src/types.ts): add savings_percentage?: number | null to LocalRecommendation.
Frontend display/sort (frontend/src/recommendations.ts): the effective-% column and its sort accessor prefer r.savings_percentage when it is a finite, non-null number; fall back to effectiveSavingsPct(r) otherwise. Net effect: GUI shows the same number the CLI shows, and AWS recs missing on_demand_cost show the provider % instead of "—".
Scope
Full-stack (Go struct + scheduler mapping + frontend type + display/sort), implemented in PR #1104 alongside the net-savings fix.
Activity
feat(recs): plumb provider SavingsPercentage to GUI for CLI/GUI parity
feat(recs): plumb provider SavingsPercentage to GUI for CLI/GUI parity
feat(recs): plumb provider SavingsPercentage to GUI for CLI/GUI parity (