Skip to content

Compare 2026 and 2027 current law with H.R. 1834 in the calculator - #34

Closed
DTrim99 wants to merge 8 commits into
aca-2027-backendfrom
aca-2027-calculator
Closed

DTrim99 wants to merge 8 commits into
aca-2027-backendfrom
aca-2027-calculator

Conversation

@DTrim99

@DTrim99 DTrim99 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR turns the calculator into one comparison: what a household would pay for its benchmark plan in 2026 and 2027 under current law, and in 2027 if H.R. 1834 revived the enhanced credits. It builds on #33, which gives the API the year and the 2026 comparison; merge that first.

What changes

  • One comparison. Every calculation asks the API for 2027 with H.R. 1834 and 2026 current law alongside (year: 2027, show_ira, show_prior_year). The year setting and the scenario checkboxes go: the 700% FPL bill, CRFB's two brackets, and this PR's earlier draft variants (a 700% FPL cap and a $5 minimum premium). Share links keep only the household, and older links with a year or scenario choices still open their household.
  • Results, in three tabs:
    • What You'd Pay charts what the household pays each month for the benchmark plan after the credit, by income, for the three scenarios. Below 400% FPL the two current-law lines nearly overlap, since current law caps the payment at a share of income. Above it, the 2027 line sits at the full, higher premium.
    • Premium Tax Credits charts the credit itself.
    • Your Household takes an income and shows each scenario's benchmark premium, credit and payment, the change from 2026, and the change H.R. 1834 makes. A short note explains the household's position (Medicaid or CHIP, the coverage gap, below or above 400% FPL).
  • PremiumChart, a new chart for the three scenarios, which the Overview reuses in Update the calculator for 2027: compare 2026 and 2027 current law with H.R. 1834 in the API, calculator and Overview #37. It reads the API's fields (ptc_prior_year, ptc_baseline, ptc_ira and the benchmark premiums by income) and leaves out the 2026 line if an answer lacks it.
  • AI explanation. The request sends H.R. 1834 as the only scenario, with the 2026 benchmark and credit, so the narrative can compare the years.
  • HealthBenefitsChart goes back to main's version, except for its wording ("current law", "H.R. 1834") and the chart year in its title. The AI explanation and, until Update the calculator for 2027: compare 2026 and 2027 current law with H.R. 1834 in the API, calculator and Overview #37, the Overview use it.
  • Browser cache. The key includes the year, the 2026 comparison and a CACHE_VERSION to change with each policyengine-us pin.
  • Header. The page header no longer says "2025 vs 2026"; the Overview moves to the same story in Update the calculator for 2027: compare 2026 and 2027 current law with H.R. 1834 in the API, calculator and Overview #37.

Previews

Until #33 is deployed, this PR's Vercel preview calls the production API. That API answers for 2026 whatever the page asks and doesn't return 2026 alongside, so the preview shows a notice saying the results are for 2026, and no 2026 line.

Checks

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
aca-calc Ready Ready Preview Nov 11, 2026 3:00pm UTC

Request Review

DTrim99 and others added 3 commits November 9, 2026 11:45
- A coverage year setting, 2027 by default with 2026 selectable, sent to the
  API and kept in share links (year=).
- H.R. 1834 replaces the "IRA Extension" label, and the enhanced credits
  capped at 700% FPL (a January 2026 draft variant) join the scenarios. The $5
  minimum premium variant is built but hidden behind MIN_PREMIUM_AVAILABLE
  until the API's policyengine-us models it. Each description says the
  proposal's status.
- Each result card shows what the benchmark plan costs after its credit,
  from the API's benchmark premium at each income.
- Current law is labeled with the year, the browser cache key includes the
  year and a model version, and the page header no longer says 2025 vs 2026.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Until the backend that takes a year is deployed, the API answers for 2026
whatever the page asks. The results already label the year the answer
reports; a notice now says when that isn't the year requested.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The API now pins policyengine-us 2.115.0, which models it, so the checkbox
shows, and the browser cache key names that version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
DTrim99 and others added 3 commits November 9, 2026 14:15
The calculator now makes one comparison: 2027 coverage under current law
and under H.R. 1834, with 2026 current law alongside. The year setting and
the scenario checkboxes go; old links still load their household.

- What You'd Pay charts the benchmark plan after the credit by income, and
  Premium Tax Credits the credit, for the three scenarios (PremiumChart).
- Your Household shows, at the income entered, each scenario's benchmark
  premium, credit and net premium, and the changes from 2026 and from
  current law.
- HealthBenefitsChart goes back to main's version, keeping only the wording
  ("current law", "H.R. 1834") and the chart year in its title; the
  Overview still uses it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The chart's title already names what it shows; the longer label could run
past a short chart.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@DTrim99 DTrim99 changed the title Default the calculator to 2027 and add the extension scenarios Compare 2026 and 2027 current law with H.R. 1834 in the calculator Nov 9, 2026
@DTrim99

DTrim99 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Combined into #37, which now holds the whole 2027 update (API, calculator and Overview) so nothing reaches the live app until we relaunch. Review it on #37's Vercel preview, which calls the preview API. This branch stays as is.

@DTrim99 DTrim99 closed this Nov 12, 2026

This branch was successfully deployed

1 active deployment
Preview — 1f4fd635 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant