Skip to content

Fix V6 parameter editor date, scroll, and chart issues#839

Merged
anth-volk merged 3 commits intomainfrom
fix/fix-david-issues
Mar 14, 2026
Merged

Fix V6 parameter editor date, scroll, and chart issues#839
anth-volk merged 3 commits intomainfrom
fix/fix-david-issues

Conversation

@anth-volk
Copy link
Collaborator

Fixes #838

Summary

  • Date timezone fix: Use toLocalDateString/fromLocalDateString in YearlyValueSelectorV6 and DefaultValueSelectorV6 to prevent off-by-one-day errors in behind-UTC timezones
  • Scroll fix: Replace Radix ScrollArea with native overflow-y: scroll in PolicyParameterTree and ParameterSidebar so the parameter menu scrolls properly in flex layouts
  • Chart y-axis headroom: Fix getNiceTicks to guarantee the last tick covers dMax, and add 10% padding above the max data point in the historical values chart
  • UI cleanup: Remove duplicate "Historical values" heading, reduce chart left margin and card padding

Test plan

  • Select a date in the V6 yearly/default value selectors while in a behind-UTC timezone — verify the date is not shifted by one day
  • Open the parameter browse modal and verify the sidebar tree scrolls when there are many parameters
  • View a historical values chart and verify there is visible headroom above the highest data point
  • Verify no duplicate "Historical values" heading appears
  • Run npm test — 52 passing tests including new date round-trip and getNiceTicks headroom tests

🤖 Generated with Claude Code

- Use toLocalDateString/fromLocalDateString in YearlyValueSelectorV6 and
  DefaultValueSelectorV6 to prevent off-by-one-day timezone errors
- Replace Radix ScrollArea with native overflow-y scroll in
  PolicyParameterTree and ParameterSidebar to fix menu scrollability
- Fix getNiceTicks to ensure last tick covers dMax, preserving y-axis
  headroom when 10% padding is applied
- Add 10% y-axis headroom above max data point in HistoricalValues chart
- Remove duplicate "Historical values" heading and excessive top margin
- Reduce chart left margin and card padding for tighter layout
- Add tests for local date string round-trips and getNiceTicks headroom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 13, 2026

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

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment Mar 14, 2026 0:10am
policyengine-calculator Ready Ready Preview, Comment Mar 14, 2026 0:10am

Request Review

anth-volk and others added 2 commits March 13, 2026 21:01
Port the unnamed policy warning from PolicyCreationModal to
PolicyBrowseModal so users can create policies without a name
via the report builder browse flow. Shows a confirmation dialog
instead of silently blocking or disabling the button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix DialogContent default max-width: use explicit 32rem instead of
  tw:sm:max-w-lg which resolves to 16px due to spacing token override
- Use outline variant for Cancel buttons in warning dialogs
- Disable create/save buttons when no parameters are modified
- Apply same fixes to both PolicyBrowseModal and PolicyCreationModal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@anth-volk anth-volk marked this pull request as ready for review March 14, 2026 00:17
@anth-volk anth-volk merged commit 914ecde into main Mar 14, 2026
10 checks passed
@anth-volk anth-volk deleted the fix/fix-david-issues branch March 14, 2026 00:25
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.

V6 parameter editor: date timezone bug, scroll, and chart fixes

1 participant