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 recommendations table at frontend/src/recommendations.ts:1147-1158 currently renders these per-rec columns:
Provider · Account · Service · ResourceType · Region · Count · Term · Monthly savings · Upfront cost
Each rec carries a single payment value (all-upfront / partial-upfront / no-upfront) and a corresponding (upfront_cost, monthly_cost) pair on RecommendationRecord (internal/config/types.go):
UpfrontCostfloat64`json:"upfront_cost"`MonthlyCostfloat64`json:"monthly_cost"`Savingsfloat64`json:"savings"`// monthly savings vs on-demand
After PR #195 (issue #188) the user can now choose between all three payment variants of the same (service, region, SKU, term) cell. But the table only shows upfront_cost — so for a no-upfront rec the row reads "$0 upfront" with no indication of what the recurring cost actually is, and for partial-upfront the row is missing half its cost picture. The user has to do mental math against the savings column to compare options.
What needs to happen
Add a "Monthly cost" column rendering formatCurrency(rec.monthly_cost) next to the existing Upfront column. After this PR:
Hooks the existing column infrastructure already has: monthly_cost is a known field, just not in the rendered list.
Sketch
recommendations.ts:
Add a <th> for "Monthly cost" between "Upfront cost" (rendered after Savings today) and the action column. Or put it next to Upfront — designer's call.
Add a <td>${formatCurrency(rec.monthly_cost)}</td> in the row template.
Wire into the per-column sort + filter helpers that already exist for upfront_cost (SORTABLE_NUMERIC_COLUMNS, the popover registry, the friendly-name table, etc.). Mirror the upfront-cost shape.
Frontend tests: a row-render test asserting the Monthly column appears for all three payment variants with the expected value.
Acceptance
The recommendations table shows both Upfront and Monthly cost per rec.
Users can sort and filter by the new column the same way they can by Upfront.
Existing tests still pass; new tests pin the rendering for each payment variant.
Retracting the close-recommend above — see #252. PR #242 shipped the columns but the data feeding them is broken (monthly_cost always $0; effective % swings between 100% and negative due to scheduler.go:881 hardcoding MonthlyCost: 0 and mislabeling UpfrontCost = CommitmentCost). Keeping #220 / #221 open until the underlying fix lands.
A Monthly Cost column was added to the recommendations table, rendering formatCurrency(rec.monthly_cost) for every row so all three payment variants show the complete cost picture (Upfront + Monthly + Savings) without mental arithmetic.
The column is wired into the sort comparator, numeric filter popover, and the friendly-name / column-registry infrastructure — matching the upfront-cost shape exactly as described.
255 new test lines in frontend/src/__tests__/recommendations.test.ts pin the rendering for all three payment variants and the sort/filter behaviour.
Activity
feat(frontend/recs): add Monthly cost + Effective savings % columns (c…
feat(frontend/recs): add Monthly cost + Effective savings % columns (#…
cristim commentedon May 3, 2026
Verification (post-merge of #242)
Confirming this issue is addressed — recommend close.
What I checked
PR #242 (merged 2026-05-03, "feat(frontend/recs): add Monthly cost + Effective savings % columns") landed:
frontend/src/recommendations.ts(column rendering)frontend/src/state.tsfrontend/src/__tests__/recommendations.test.tsCloses #220 (Monthly cost column) and #221 (Effective savings %) together. Auto-link didn't fire — closing manually.
cristim commentedon May 4, 2026
Retracting the close-recommend above — see #252. PR #242 shipped the columns but the data feeding them is broken (
monthly_costalways $0; effective % swings between 100% and negative due toscheduler.go:881hardcodingMonthlyCost: 0and mislabelingUpfrontCost = CommitmentCost). Keeping #220 / #221 open until the underlying fix lands.cristim commentedon May 13, 2026
PR #242 (
feat(frontend/recs): add Monthly cost + Effective savings % columns, merged 2026-05-03) fully satisfies this issue's acceptance criteria:formatCurrency(rec.monthly_cost)for every row so all three payment variants show the complete cost picture (Upfront + Monthly + Savings) without mental arithmetic.frontend/src/__tests__/recommendations.test.tspin the rendering for all three payment variants and the sort/filter behaviour.Recommend closing this issue as resolved by #242.