Skip to content

Commit 89523e4

Browse files
author
Fortinbra
committed
Merge feature/053-reporting-line-chart into main
Feature 053: Reporting & Data Portability — line charts, area charts, grouped/stacked bar charts, sparklines, progress bars, radial gauges, CSV export, custom report builder with grid layout, widget config panel, and component showcase. Includes build/test fix pass (053.1): Razor parser fixes, missing global usings, test stub updates, IAsyncLifetime disposal.
2 parents b19796e + 61638f5 commit 89523e4

File tree

150 files changed

+11439
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+11439
-226
lines changed

.vscode/tasks.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "E2E: Functional 062 (Local)",
6+
"type": "shell",
7+
"command": "dotnet",
8+
"args": [
9+
"test",
10+
"c:\\ws\\BudgetExperiment\\tests\\BudgetExperiment.E2E.Tests\\BudgetExperiment.E2E.Tests.csproj",
11+
"--filter",
12+
"Category=Functional"
13+
],
14+
"options": {
15+
"env": {
16+
"RUN_E2E_TESTS": "true",
17+
"BUDGET_APP_URL": "http://localhost:5099"
18+
}
19+
},
20+
"group": "test"
21+
},
22+
{
23+
"label": "E2E: Functional 062 (DemoSafe)",
24+
"type": "shell",
25+
"command": "dotnet",
26+
"args": [
27+
"test",
28+
"c:\\ws\\BudgetExperiment\\tests\\BudgetExperiment.E2E.Tests\\BudgetExperiment.E2E.Tests.csproj",
29+
"--filter",
30+
"Category=Functional&Category=DemoSafe"
31+
],
32+
"options": {
33+
"env": {
34+
"RUN_E2E_TESTS": "true",
35+
"BUDGET_APP_URL": "https://budgetdemo.becauseimclever.com"
36+
}
37+
},
38+
"group": "test"
39+
}
40+
]
41+
}

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,68 @@ All notable changes to Budget Experiment.
44

55
## [Unreleased]
66

