Skip to content

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

Merged
koala73 merged 5 commits into
mainfrom
feat/gulf-economies-panel
Mar 1, 2026
Merged

feat(market): add Gulf Economies panel with GCC indices, currencies & oil#667
koala73 merged 5 commits into
mainfrom
feat/gulf-economies-panel

Conversation

@koala73

@koala73 koala73 commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a new Gulf Economies panel tracking 15 GCC financial symbols via Yahoo Finance:

  • 7 stock indices: TASI (Saudi), DFMGI (Dubai), ADX (Abu Dhabi), QSI (Qatar), Bahrain All Share, Kuwait Boursa, MSM 30 (Oman)
  • 6 currencies: SAR, AED, QAR, KWD, BHD, OMR vs USD
  • 2 oil benchmarks: WTI Crude, Brent Crude

Architecture

  • 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 sections (Indices / Currencies / Oil), sparklines, 8s delayed start to avoid Yahoo 429, 60s polling interval.
  • Registered in both full (geopolitical) and finance variants.
  • Reuses existing .market-item CSS classes — only adds .gulf-section-title for section headers.

Attribution

Inspired by #641 by @aa5064 (commit 684a73c). The original PR proposed a Gulf Economies tracker but was too diverged to merge (100+ commits from fork history). This reimplements the concept using existing codebase patterns.

Files Changed (10)

File Change
server/.../list-gulf-quotes.ts NEW — Server RPC handler
server/.../handler.ts Register new RPC
src/generated/.../service_server.ts Add types + route
src/generated/.../service_client.ts Add types + client method
src/components/GulfEconomiesPanel.ts NEW — Panel component
src/components/index.ts Export barrel
src/app/panel-layout.ts Instantiate panel
src/config/panels.ts Register in variants + categories
src/locales/en.json i18n keys
src/styles/main.css Section title styles

Test plan

  • npx tsc --noEmit passes (verified)
  • npx tsc --noEmit -p tsconfig.api.json passes (verified)
  • Panel appears in finance variant under Gulf & MENA category
  • Panel appears in full variant under Markets & Finance category
  • 15 symbols load with sparklines, prices, and change %
  • Rate limiting handled gracefully (stale data served)

… 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).
@vercel

vercel Bot commented Mar 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview, Comment Mar 1, 2026 2:25pm
worldmonitor-finance Ready Ready Preview, Comment Mar 1, 2026 2:25pm
worldmonitor-happy Ready Ready Preview, Comment Mar 1, 2026 2:25pm
worldmonitor-startup Ready Ready Preview, Comment Mar 1, 2026 2:25pm

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Explicitly set 'medium' cache tier for the new Gulf quotes endpoint,
matching other market RPCs instead of relying on the implicit default.
Deduplicates the identical function from MarketPanel and GulfEconomiesPanel
into a single shared utility.
Panel remains always-on for finance variant. Full variant users can
manually enable it via panel settings.
@koala73
koala73 merged commit 15c3b76 into main Mar 1, 2026
2 of 6 checks passed
koala73 added a commit that referenced this pull request Mar 1, 2026
… 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.
koala73 added a commit to fuleinist/worldmonitor that referenced this pull request Mar 1, 2026
The Gulf Economies panel (PR koala73#667) added this RPC after the feature
branch was forked. Bring handler and registration from main.
matthewvecchione1-ops pushed a commit to matthewvecchione1-ops/worldmonitor that referenced this pull request Mar 4, 2026
… oil (koala73#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 koala73#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant