You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ working on that area:
19
19
## Agent review workflows
20
20
21
21
-**BLOCKING REQUIREMENT: before running ANY `codex` / `codex exec` or `claude` CLI command — reviews, sanity checks, or one-off runs — you MUST first read `.claude/docs/agent-tricks-and-troubleshooting.md`.** Do not invoke either CLI until you have read it in the current session. This is not optional and applies even when the call "looks trivial".
22
-
- Follow its recommended invocation patterns for plan reviews, code reviews, PR reviews, tool restrictions, timeouts, and handling silent or hanging agent runs.
22
+
- Follow its recommended invocation patterns for plan reviews, code reviews, PR reviews, tool restrictions, timeouts, and handling silent or hanging agent runs. Review requests must allow at least 15 minutes before being treated as timed out.
23
23
- Always run non-interactive Codex reviews in **streaming mode** (`codex exec --json`) written to a raw file — never plain text mode piped through `tail`/`head`, which buffers output until completion and makes the run look hung.
24
24
-`codex exec` selects the sandbox directly (`--sandbox read-only` for reviews) and does **not** accept `--ask-for-approval` (that flag is interactive-only).
25
25
- Do not fall back to generic `claude --help`, plugin docs, or ad-hoc CLI flags until the local troubleshooting doc has been checked.
Copy file name to clipboardExpand all lines: docs/cache-freshness-diagnostics.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ If those sources are refreshed at different times, the homepage and detail page
30
30
31
31
- Vault summary metrics come from the top-vaults feed
32
32
- Loaded in [src/routes/strategies/[strategy=yamlStrategy]/+layout.ts](/Users/moo/code/frontend/src/routes/strategies/[strategy=yamlStrategy]/+layout.ts)
33
-
- The chart fetches `/trading-view/vaults/:id/metrics` client-side after hydration
33
+
- The chart fetches `/vaults/:id/metrics` client-side after hydration
34
34
- Implemented in [src/lib/top-vaults/VaultPriceChart.svelte](/Users/moo/code/frontend/src/lib/top-vaults/VaultPriceChart.svelte)
35
35
- The frontend app code does not add SWR caching to this chart request
Copy file name to clipboardExpand all lines: docs/chart-pages.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,25 @@
1
1
# Chart pages
2
2
3
-
This document describes chart pages and chart navigation in the Trading Strategy frontend. It focuses on vault chart pages under `src/routes/trading-view/vaults/`, but also notes the shared charting libraries used elsewhere.
3
+
This document describes chart pages and chart navigation in the Trading Strategy frontend. It focuses on vault chart pages under `src/routes/vaults/`, but also notes the shared charting libraries used elsewhere.
4
4
5
5
## Vault chart pages
6
6
7
7
The vault chart pages linked from the top `Charts` menu are:
8
8
9
-
-`/trading-view/vaults/cumulative-tvl-apy` - cumulative vault TVL by annualised return, with benchmark lines.
10
-
-`/trading-view/vaults/yield-risk` - vault annualised return by TVL, grouped by risk level.
11
-
-`/trading-view/vaults/yield-protocol` - vault annualised return by TVL, grouped by protocol.
12
-
-`/trading-view/vaults/yield-chain` - vault annualised return by TVL, grouped by chain.
13
-
-`/trading-view/vaults/current-peak-tvl` - current TVL by peak TVL.
14
-
-`/trading-view/vaults/core3-risk` - stablecoin vault returns and TVL by CORE3 Probability of Loss.
15
-
-`/trading-view/vaults/historical-tvl-chain` - historical vault TVL grouped by chain.
16
-
-`/trading-view/vaults/historical-tvl-stablecoin` - historical vault TVL grouped by stablecoin.
17
-
-`/trading-view/vaults/historical-tvl-protocol` - historical vault TVL grouped by vault protocol.
18
-
-`/trading-view/vaults/stablecoin-chain-heatmap` - current stablecoin vault TVL by stablecoin and chain.
9
+
-`/vaults/cumulative-tvl-apy` - cumulative vault TVL by annualised return, with benchmark lines.
10
+
-`/vaults/yield-risk` - vault annualised return by TVL, grouped by risk level.
11
+
-`/vaults/yield-protocol` - vault annualised return by TVL, grouped by protocol.
12
+
-`/vaults/yield-chain` - vault annualised return by TVL, grouped by chain.
13
+
-`/vaults/current-peak-tvl` - current TVL by peak TVL.
14
+
-`/vaults/core3-risk` - stablecoin vault returns and TVL by CORE3 Probability of Loss.
15
+
-`/vaults/historical-tvl-chain` - historical vault TVL grouped by chain.
16
+
-`/vaults/historical-tvl-stablecoin` - historical vault TVL grouped by stablecoin.
17
+
-`/vaults/historical-tvl-protocol` - historical vault TVL grouped by vault protocol.
18
+
-`/vaults/stablecoin-chain-heatmap` - current stablecoin vault TVL by stablecoin and chain.
19
19
20
20
Related vault list pages also include charts:
21
21
22
-
-`/trading-view/vaults/stablecoins`, `/chains`, `/protocols`, and `/curators` use `MarketSharePieChart.svelte`.
22
+
-`/vaults/stablecoins`, `/chains`, `/protocols`, and `/curators` use `MarketSharePieChart.svelte`.
23
23
- Group detail pages use `VaultGroupMiniChart.svelte`.
24
24
- Vault detail pages use lightweight-charts components for share price, utilisation, and benchmark series.
25
25
@@ -36,7 +36,7 @@ The common data sources are:
36
36
- Route-local `chart-data/+server.ts` endpoints for heavier ECharts pages that need cached JSON payloads.
37
37
- Client-side `fetch()` from `+page.svelte` for pages that opt out of SSR or need lazy chart data loading.
38
38
-`+page.server.ts` for pages that can prepare their data during server rendering.
39
-
- Vault detail metrics endpoints such as `/trading-view/vaults/[vault]/metrics` for time-series data.
39
+
- Vault detail metrics endpoints such as `/vaults/[vault]/metrics` for time-series data.
40
40
41
41
Current cached chart-data endpoints include:
42
42
@@ -98,7 +98,7 @@ Its `charts` array controls the `See charts:` link row displayed within chart pa
98
98
99
99
When adding or removing a chart page, update both arrays unless there is a deliberate reason for the page to appear in only one navigation surface. Also update integration tests that assert menu or selector counts:
- chart-page tests that assert `.scatter-plot-selector a` counts
103
103
104
104
The dropdown and in-page selector can intentionally have different counts. For example, a page can be present in the in-page selector before it is added to the top dropdown, but this should be explicit in the change.
@@ -113,6 +113,6 @@ first so private env vars and the historical vault parquet cache are available t
113
113
Useful checks:
114
114
115
115
- Run unit tests for chart payload builders, e.g. `pnpm exec vitest run src/lib/echarts/core3-risk.test.ts`.
116
-
- Run focused Playwright specs after navigation changes, e.g. `pnpm exec playwright test --config tests/integration tests/integration/trading-view/vaults/charts-dropdown.test.ts`.
116
+
- Run focused Playwright specs after navigation changes, e.g. `pnpm exec playwright test --config tests/integration tests/integration/vaults/charts-dropdown.test.ts`.
117
117
- Run `pnpm run build:test` before focused integration specs if `.svelte-kit-test/output/server` is missing.
118
118
- Use Playwright browser checks to verify canvas count, tooltip content, and navigation when adding a new ECharts page.
If the change is primarily visual or experimental, prefer trying it on the diagnostics page first and then porting the result into the front page widget once the behaviour is stable.
Copy file name to clipboardExpand all lines: docs/new-vault-chain.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,11 +57,11 @@ Vaults with `risk_numeric: null` (common for new chains without risk scoring) mu
57
57
If the new chain's vaults need a different default TVL threshold, add an entry to:
58
58
59
59
-`CHAIN_TVL_THRESHOLD_OVERRIDES` map in `src/lib/top-vaults/helpers.ts` (affects `meetsDefaultTvl` used on the front page)
60
-
-`chainOverrides` in the `tvlFilterOptions` array in the same file (affects the interactive filter on `/trading-view/vaults`)
60
+
-`chainOverrides` in the `tvlFilterOptions` array in the same file (affects the interactive filter on `/vaults`)
61
61
62
62
## 6. Parquet data
63
63
64
-
Vault share price chart data is served from a locally cached `data/cleaned-vault-prices-1h.parquet` file. The server refreshes this cache from the configured Cloudflare source when the file has not been checked for over one hour. The metrics endpoint (`src/routes/trading-view/vaults/[vault=vaultId]/metrics/+server.ts`) queries this file by vault ID.
64
+
Vault share price chart data is served from a locally cached `data/cleaned-vault-prices-1h.parquet` file. The server refreshes this cache from the configured Cloudflare source when the file has not been checked for over one hour. The metrics endpoint (`src/routes/vaults/[vault=vaultId]/metrics/+server.ts`) queries this file by vault ID.
65
65
66
66
Ensure the parquet file is updated to include rows for the new chain's vaults. Without this, the chart will render empty (no error shown to the user).
67
67
@@ -70,7 +70,7 @@ Ensure the parquet file is updated to include rows for the new chain's vaults. W
70
70
After adding a new chain, verify:
71
71
72
72
-[ ] Chain logo appears on the blockchains page (`/trading-view/blockchains`)
73
-
-[ ] Vaults appear in the listing (`/trading-view/vaults`) — try the search box and lower TVL filters
Copy file name to clipboardExpand all lines: docs/vault-data-source.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,11 +63,11 @@ R2 downloads stream the object body via the AWS SDK (`getR2Object`) and pipe it
63
63
64
64
### Treasury benchmark (FRED DTB3)
65
65
66
-
**Code:**`src/routes/trading-view/vaults/treasury-benchmark/+server.ts` (server proxy) and `src/lib/top-vaults/treasury-benchmark.ts` (client fetcher)
66
+
**Code:**`src/routes/vaults/treasury-benchmark/+server.ts` (server proxy) and `src/lib/top-vaults/treasury-benchmark.ts` (client fetcher)
67
67
68
68
The US 3-month Treasury bill rate is used as a risk-free benchmark on non-perpetual-futures vault charts. FRED blocks browser CORS and rate-limits aggressively, so the data is proxied through a server endpoint.
This public-facing endpoint proxies downloads through a separate Vault API service (`TS_PUBLIC_VAULT_API_URL`), not through R2 or the local cache. It is used by the datasets listing page for user-facing downloads.
102
102
103
-
The datasets listing page (`src/routes/trading-view/vaults/datasets/+page.server.ts`) requires R2 to be configured for displaying file metadata (size, last modified), even though the actual download goes through the Vault API.
103
+
The datasets listing page (`src/routes/vaults/datasets/+page.server.ts`) requires R2 to be configured for displaying file metadata (size, last modified), even though the actual download goes through the Vault API.
0 commit comments