feat: add day/night solar terminator overlay to map#529
Merged
koala73 merged 13 commits intokoala73:mainfrom Feb 28, 2026
Merged
feat: add day/night solar terminator overlay to map#529koala73 merged 13 commits intokoala73:mainfrom
koala73 merged 13 commits intokoala73:mainfrom
Conversation
|
@devalnor is attempting to deploy a commit to the Elie Team on Vercel. A member of the Team first needs to authorize it. |
- Add 5 Nigeria news sources to Africa section (Premium Times, Vanguard, Channels TV, Daily Trust, ThisDay) - Add 5 Greek feeds with lang: 'el' for locale-aware filtering (Kathimerini, Naftemporiki, in.gr, iefimerida, Proto Thema) - Add source tiers for all new outlets - Allowlist 8 new domains in RSS proxy
…oala73#284) * fix: add request coalescing to Redis cache layer Concurrent cache misses for the same key now share a single upstream fetch instead of each triggering redundant API calls. This eliminates duplicate work within Edge Function invocations under burst traffic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: reduce AIS polling frequency from 10s to 30s Vessel positions do not change meaningfully in 10 seconds at sea. Reduces Railway relay requests by 66% with negligible UX impact. Stale threshold bumped to 45s to match the new interval. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: quantize military flights bbox cache keys to 1-degree grid Precise bounding box coordinates caused near-zero cache hit rate since every map pan/zoom produced a unique key. Snapping to a 1-degree grid lets nearby viewports share cache entries, dramatically reducing redundant OpenSky API calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: parallelize ETF chart fetches instead of sequential await loop The loop awaited each ETF chart fetch individually, blocking on every Yahoo gate delay. Using Promise.allSettled lets all 10 fetches queue concurrently through the Yahoo gate, cutting wall time from ~12s to ~6s. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add Redis pipeline batch GET to reduce round-trips Add getCachedJsonBatch() using the Upstash pipeline API to fetch multiple keys in a single HTTP call. Refactor aircraft details batch handler from 20 sequential GETs to 1 pipelined request. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add structural tests for Redis caching optimizations 18 tests covering: cachedFetchJson request coalescing (in-flight dedup, cache-before-fetch ordering, cleanup), getCachedJsonBatch pipeline API, aircraft batch handler pipeline usage, bbox grid quantization (1-degree step, expanded fetch bbox), and ETF parallel fetch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: enforce military bbox contract and add behavioral cache tests --------- Co-authored-by: Elias El Khoury <efk@anghami.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…tion probes (koala73#296) Sidecar validation probes were missing User-Agent headers, causing Cloudflare-fronted APIs (e.g. Wingbits) to return 403 which was incorrectly treated as an auth rejection. Added CHROME_UA to all 13 probes and isCloudflare403() helper to soft-pass CDN blocks.
…73#308) - Add levels, trends, fallback keys to top-level countryBrief in en/el/th/vi locales (fixes raw key display in intelligence brief and header badge) - Add Export PDF option to country brief dropdown using scoped print dialog - Add exportPdf i18n key to all 17 locale files
Add a real-time day/night overlay layer using deck.gl PolygonLayer that renders the solar terminator (boundary between day and night zones). The overlay uses astronomical formulas (Meeus) to compute the subsolar point and trace the terminator line at 1° resolution. - New toggleable "Day/Night" layer in all 3 variants (full/tech/finance) - Theme-aware styling (lighter fill on light theme, darker on dark) - Auto-refresh every 5 minutes with conditional timer (only runs when layer is enabled, pauses when render is paused) - Cached polygon computation to avoid recomputing on every render - i18n translations for all 17 locales - Updated documentation with new layer entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
09810d0 to
ac3d54a
Compare
- Replace safeTanDecl epsilon clamp with proper equinox handling: when |tanDecl| < 1e-6, draw terminator as vertical great circle through the poles (subsolar meridian ±90°) instead of clamping - Fix JSON indentation in all 17 locale files: dayNight and tradeRoutes keys were left-aligned instead of matching 8-space indentation of surrounding keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In accordance with the contribution guidelines, this PR was made with the help of Claude Code (Opus 4.6) but has been reviewed and validated by me. The well-structured codebase and its documentation made it easy to understand the project and follow each development step alongside Claude. I hope this contribution will be appreciated!
Summary
PolygonLayerthat renders the solar terminator (boundary between day and night zones)Details
dayNight: booleanadded toMapLayersinterface and all variant/panel configsFiles changed
src/components/DeckGLMap.ts— Core implementation (computeNightPolygon, createDayNightLayer, timer management, toggle, help text)src/types/index.ts— MapLayers type extensionsrc/config/panels.ts+src/config/variants/*.ts— Layer defaults for all variantssrc/locales/*.json— i18n for 17 localessrc/e2e/*.ts— Test harness updatesdocs/DOCUMENTATION.md— Layer documentationTest plan
npm run typecheckpasses for all 3 variantsnpm run test:data— 91/91 pass🤖 Generated with Claude Code