Show formula component values in income-required popup; alphabetize states#63
Merged
Merged
Conversation
… states The "Income Required for Full Utilization" info popup now lists the value of each formula term (§461(l) deduction, $3K used, start-of-year NOL ÷ 80% gross-up, and the netted-out taxable ST/LT gains) under "Your value", so the planning target is auditable. The components are computed once in the engine (core.ts / sensitivity.ts) as incomeRequiredComponents and consumed by the popup — no parallel calculation. A reconciliation test asserts the terms net back to the headline figure. Also reordered the STATES list alphabetically by name (custom "Other" entry pinned last) so every state dropdown displays in alphabetical order.
Deploying enhanceddirectindexingcalc with
|
| Latest commit: |
9399d29
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://33248ee9.enhanceddirectindexingcalc.pages.dev |
| Branch Preview URL: | https://claude-cool-ptolemy-oq9sy8.enhanceddirectindexingcalc.pages.dev |
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.
Summary
Two small UX improvements to the "Income Required for Full Utilization" surface and the state pickers.
1. Formula component values in the info popup
The popup already showed the formula and the single "Your value" figure. It now also lists the value of each term of that formula under "Your value", for the peak year:
These are computed once in the engine as a new
incomeRequiredComponentsobject onYearResult(in bothcore.tsand the sensitivity mirror) and consumed by the popup — no parallel calculation, honoring the one-engine rule. A reconciliation test asserts the four terms net back to the headlineincomeRequiredForFullUtilizationfor every projection year, and that the gross-up equals start-of-year NOL ÷ limit.The popup component (
InfoText/FieldInfoPopup) gained an optionalbreakdownprop and a small styled term list; a component test verifies it renders (and is omitted when no breakdown is supplied).2. Alphabetical states
STATESinsrc/taxData.tswas grouped (no-income-tax states first, then the taxed states), so the dropdowns weren't fully alphabetical. The list is now ordered alphabetically by name with the custom "Other (enter rate)" entry pinned last. All three state dropdowns (Workspace, Tax/Financial profile, Meeting mode) read from this single array, so they're all consistent. All rates and inline sourcing comments are preserved.Testing
npm run test:run— 406 passing (added engine reconciliation + popup render tests)npm run build— type-check + vite build cleannpm run lint— 0 errorsnpm run format:check— cleanNote: no Playwright in this remote environment, so the popup was verified via a Testing Library render test rather than a live browser screenshot.
https://claude.ai/code/session_0172oQH7aaFiSDufagm7TXJr
Generated by Claude Code