7+
## [3.15.0] - 2026-02-14
8+
9+
### Features
10+
11+
- **client:** LineChart component for trend visualization with multi-series support, axes, grid, and reference lines
12+
- **client:** Shared chart primitives (ChartAxis, ChartGrid, ChartTooltip) for SVG charts
13+
- **client:** GroupedBarChart and StackedBarChart components for multi-series comparisons and composition views
14+
- **client:** AreaChart component with optional gradient fills
15+
- **client:** SparkLine, ProgressBar, and RadialGauge components for compact trend and progress visualization
16+
- **api:** CSV export endpoint for monthly category report
17+
- **application:** Export service infrastructure with CSV formatter
18+
- **client:** Export button download handling with loading state and error feedback
19+
- **domain:** Custom report layout entity and repository contract
20+
- **infrastructure:** EF Core configuration, DbSet, and repository for custom report layouts
21+
- **application:** Custom report layout service with scope-aware CRUD operations
22+
- **api:** Custom report layout CRUD endpoints (`/api/v1/custom-reports`)
23+
- **client:** Custom report builder page with widget palette, canvas, and placeholder widgets
24+
- **client:** Custom report layout CRUD methods in BudgetApiService
25+
- **client:** Reports index card for custom report builder
26+
- **client:** Custom report builder grid layout with drag/resize snapping and widget presets
27+
- **client:** Widget configuration panel with title editing and per-widget options
28+
- **client:** Report widget actions for selection, duplicate, and delete
29+
- **client:** BarChart click events for drill-down
30+
- **client:** Component showcase page for charts and exports
31+
32+
### Bug Fixes
33+
34+
- **client:** Fix Razor parser failure with escaped quotes in ReportCanvas interpolated strings
35+
- **client:** Fix `@layout` directive conflict in CustomReportBuilder by renaming variable
36+
- **client:** Fix AreaChart string parameter bindings missing `@` prefix
37+
- **client:** Fix ExportDownloadService async disposal pattern
38+
- **infra:** Add missing `Domain.Reports` global using in Infrastructure and Application
39+
- **api:** Add missing XML doc param tag in ExportController
40+
- **api:** Fix invalid `ChatActionType.Unknown` enum reference in tests
41+
42+
### Testing
43+
44+
- **client:** bUnit tests for LineChart (empty state, paths, points, multi-series, ARIA)
45+
- **client:** bUnit tests for GroupedBarChart and StackedBarChart (empty state, rendering, legend, ARIA)
46+
- **client:** bUnit tests for AreaChart and large dataset rendering
47+
- **client:** bUnit tests for SparkLine, ProgressBar, and RadialGauge
48+
- **api:** ExportController integration test for CSV export
49+
- **application:** Export service unit tests for CSV formatter and routing
50+
- **client:** bUnit tests for ExportButton download flow
51+
- **client:** bUnit tests for BarChart click/colors, LineChart smooth interpolation, StackedBarChart segment heights, ProgressBar thresholds, and RadialGauge dash offsets
52+
- **client:** bUnit tests for report builder components (ReportWidget, WidgetConfigPanel)
53+
- **api:** Export controller auth tests for CSV endpoints
54+
- **e2e:** Report chart interaction tests (tooltips, drill-down)
55+
- **e2e:** Report export flow test for CSV download
56+
- **e2e:** Custom report builder tests for drag/select and save/reload
57+
- **e2e:** Accessibility coverage expanded to report pages
58+
- **client:** Fix missing IBudgetApiService stub methods and service registrations in test classes
59+
- **client:** Fix ThemeService IAsyncDisposable handling with IAsyncLifetime in bUnit tests
60+
61+
### Documentation
62+
63+
- **docs:** Update Feature 053 spec for custom report builder layout, endpoints, and Phase 7 status
64+
- **docs:** Feature 053 updates for grid layout, presets, tests, and deferred items
65+
- **docs:** Chart component standards added to component guidelines
66+
- **docs:** Feature 053.1 — build and test fix catalog for features 051–053
67+
- **readme:** Reports and component showcase documentation updates
68+
769
## [3.14.1] - 2026-02-08
870

971
### Bug Fixes

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Budget Experiment helps you manage your finances by:
1919
- **AI-powered categorization**: Get intelligent rule suggestions using local AI (via Ollama)
2020
- **CSV import**: Import transactions from Bank of America, Capital One, and UHCU with duplicate detection
2121
- **Calendar view**: Visualize daily transaction summaries and navigate spending history
22-
- **Reports & analytics**: Category spending, monthly trends, budget vs. actual comparison, date range filtering, week summaries — all navigable from the calendar with quick insights panel
22+
- **Reports & analytics**: Category spending, monthly trends, budget vs. actual comparison, date range filtering, week summaries, CSV exports, and a custom report builder
23+
- **Component showcase**: Dedicated UI page for chart and component previews
2324

2425
## 🏗️ Architecture
2526

docs/051-ai-assistant-calendar-context.md

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Feature 051: AI Assistant Calendar Context
2-
> **Status:** 🗒️ Planning
2+
> **Status:** ✅ Complete
33
> **Priority:** Medium
44
> **Dependencies:** Chat/AI Assistant (Complete), Calendar Page (Complete)
55
@@ -398,12 +398,12 @@ private static string FormatContext(ChatContext? context)
398398
**Objective:** Add calendar date tracking to the client-side context service.
399399

