feat: Report builder with modal-based ingredient selection#556
Draft
feat: Report builder with modal-based ingredient selection#556
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jan 9, 2026
Replace the hand-rolled parameter grid in PolicyDetailsDrawer with the shared PolicyOverviewContent component, making the drawer visually consistent with the policy editor overview tab. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swap policy/population colors so policies use teal and populations use slate. Change checkmark to primary[500]. Default baseline simulation to Current law + nationwide population. Remove dynamics section from report builder and "User-created policies" from policy modal sidebar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… msg Add Enter key handling in parameter value setter to submit on press. Replace separate view/edit action buttons with single gear icon (View/edit X) on Policies, Reports, and report output pages. Add "Back to reports" navigation above report output header. Remove "Your report is being calculated" info box from loading page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ct map Combine society-wide report output into a single Migration tab with collapsible sections for budgetary impact, distributional analysis, poverty impact, inequality impact, congressional districts, UK constituency, and local authority. Each section has inline segmented controls for chart switching. Key changes: - New MigrationSubPage with CollapsibleSection pattern and segmented controls for distributional (absolute/relative/intra-decile), poverty (depth + breakdown), and congressional (absolute/relative) modes - Choropleth map now uses two-trace approach: background trace shows all district outlines (gray borders, white fill) even before data loads, data trace overlays colored fills progressively as states complete - Congressional section shows map immediately with "Compute" button; progress bar + message during loading (X of 51 states) - Reproduce in Python moved from tab to header button (IconCode) - Pruned migrated charts from Comparative Analysis sidebar tree - Removed Dynamics, Overview (society-wide), constituency, and local authority tabs from ribbon - Added report mockup page and sidebar link for development Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add UK-only "Budgetary impact by program" section after budgetary impact - Add UK-only "Wealth distributional analysis" section with same absolute/relative/intra-decile segmented control as income section - Remove all items from Comparative Analysis sidebar tree (all charts now live on the Migration tab) - Remove report mockup page, route, and sidebar entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove entire tab navigation ribbon from ReportOutputLayout (tabs, sidebar, comparative analysis tree references all removed) - Migration content is now the full report output page for society-wide - Move "Compute congressional impacts" button to left of Absolute/ Relative segmented control - Clean up ReportOutputLayout props, tests, and fixtures - Remove mockup page route and sidebar entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace forward-arrow breadcrumbs with "< Back to reports" navigation in both ReportOutputLayout and ReportBuilderShell. Add gear button (IconSettings) on policy cards to open the policy modal in view mode, replacing the separate edit-only pencil button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…verview Report output page now renders the unified page directly at /report-output/:reportId without a /migration subpage. Overview section wraps the hero metrics and is auto-expanded; all other sections start collapsed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…factor overview cards - Create DashboardCard with 6-phase expand/collapse animation (framer-motion) - Support standard mode (icon+label+slides) and custom content mode (shrunkenContent) - Add colSpan, shrunkenBackground, shrunkenBorderColor, padding props - Create playground page with mini charts and mock data for testing - Refactor SocietyWideOverview to use DashboardCard for all 3 metric cards - Remove Overview tab, place overview content directly at top of report page - Fix ReportBuilderPage/useSimulationCanvas hook dependency issues - Add unnamed policy warning modal in PolicyCreationModal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… breakdowns - Fix initial card height bug caused by useLayoutEffect clearing styles on mount - Reduce SHRUNKEN_CARD_HEIGHT from 260 to 200px, center content vertically - Add chartHeight prop to BudgetaryImpact, PovertyImpactByAge, and WinnersLosersIncomeDecile subpages for use in constrained containers - Calculate precise expanded chart heights from card layout dimensions - Add federal tax, state tax, and benefit spending breakdowns to budgetary impact card (US only) using MetricCard components - Format values <$1M as "<$1 million" (or £ equivalent for UK) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ix chart heights - Add CongressionalDistrictCard to SocietyWideOverview with auto-start fetch, shrunken loading/gain-lose counts, and expanded choropleth map - Lift CongressionalDistrictDataProvider in MigrationSubPage to share context between overview and dropdown section - Add expandedRows prop to DashboardCard for variable expanded height - Add expandedControls prop to render SegmentedControls alongside the minimize button in a fixed-height controls row (31px = SC xs height) - Add shrunkenHeader/shrunkenBody two-part layout to DashboardCard - Fix chart heights: derive from card dimensions with controls row overhead (SECONDARY_CHART_H=252, BUDGET_CHART_H=279) so Box content height is ~279px consistently across all chart cards Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove CongressionalDistrictSection from MigrationSubPage since the DashboardCard now handles congressional district display. Pass computed height (557px) to the choropleth map so it fills the 3-row expanded card without blank space. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add red error trace overlay on choropleth map for errored states with red hover card background - Detect missing districts from both pre-computed and progressive fetch paths to show error counts on shrunken card - Add 'error' trend to MetricCard with red label, icon, and value - Improve fetchSocietyWideCalculation error logging with response body - Increase mini chart left margin for currency symbol visibility - Remove "Absolute impacts by decile" legend from decile card - Expose erroredStates from congressional district context Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
This PR introduces a completely redesigned Report Builder experience with modal-based workflows for selecting and creating policies, populations, and households. This is a major feature addition that provides users with an intuitive, streamlined interface for configuring policy simulations.
Report builder core
ReportBuilderPagewith simulation canvas for configuring reportsPolicy selection & creation modal
Population selection & creation modal
Household creation modal
Additional improvements
This PR is in draft status. The following still need investigation before merging:
Test plan
🤖 Generated with Claude Code