feat(market): add Gulf Economies panel with GCC indices, currencies & oil (#667)

* feat(market): add Gulf Economies panel with GCC indices, currencies & oil

Add a new panel tracking 15 Gulf/GCC financial symbols via Yahoo Finance:
- 7 stock indices (TASI, DFMGI, ADX, QSI, Bahrain, Kuwait, MSM)
- 6 currencies (SAR, AED, QAR, KWD, BHD, OMR vs USD)
- 2 oil benchmarks (WTI, Brent)

Server: new ListGulfQuotes RPC with 3-tier caching (in-memory + Redis
via cachedFetchJson + stale fallback). Uses fetchYahooQuotesBatch for
rate-limit-safe sequential fetching.

Frontend: GulfEconomiesPanel with 3 collapsible sections, sparklines,
8s delayed start, 60s polling. Registered in both full and finance
variants.

Inspired by #641 (credit: @aa5064, commit 684a73c).

* refactor: hoist MarketServiceClient to module scope, clarify memCache closure

* fix(market): register list-gulf-quotes in RPC_CACHE_TIER map

Explicitly set 'medium' cache tier for the new Gulf quotes endpoint,
matching other market RPCs instead of relying on the implicit default.

* refactor: extract shared miniSparkline to @/utils/sparkline

Deduplicates the identical function from MarketPanel and GulfEconomiesPanel
into a single shared utility.

* fix(panels): disable gulf-economies by default on full variant

Panel remains always-on for finance variant. Full variant users can
manually enable it via panel settings.
This commit is contained in:
Elie Habib
2026-03-01 18:24:53 +04:00
committed by GitHub
parent 4f3755a30f
commit e45a19937b
13 changed files with 330 additions and 16 deletions

View File

@@ -4860,6 +4860,20 @@ body.playback-mode .status-dot {
color: var(--red);
}
/* Gulf Economies */
.gulf-section { margin-bottom: 8px; }
.gulf-section:last-child { margin-bottom: 0; }
.gulf-section-title {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-dim);
padding: 6px 0 2px;
border-bottom: 1px solid var(--border);
margin-bottom: 2px;
}
/* Commodities */
.commodities-grid {
display: grid;