400400
**Tasks:**
401-
- [ ] Add `CalendarViewedYear`, `CalendarViewedMonth`, `SelectedDate` to `ChatPageContext`
402-
- [ ] Add `SetCalendarContext` method to `IChatContextService`
403-
- [ ] Implement `SetCalendarContext` in `ChatContextService`
404-
- [ ] Update `GetContextSummary` to include calendar context
405-
- [ ] Add `ToDto()` method to convert context to DTO
406-
- [ ] Write unit tests for new context methods
401+
- [x] Add `CalendarViewedYear`, `CalendarViewedMonth`, `SelectedDate` to `ChatPageContext`
402+
- [x] Add `SetCalendarContext` method to `IChatContextService`
403+
- [x] Implement `SetCalendarContext` in `ChatContextService`
404+
- [x] Update `GetContextSummary` to include calendar context
405+
- [x] Add `ToDto()` method to convert context to DTO
406+
- [x] Write unit tests for new context methods
407407

408408
**Validation:**
409409
- Context service correctly stores calendar dates
@@ -417,9 +417,9 @@ private static string FormatContext(ChatContext? context)
417417
**Objective:** Create the DTO for transmitting context from client to API.
418418

419419
**Tasks:**
420-
- [ ] Create `ChatContextDto` class in `Contracts/Dtos/ChatDtos.cs`
421-
- [ ] Add `Context` property to `SendMessageRequest`
422-
- [ ] Ensure XML documentation is complete
420+
- [x] Create `ChatContextDto` class in `Contracts/Dtos/ChatContextDto.cs`
421+
- [x] Add `Context` property to `SendMessageRequest`
422+
- [x] Ensure XML documentation is complete
423423

424424
**Validation:**
425425
- DTOs compile and serialize correctly
@@ -433,11 +433,11 @@ private static string FormatContext(ChatContext? context)
433433
**Objective:** Calendar page updates context when dates change.
434434

435435
**Tasks:**
436-
- [ ] Inject `IChatContextService` into `Calendar.razor`
437-
- [ ] Call `SetCalendarContext` in `OnParametersSetAsync` (when month changes)
438-
- [ ] Call `SetCalendarContext` in `SelectDate` (when day is selected)
439-
- [ ] Call `SetCalendarContext` when account filter changes
440-
- [ ] Clear context in `Dispose`
436+
- [x] Inject `IChatContextService` into `Calendar.razor`
437+
- [x] Call `SetCalendarContext` in `OnParametersSetAsync` (when month changes)
438+
- [x] Call `SetCalendarContext` in `SelectDate` (when day is selected)
439+
- [x] Call `SetCalendarContext` when account filter changes
440+
- [x] Clear context in `Dispose`
441441
- [ ] Test that context updates propagate to ChatPanel
442442

443443
**Validation:**
@@ -453,9 +453,9 @@ private static string FormatContext(ChatContext? context)
453453
**Objective:** ChatPanel sends context with each message.
454454

455455
**Tasks:**
456-
- [ ] Update `IChatApiService.SendMessageAsync` to accept optional `ChatContextDto`
457-
- [ ] Update `ChatApiService.SendMessageAsync` to include context in request body
458-
- [ ] Update `ChatPanel.HandleSendMessage` to pass context from `ChatContextService`
456+
- [x] Update `IChatApiService.SendMessageAsync` to accept optional `ChatContextDto`
457+
- [x] Update `ChatApiService.SendMessageAsync` to include context in request body
458+
- [x] Update `ChatPanel.HandleSendMessage` to pass context from `ChatContextService`
459459
- [ ] Write integration tests for context transmission
460460

461461
**Validation:**
@@ -470,10 +470,10 @@ private static string FormatContext(ChatContext? context)
470470
**Objective:** API extracts context and passes to chat service.
471471

472472
**Tasks:**
473-
- [ ] Update `ChatController.SendMessageAsync` to extract context from request
474-
- [ ] Map `ChatContextDto` to domain `ChatContext` record
475-
- [ ] Pass context to `_chatService.SendMessageAsync`
476-
- [ ] Write API integration tests verifying context handling
473+
- [x] Update `ChatController.SendMessageAsync` to extract context from request
474+
- [x] Map `ChatContextDto` to domain `ChatContext` record
475+
- [x] Pass context to `_chatService.SendMessageAsync`
476+
- [x] Write API integration tests verifying context handling
477477

