Skip to content

App v3: fix where the feature PRs overlap - #1273

Merged
PavelMakarchuk merged 7 commits into
mainfrom
fix/v3-overlaps
Oct 15, 2026
Merged

PavelMakarchuk merged 7 commits into
mainfrom
fix/v3-overlaps

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Contributor

Summary

Fixes for the problems that showed only when the v3 feature PRs (#1264, #1265, #1271, #1267, #1269, #1270, #1272, #1268, #1257) were combined. The base is the top of that stack (#1257) so this diff shows only these fixes; retarget to main after #1257 merges.

What changed

  • Build: the draft table placeholder uses the table's phone grid (VALUE_CELL, ACTIONS_CELL).
  • Build: the "Compared with" picker gets the population picker's phone sizes (40px items, 16px search input).
  • Report: unreadable saved details and a failed household use the shared ErrorState.
  • Report: validation cards wait with placeholder lines, like the rest of v3.
  • Report: a baseline policy that fails to load reads as an unknown baseline, not current law (no "current law" claim, scorecard not compared, Recompute disabled with a reason).

v2 impact

None. Flagship files only.

Tests

typecheck, eslint, prettier on changed files; full bun run vitest on the combined tree: 423 files, 4831 passed, 0 failed.

🤖 Generated with Claude Code

PavelMakarchuk and others added 6 commits October 14, 2026 16:24
DraftTable exports VALUE_CELL and ACTIONS_CELL. The placeholder rows use
them, and its header hides "New value" below 480px as the table does,
so the two-column phone grid puts each cell where the real row does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a phone each choice is a fingertip tall, and the search box is 16px,
so the browser does not zoom in to type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReportDetailsError is now built on ErrorState, with Reload as its retry
for details a newer version saved. The heading reads "Could not read
this report's saved details", as other v3 errors do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The household section's failure card is now a compact ErrorState, with
the API message under the title and "Try again" running the household
again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ValidationLoading is now a SkeletonRegion with three placeholder lines,
named for what is loading, as the other v3 waits are. Its callers pass
the name as a label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
useFlagshipReport names the policies that failed to load. When a report
has no record of its baseline (a shared link) and its baseline policy,
not current law, failed, the report reads as compared with "a baseline
policy that could not be loaded": the scorecard is not compared, the
overview offers to load the policy again, and Recompute is off with the
reason, since it would compare with current law.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
policyengine-calculator-next Ready Ready Preview Oct 14, 2026 9:18pm UTC
policyengine-website Ready Ready Preview Oct 14, 2026 9:18pm UTC

Request Review

@PavelMakarchuk
PavelMakarchuk merged commit 2c2511a into main Oct 15, 2026
12 checks passed
anth-volk added a commit that referenced this pull request Oct 15, 2026
…audit and report re-runs

Brought over from main: the v3 audit fixes (#1273, #1274, #1277, #1278,
#1280, #1281, #1283, #1284, #1285), run progress from the API, a report
that opens from its stored output and records a failed run, a wait for
the reform policy, the report year switcher and All years view (#1292),
dated edits in the adjust panel (#1294), each country's own draft, and
Your reforms' read-only reform detail with a parameters table, "View
results", "Re-run" and the delete prompt (#1288), with the other merged
fixes (#1289, #1290, #1293, #1295, #1296).

How the conflicts were resolved:

- Report page: a link is still a saved report's ID, read through the
  credential-free shared-report route, with the v1 report's number only
  without accounts. The v1 report it names (the shared row's
  legacy_report_id) gets main's run lifecycle: stored output, recorded
  failures, the household guard, the wait for the reform policy (for any
  link that resolved), the unknown-baseline state and the year switcher.
- Reforms page and ReformReports: main's read-only detail, parameters
  table, delete prompt, View results and Re-run, on this session's stores
  and session-scoped query keys. "View results", "Open" and "View full
  impact report" go to reportLink(report), never the v1 report's number.
  The detail keeps this branch's guards: a reform whose changes did not
  load cannot run and says so, a reform that changes nothing cannot run,
  and the run sends what Build would. A record without a year reads it
  from the API's record.
- Build's run bar: still "Save and run", which saves first and runs
  nothing when the save fails; it now saves only the values that differ
  from current law, leaves a reused reform (and its name) as it is, and
  names a budget window's years. A new reform has nothing to save when
  nothing differs.
- Adjust panel: main's dated edits, budget window and unknown-baseline
  guard on this session's reform store; recompute still waits until a
  value differs from current law.
- draftReform: loadProvisionsIntoDraft takes both the saved reform it
  edits and main's window and source.
- Tests: main's run-hook tests sit beside this branch's store tests; the
  run bar test that ran a report after a failed save is dropped, as a
  failed save runs nothing here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – policyengine-calculator-next — dea0f5c3 Deployed Oct 14, 2026 by vercel[bot]
Preview – policyengine-website — dea0f5c3 Deployed Oct 14, 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