Repository navigation
v3: start UK local-area breakdowns in the background, alongside the report run - #1434
Merged
Merged
Conversation
UKLocalAreaAutoStart starts the breakdown run as soon as a UK-wide or nation report's national result is in, instead of when the Local areas tab's Compute button is clicked. It draws nothing: the tab follows the same run through the breakdown's query key, so it shows the run's progress, or the maps once the run completes, and Retry after an error. A result that holds both levels, or one from before .py 6.10.0, starts nothing, and a failed run is not started again by itself. The overview card now says the impacts calculate in the background. v2 is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While a UK-wide or nation report's national run calculates, the report page shows its progress card instead of ReportView. That card now renders UKLocalAreaAutoStart, which starts the breakdown at once, alongside the national run, instead of after its results arrive. The Local areas tab then follows the same run through the query key. UKLocalAreaAutoStart takes the national results or null, with resultsRunning for a run in progress; a report that opens from saved results still starts the breakdown when they lack a level, as before. Household reports and single-area reports start nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 30, 2026
This branch was successfully deployed
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.
Part of #1411. Follows #1427.
Summary
UK v3 reports start their local-area breakdown on their own. No click on "Compute local-area impacts" is needed.
1a4b6e11b). This commit was meant for UK breakdowns: start in the background, poll through brief failures, time limit, measured estimate, nation withheld counts, map credit #1427 but was pushed after that PR merged, so it never reached main.UKLocalAreaAutoStartstarts the breakdown when a UK-wide or nation report's national results come in without area impacts. It renders nothing; the Local areas tab follows the same run through the breakdown's query key and shows its progress, then the maps, or Retry after an error. The overview card now reads "They calculate in the background, in a few minutes."d2bfa5a99). While the national run calculates, the report page shows its progress card instead ofReportView. That card now rendersUKLocalAreaAutoStartwithresultsRunning, so the breakdown request goes at the same moment as the national run.What starts nothing:
v2 is unchanged.
Checks
bunx tsc --noEmit, ESLint and Prettier pass.UKLocalAreaAutoStart.test.tsx(starts alongside a run; nothing without one; starts for results without areas; nothing for saved results with both levels or no version). Updated: the ReportView local-area tests now expect the request without a click.localhost:3039against the live API, new report 4827 (UC under-25 single allowance £320, 2026):breakdown=local_areasrequest started 1 ms after the national request, while the page showed "Calculating the UK-wide results";Cost
Every new UK-wide or nation report now also runs its breakdown (about 2½ to 4½ minutes of worker time; cached by the API after the first run). PolicyEngine/policyengine-sim-api#914 (baseline reuse) would cut about 50 s from each.
🤖 Generated with Claude Code