478478
**Validation:**
479479
- API accepts and processes context
@@ -489,9 +489,9 @@ private static string FormatContext(ChatContext? context)
489489
**Note:** `NaturalLanguageParser.FormatContext` already handles `CurrentDate`, `CurrentAccountName`, `CurrentCategoryName`, and `CurrentPage`. The existing prompt text is basic ("Viewing date: {date}"). This phase focuses on verifying/improving the prompt phrasing and testing the end-to-end flow.
490490

491491
**Tasks:**
492-
- [ ] Review and improve `FormatContext` prompt wording (e.g., instruct AI to pre-fill transaction date)
493-
- [ ] Verify `CurrentDate` is used for transaction date when present
494-
- [ ] Write unit tests verifying date is extracted from context
492+
- [x] Review and improve `FormatContext` prompt wording (e.g., instruct AI to pre-fill transaction date)
493+
- [x] Verify `CurrentDate` is used for transaction date when present
494+
- [x] Write unit tests verifying date is extracted from context
495495
- [ ] Test with various prompts ("add transaction", "spent $50 on groceries")
496496

497497
**Validation:**
@@ -506,12 +506,13 @@ private static string FormatContext(ChatContext? context)
506506
**Objective:** Comprehensive testing and edge case handling.
507507

508508
**Tasks:**
509-
- [ ] Add E2E test: select date → open chat → add transaction → verify date
510-
- [ ] Add E2E test: change month → verify context updates
511-
- [ ] Test with no date selected (should default to today)
512-
- [ ] Test context clearing on navigation
513-
- [ ] Verify mobile experience
514-
- [ ] Run accessibility audit on context hint display
509+
- [ ] Add E2E test: select date → open chat → add transaction → verify date (Deferred - requires AI service)
510+
- [x] Add E2E test: select date → open chat → verify context hint
511+
- [x] Add E2E test: change month → verify context updates
512+
- [x] Test with no date selected (should default to today)
513+
- [x] Test context clearing on navigation
514+
- [x] Verify mobile experience
515+
- [ ] Run accessibility audit on context hint display (Deferred)
515516

516517
**Validation:**
517518
- All tests pass
@@ -598,3 +599,14 @@ private static string FormatContext(ChatContext? context)
598599
| 2026-01-26 | Initial draft | @becauseimclever |
599600
| 2026-02-02 | Full technical design, implementation phases, user stories | @github-copilot |
600601
| 2026-02-09 | Codebase audit: updated current state, fixed broken 043 link, noted Application layer already supports dates | @github-copilot |
602+
| 2026-02-10 | Completed Phase 1 client context updates and Phase 2 DTO additions | @github-copilot |
603+
| 2026-02-10 | Wired Calendar page to chat context service (Phase 3) | @github-copilot |
604+
| 2026-02-10 | Included chat context in client message requests (Phase 4 partial) | @github-copilot |
605+
| 2026-02-10 | Wired chat API controller to accept context (Phase 5 partial) | @github-copilot |
606+
| 2026-02-10 | Improved AI context prompt wording and tests (Phase 6 partial) | @github-copilot |
607+
| 2026-02-10 | Added API integration tests for chat context (Phase 5 complete) | @github-copilot |
608+
| 2026-02-10 | Added app-layer test for context propagation to parser | @github-copilot |
609+
| 2026-02-10 | Added fallback to use context date when AI omits date | @github-copilot |
610+
| 2026-02-10 | Added test to prefer explicit AI date over context | @github-copilot |
611+
| 2026-02-10 | Added mobile E2E coverage for calendar context hint | @github-copilot |
612+
| 2026-02-10 | Added mobile E2E coverage for month change and context clearing | @github-copilot |

0 commit comments

Comments
 (0)