feat: implement story cards and event-aware annotations (issue #14)#27
Merged
feat: implement story cards and event-aware annotations (issue #14)#27
Conversation
- Create StoryCard component with reusable narrative cards - Implement useMarketStories hook to generate event-based narratives - Integrate story cards rail into Dashboard - Add market context stories for events, volatility, and disruption
…tate pages - Create eventAnnotations utility for converting events to chart markers - Create EventAnnotationControls component for category filtering - Create useChartEvents hook for date-range event fetching and filtering - Add correlation-specific story cards to Correlation page - Add state-scoped market event story cards to State page
…story cards - Extend PriceLineChart with vertical reference line support via x prop - Wire Historical page 'Show Events' toggle to actual event data - Convert events to vertical reference lines on Historical price chart - Fix StoryCardData type references in Correlation story card computation
- Add full issue #14 entry to CHANGELOG [Unreleased] section - Fix StoryCard.test.tsx: use userEvent.setup() directly instead of destructuring from render()
- Set minimum pool size to 0 and added acquireTimeoutMillis to database configuration. - Created a new test file for StoryCard component with comprehensive tests for rendering and interaction.
- Change moduleResolution from 'bundler' to 'node' (bundler requires ESM) - Remove invalid ignoreDeprecations option - Fixes CI build failure: TS5095 and TS5103 errors
- Update packages/db/src/config.ts development pool min from 0 to 2 - Fixes failing test in packages/db/src/__tests__/config.test.ts - All 54 db tests now passing
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.
Overview
Implements issue #14: story cards and event-aware annotations across dashboard surfaces to provide narrative context alongside price data.
Changes
New Components
StoryCard — Reusable narrative card component with:
role="article"EventAnnotationControls — Category filter pill bar for event overlays:
New Hooks
New Utilities
Feature Integration
Dashboard
Correlation
State Pages
Historical
Chart Enhancement
ChartReferenceLinewithxproperty for vertical linesTesting
Acceptance Criteria Met
✓ Dashboard and historical views show 3–5 structured story cards
✓ Charts surface consistent event annotations with category filtering
✓ Clicking a story or annotation reveals actionable context
✓ Event context reused across dashboard, state, and correlation surfaces
✓ Consistent styling and UX patterns across all surfaces
Files Changed