Repository navigation
v3 Household tab: a household switcher, results first, full-width charts - #1511
Merged
Merged
Conversation
The Household tab stacked one card per household, each with its form and then its result under the form, so results sat between forms and the charts got the narrowest width on the page. - A row of tiles switches between the households (name, who they are, earnings and the change in net income) and "Compare all", one table of every household's baseline, reform and change. - One household shows at a time, with Results and Inputs. Results lead once it runs; a result for changed inputs says so and offers to calculate again. Households can be renamed in place. - The result has no frame or title of its own, so its tables and the net income, earnings and marginal tax rate charts take the panel's full width. - Inputs (v3 columns layout only): labels above inputs in the person cards, whole amounts without cents, add links that wrap, and "Household details" under the tab's own Household heading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…-first # Conflicts: # app/src/components/flagship/report/household/HouseholdImpactSection.tsx
Each builder field (v3 columns layout only) and each result line gets a small info tip: the period the amount covers first, then the model's description. Money inputs read "Per year: enter the total for the year", by #1360's rule (utils/variablePeriod.ts, copied unchanged): the builder sends every amount for the year, and core divides it for month-defined variables. Result lines read "Per year". The tip opens on hover, keyboard focus, click and tap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tile row now holds only the households and "Add another household". "Compare all (N)" is a button at the right of the Household heading, shown with two or more households: pressed while the comparison shows, when no tile is selected. Pressing it again, or a tile, opens a household again. The section draws the heading's line, so ReportView passes its heading in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d runs With an amount still being typed, the inputs read as calculated, so the button was disabled. A press on it blurred the field, which committed the amount and enabled the button, but a browser drops the click of a press that landed on a disabled button: a second click was needed. The button is now marked unavailable (aria-disabled, dimmed) rather than disabled, and checks again on the click, after the commit. It is still disabled while a run is on its way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… opened again Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tab is open The v2 outputs fetch the variation themselves, and TanStack Query cancels a fetch that loses its last reader, so the run started again from 0. The household's card now holds the same two variation queries once either output opens, with the run's start time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… range Behind a tidyChart prop the v3 household tab sets; the v2 report pages keep their charts as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The card's bars do not yet read clearly. The chart, its CSV rows and its tests stay, so a one-line change shows it again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is stored Varying earnings and Marginal tax rates now open on the chart, or on a bar already running, without waiting for the reader to open them. Costs 2 calculate-full requests per calculated household. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Net income's tree, followed down to the deepest lines whose amount changes, signed by what each does to net income; up to 4, then a link to the Net income view, and a total when there is more than one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PavelMakarchuk
marked this pull request as ready for review
November 3, 2026 20:43
This was referenced Nov 3, 2026
anth-volk
added a commit
that referenced
this pull request
Nov 27, 2026
…report-saved-households Brings in #1386's branch at d0c1608, which has main (de9c9e5) merged in, including the Household tab's household switcher and its background variation run (#1511). Conflicts, resolved keeping main's behavior in the Household tab and this branch's shared parts: - HouseholdImpactSection: main's panel (switcher, results and inputs views, Calculate again, the variation run started once the household is stored), with this branch's HouseholdBuilderPanel, useRequestedHouseholdRun (now passed main's onCreated), the shared run progress and failure, and newV3Household. The household's summary with its earnings is worked out from the household asked for, as the run hook keeps it. - useFlagshipHousehold: main's onCreated callback and v2 policies, with useRequestedHouseholdRun, which passes onCreated through. - HouseholdImpactResult: main's result without a frame or title, its tips and programmes; this branch's shared headline styles and output tabs; main's householdMoney.ts for money, so householdResultParts no longer keeps its own copy (HouseholdNetIncomeResult reads main's). - HouseholdBreakdowns and EarningsVariationSubPage: both props kept (tidyChart from main, alsoOfferInputs from this branch). - HouseholdRunProgress takes the run's start time, as main's section passes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changes
The v3 report's Household tab (US and UK share one component) stacked one card per household: the form, then Calculate, then the result under the form in the same card. With two or more households, a result sat between forms, and the result was a card inside a card, so its tables and charts got the narrowest width on the page.
This PR keeps several households and makes the results a primary screen.
columnslayout only) and each result line has an "i" tip: the period the amount covers first, then the model's description. Money inputs read "Per year: enter the total for the year"; result lines read "Per year". It opens on hover, keyboard focus, click and tap (phones).columnslayout only; v2's stacked layout is unchanged): labels above the inputs in the person cards (they wrapped in a fixed narrow column), whole amounts without cents ("45,000", not "45,000.00"), add links that wrap instead of being cut off ("Add variable to your second depende…"), and "Household details" under the tab's own "Household" heading on a phone.Every household stays mounted while another shows, so a run carries on in the background; only the shown household renders its form and result.
Layout options, the audit and before screenshots: https://claude.ai/artifact/W6yZMdAFQQzpxWo9pXVhm1 (Pavel picked option A; the switcher sits above the panel rather than beside it so charts keep the full width).
HouseholdVariationKeeper); the v2 hook and pages are unchanged.calculate-fullrequests (baseline and reform) per calculated household, also when the reader never opens those tabs.Overlap and scope split
Saving households stays in Anthony's PRs; this PR has the layout, formatting and comparison only, and saves nothing.
v3 households: save each calculated household to its user, shown nowhere #1505 (save each calculated household) is merged into
mainand merged into this branch: itsuseSaveCalculatedHouseholdcall sits in the newHouseholdCardafterconst result = …, and its tests pass with the new layout. The saved row's name isrequested.summary, which now ends with the household's earnings ("Married · 2 children · Ohio · $65,000 earnings").v3 standalone household report and saved households, unreachable until v3 moves to the v2 routes #1392 (standalone household report, saved households). It moves the result's money helpers and card style into
householdResultParts.tsx. On a rebase, itshouseholdMoney/signedHouseholdMoneycan replace this PR'shouseholdMoney.ts; the report tab's result keeps no frame of its own (the panel frames it), while the standalone report can keephouseholdResultCardStyle.Show the period each household money input covers #1360 (period of each money input, Anthony's draft). The tips use its rule:
utils/variablePeriod.tsand its test, and itsquantityTypelines invariableMetadata.tsandVariableResolver.ts, are copied byte for byte, so they merge cleanly either way. Both PRs changeVariableRow.tsxnear the stacked label; Show the period each household money input covers #1360 also adds an "Annually" note under each box. Whichever merges second keeps one of the two period cues in the v3 layout.Not in this PR
On the live API today, a new household's reform call (
GET /us/household/{id}/policy/{reform}) and the reform variation (POST /us/calculate-full) timed out at 240 s and 300 s with no status, and the tab kept "Calculating…" with no error. That is a separate issue in how a run that ends without a response is shown; it is not changed here.Tests
HouseholdImpactSection.test.tsx: switching, renaming, Compare all, the changed-inputs notice, and the existing run, result, failure and breakdown tests moved to the tiles and the Results/Inputs switch.HouseholdBuilderForm.test.tsx: whole amounts without cents in the columns layout, cents kept in the stacked layout; "Household details".bunx tsc --noEmit, ESLint and Prettier pass.How to check
🤖 Generated with Claude Code