Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e7f08c6
Initial plan
Copilot Aug 17, 2025
116c888
Initial analysis and plan for financial chart refactoring
Copilot Aug 17, 2025
ca85b39
Implement modular financial chart TypeScript integration
Copilot Aug 17, 2025
7a030cc
Changes before error encountered
Copilot Aug 17, 2025
fa90167
Changes before error encountered
Copilot Aug 17, 2025
2eb98ae
Remove legacy assets/js folder and obsolete type definitions
Copilot Aug 17, 2025
d7b5490
Fix TypeScript compilation issues in financial chart modules
Copilot Aug 17, 2025
ffb5620
Resolve Chart.js type conflicts and achieve passing tests
Copilot Aug 17, 2025
99a9fff
Apply suggestion from @Copilot
DaveSkender Aug 17, 2025
b515d3f
Apply suggestion from @Copilot
DaveSkender Aug 17, 2025
899e707
Apply suggestion from @Copilot
DaveSkender Aug 17, 2025
4672c38
Apply suggestion from @Copilot
DaveSkender Aug 17, 2025
39c10c2
Apply suggestion from @Copilot
DaveSkender Aug 17, 2025
90d323f
Fix Chart.js type conflicts and resolve all code quality issues
Copilot Aug 17, 2025
d57beb1
refactor: Complete OHLC dataset factory and modernize financial chart…
Copilot Aug 17, 2025
016613a
Merge branch 'main' into copilot/fix-416
DaveSkender Aug 18, 2025
da4be02
fix: Resolve GitHub Actions CI failure - eliminate all TypeScript com…
Copilot Aug 18, 2025
78b9349
fix: Address critical chart rendering errors and improve indicator er…
Copilot Aug 18, 2025
6c2755c
Refactor QuoteService to use file/static backup data instead of Quote…
DaveSkender Aug 19, 2025
7242d87
Fix Chart.js registration, environment variables, and C# Program clas…
Copilot Aug 21, 2025
16a175a
Diagnose chart rendering issues - temporarily disable candlestick pat…
Copilot Aug 21, 2025
54fb5d6
Restore candlestick chart implementation and fix code quality issues
Copilot Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Charts.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Expand All @@ -8,6 +9,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Functions", "server\Functio
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApi.Tests", "server\WebApi.Tests\WebApi.Tests.csproj", "{F2F8E5A3-B3D4-4A5C-9E7F-1A2B3C4D5E6F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
ProjectSection(SolutionItems) = preProject
server\Directory.Packages.props = server\Directory.Packages.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,40 @@ npm run test:coverage # With coverage
# Maintenance
npm run clean # Clean all build outputs
npm run lint:md # Lint markdown files
npm run generate:backups # Refresh both backup-indicators.json and backup-quotes.json (runs prebuild automatically)
npm run generate:backup-indicators # Refresh backup-indicators.json (quotes are now fully static)
```

### Backup data (indicators & quotes)

The project now ships a single, committed deterministic `backup-quotes.json` (1000 trading days) that is treated as **static**.
It is consumed directly by the frontend and (via `QuoteFileFallback`) by the Web API. A secondary, embedded algorithmic
fallback (`QuoteBackup`) generates the same deterministic shape if the JSON file is absent (e.g., trimmed deployment).

Only indicators remain generated from the live API. Regenerate indicators when backend indicator logic changes:

```bash
npm run generate:backup-indicators
```

How quotes work now:

- `backup-quotes.json` is authoritative and versioned – no generation script required.
- `QuoteFileFallback` loads the shared JSON; if missing, it falls back to the deterministic in-code generator (`QuoteBackup`).
- Frontend tests assert invariants (length 1000, midnight timestamps, price bounds) guaranteeing stability.

Notes:

- Quotes no longer depend on network or runtime availability.
- Indicator generation still honors `BACKUP_DATA_API_BASE` if you want to point at a non-default API URL during regeneration.

Environment variable (indicators only):

| Variable | Purpose | Default |
| ---------------------- | ------------------------------------------------- | ----------------------- |
| `BACKUP_DATA_API_BASE` | Base URL used when regenerating indicators backup | `http://localhost:5000` |

Future ideas: integrity checksum for backups, multiple symbols, adjustable horizons.

**Workspace-specific commands**:

```bash
Expand Down
22 changes: 21 additions & 1 deletion client/src/app/components/picker/pick-config.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,27 @@ export class PickConfigComponent {
message: e.message,
error: e.error
});
this.errorMessage = e.error;

// Extract meaningful error message from HttpErrorResponse
let errorMessage = "An error occurred while adding the indicator.";

if (typeof e.error === "string") {
errorMessage = e.error;
} else if (e.error && typeof e.error === "object") {
if (e.error.message) {
errorMessage = e.error.message;
} else if (e.error.error) {
errorMessage = e.error.error;
} else {
errorMessage = `Error ${e.status}: ${e.statusText || "Unknown error"}`;
}
} else if (e.message) {
errorMessage = e.message;
} else if (e.statusText) {
errorMessage = `Error ${e.status}: ${e.statusText}`;
}

this.errorMessage = errorMessage;
this.closeButtonLabel = "RETRY";
}
});
Expand Down
Loading
Loading