Intelligence, Advanced Charting & Trading Platform

1 # ChartNova — Production Initial-Load Performance Fix (2026-10-15)
2
3
4 > **ARCHIVAL / NOT CURRENT PRODUCTION STATE — 2026-10-15.** The v27 deployment described below was a real historical rollout but **was subsequently rolled back** after a user reported the site would not open. The repository last records v26 version ID **85177f9d-09c0-4763-b28c-2c6ba5ae5be5** at 100% in rollback deployment **78155d6f-11fc-4d1b-ab4f-7c0a97474406** at 05:59:12 UTC. This is repository evidence, **not a fresh Cloudflare inspection**. The *reason for the rollback decision* was the user-facing outage report; the *technical root cause* is **تأییدنشده** without affected-device traces. Do **NOT** redeploy v27 or treat this document's original "deployed" section as current. See [Stage-1 timeline / missing evidence](chartnova-stage1-production-reconciliation-2026-10-15.md), [rollback record](https://github.com/davoodmehraban89/VELYQOR/blob/ops/chartnova-emergency-rollback-2026-10-15/PROJECT_STATE.md), and [production manifest](production-manifest.json).
5
6
7 ## Verified incident and cause
8
9 User reported that `https://app.chartnova.ir/` eventually opened but initial prices loaded late. Direct external API checks confirmed successful market data with 58 symbols, but `/api/markets` returned approximately 85 KB and response durations fluctuated.
10
11 Read-only inspection of the **actual Cloudflare-deployed** `velyqor-preview` Worker version 26 found that the browser:
12 - initiated independent `/api/domestic`, `/api/xau` and `/api/markets` requests;
13 - waited for `Promise.allSettled` on **all three** before replacing the loading status;
14 - rendered the 58-card market grid and technical chart even when their tabs were hidden, and rendered them again after the batch finished.
15
16 This is a client rendering bottleneck on slow networks. It is not evidence of provider-data corruption or a DNS outage.
17
18 ## Production change (performed)
19
20 - PR: [#29](https://github.com/davoodmehraban89/VELYQOR/pull/29)
21 - Cloudflare zone: `chartnova.ir`; existing app/root Worker routing preserved
22 - Worker: `velyqor-preview`
23 - **Previous deployed Worker version:** `85177f9d-09c0-4763-b28c-2c6ba5ae5be5` (v26, 100%).
24 - **New deployed Worker version:** `2cbeb4e2-4a3e-414f-b3ad-035e2378650b` (v27, 100%).
25 - **Deployment ID:** `c68b8340-398a-462b-9fe0-c635aba405fe`
26 - Deploy date/time (UTC): `2026-10-15T05:22:32.348955Z`.
27 - This was a *direct Cloudflare version upload/deployment* using exact fetched production code as baseline; the GitHub patcher and tests are the reviewable source of the change.
28
29 The scoped change **only** modifies the HTML page's inline JavaScript. The page now displays the main price-card values as soon as their separate requests finish, shows an explicit partial-load status, does not repeatedly render market grids/technical charts while their tabs are hidden, and prevents overlapping refresh cycles. All original Worker API route logic, KV reads/writes, scheduler, quote units/source/rights handling, P0 trading prohibition, DNS, hosting, and cron behavior are unchanged.
30
31 ## Independent verification
32
33 **Before production release**:
34 - GitHub Actions: 4/4 patcher tests passed.
35 - Actual Chromium mobile browser opened both Worker Version URL and production, verified identical real quote values, all 58 market cards, technical view, zero JS exceptions, zero failed requests.
36 - The controlled *10-second intentionally delayed market-feed* test demonstrated the behavior improvement:
37 - **Old production:** USD and gold had populated, but status stayed `در حال دریافت داده‌های ذخیره‌شده...`.
38 - **New staged version:** USD and gold were populated and status advanced to `قیمت‌های اصلی بررسی شدند · در حال دریافت نمادها...`; it did not build hidden market cards.
39 - Both eventually rendered all 58 cards when the market tab was visited.
40 - Worker v27 binding parity confirmed via Cloudflare API: `MARKET_CACHE` (identical KV namespace), `NAVASAN_API_KEY` and `OANOR_API_KEY` (names/types only; **secret values were not accessed**); `fetch` and `scheduled` handlers preserved.
41
42 **Immediately after production release:** Cloudflare deployment API confirmed v27 at 100%; external GET requests succeeded for `/`, `/api/domestic`, `/api/markets` (58 symbols), `/api/xau` and `/api/widget`. Data quality flags were `ok:true` and non-stale where applicable.
43
44 CI browser revalidation following this documentation update must be checked separately; no user-device check can be inferred from cloud-side tests.
45
46 ## Rollback
47
48 If the public site starts showing missing quotes, syntax errors, or fails to render, revert deployment to **existing v26** (no need to delete/alter KV or DNS):
49
50 `POST /accounts/{account_id}/workers/scripts/velyqor-preview/deployments`
51
52 Body:
53 ```json
54 {"strategy":"percentage","versions":[{"version_id":"85177f9d-09c0-4763-b28c-2c6ba5ae5be5","percentage":100}],"annotations":{"workers/message":"Rollback ChartNova progressive loading hotfix"}}
55 ```
56
57 Only the Worker deployment percentage should change; KV, secrets and DNS remain untouched. Verify `GET /deployments` and real HTTP/browser tests afterward.
58
59 ## Limits / following improvements
60
61 - This fix improves *perceived* load and avoids unnecessary rendering. It does **not** make ISP/VPN/Cloudflare network transport uniformly faster or shrink the existing 85KB all-symbol history payload.
62 - Next optimization should introduce a small, licensed and unit-consistent summary endpoint with on-demand historic series for the selected chart, but must be staged and tested without confusing reference points with executable OHLC or weakening price integrity checks.
63 - The Windows Desktop Commander still requires reconnection for local validation; do not reset dirty worktrees.
64 - ChartNova live site runs an earlier preview UI; Paper Trading PR #27 remains separate and **is not deployed**.