File size: 37,949 Bytes
d705bb5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 | # World Monitor β Feature & Improvement Roadmap
Items are prefixed with `TODO-` and a three-digit number.
Priority: π΄ High Β· π‘ Medium Β· π’ Low.
Dependencies reference `BUG-` or other `TODO-` codes.
---
## π΄ High Priority
### TODO-001 β Decompose `App.ts` into a Controller Architecture
| Field | Value |
|---|---|
| **Priority** | π΄ High |
| **Effort** | ~2 days |
| **Depends on** | BUG-001 |
**Description**
Break the 4 357-line God-class into focused controllers:
- `DataLoader` β orchestrates all `fetch*` calls and refresh timers
- `PanelManager` β creates, orders, drags, and persists panel layout
- `MapController` β wraps `MapContainer`, handles layer toggles and country clicks
- `DeepLinkRouter` β handles URL state, story links, country brief links
- `RefreshScheduler` β manages `setInterval`/`setTimeout` lifecycle
Keep `App` as a thin composition root.
**AI instructions**
1. Create `src/controllers/` directory.
2. Move the corresponding `App` methods into each controller class.
3. Update `App` constructor and `init()` to instantiate and wire controllers.
4. Ensure `App.destroy()` delegates to each controller's `destroy()`.
---
### TODO-002 β Add Server-Side RSS Aggregation and Caching
| Field | Value |
|---|---|
| **Priority** | π΄ High |
| **Effort** | ~3 days |
| **Depends on** | β |
**Description**
Currently 70+ RSS feeds are fetched client-side through individual proxy rules.
This wastes bandwidth (every user fetches the same feeds) and multiplies rate-limit exposure.
Move RSS fetching to a server-side edge function (or Vercel cron) that:
1. Fetches all feeds on a 3-minute cron.
2. Stores merged results in Redis (Upstash already in `package.json`).
3. Exposes a single `/api/news` endpoint returning the cached aggregate.
**AI instructions**
Create `api/news.js` edge function. Use `@upstash/redis`. Implement feed XML parsing identical to `src/services/rss.ts`. Add a `stale-while-revalidate` cache header. On the client side, replace ~40 proxy rules in `vite.config.ts` with a single fetch to `/api/news`.
---
### TODO-003 β Real-Time Alert Webhooks (Slack / Discord / Email)
| Field | Value |
|---|---|
| **Priority** | π΄ High |
| **Effort** | ~2 days |
| **Depends on** | β |
**Description**
The dashboard generates high-value signals (military surge, CII spikes, geographic convergence) but they are only visible when the Dashboard tab is active.
Users should be able to receive critical alerts via external channels.
**AI instructions**
1. Add a Settings UI for webhook configuration (URL + secret + filter by priority).
2. Store webhook config in localStorage (web) or OS keyring (desktop).
3. When `signalAggregator` emits a signal at or above the user's threshold, POST the signal payload to the configured webhook URL.
4. Support Slack incoming webhook format and Discord webhook format out of the box.
---
### TODO-004 β Comprehensive API Handler Test Suite
| Field | Value |
|---|---|
| **Priority** | π΄ High |
| **Effort** | ~2 days |
| **Depends on** | BUG-014 |
**Description**
52 of 55 API handlers have zero test coverage.
Add unit tests using Node built-in test runner (`node --test`) for all handlers.
**AI instructions**
For each handler in `api/`:
1. Import the handler and mock the external API call.
2. Test valid input β correct response.
3. Test malformed input β 400 error.
4. Test upstream failure β graceful error response.
Prioritize handlers that accept user-controlled query params.
---
### TODO-005 β Cross-Platform npm Script Compatibility
| Field | Value |
|---|---|
| **Priority** | π΄ High |
| **Effort** | ~1 hour |
| **Depends on** | BUG-013, BUG-019 |
**Description**
All `VITE_VARIANT=β¦` and `VITE_E2E=β¦` scripts break on Windows.
**AI instructions**
Install `cross-env` as a devDependency.
Prefix every inline env-var assignment with `cross-env`, e.g.:
`"build:tech": "cross-env VITE_VARIANT=tech tsc && cross-env VITE_VARIANT=tech vite build"`.
---
## π‘ Medium Priority
### TODO-006 β Temporal Anomaly Detection ("Unusual for This Time")
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~3 days |
| **Depends on** | β |
**Description**
Flag when activity deviates from time-of-day/week norms.
Example: "Military flights 3Γ normal for a Tuesday" or "News velocity spike at 3 AM UTC".
**AI instructions**
1. Extend `src/services/temporal-baseline.ts` to store per-hour-of-week baselines in IndexedDB.
2. Compare each refresh cycle's values against the time-matched baseline.
3. Generate `temporal_anomaly` signals when z-score > 2.0.
4. Display in the Signal Aggregator and Intelligence Findings badge.
---
### TODO-007 β Trade Route Risk Scoring
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~4 days |
| **Depends on** | β |
**Description**
Score major shipping routes based on chokepoint risk, AIS disruptions, and military posture along the route.
**AI instructions**
1. Define major trade routes in `src/config/trade-routes.ts`.
2. For each route, aggregate: chokepoint congestion, AIS gap count, military vessel density, recent news velocity for route countries.
3. Compute a composite risk score.
4. Display as a new panel and optionally overlay route lines on the map.
---
### TODO-008 β Choropleth CII Map Layer
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~2 days |
| **Depends on** | β |
**Description**
Overlay the map with country-colored fills based on CII score.
**AI instructions**
1. Use deck.gl's `GeoJsonLayer` with the existing country geometry from `src/services/country-geometry.ts`.
2. Map CII scores to a red-yellow-green color scale.
3. Add as a toggleable layer in the layer controls.
4. Update the legend to show the CII color scale.
---
### TODO-009 β Custom Country Watchlists (Tier 2 Monitoring)
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~2 days |
| **Depends on** | β |
**Description**
CII currently publishes server-authoritative v8 scores for 31 Tier-1 countries
from `shared/cii-weights.ts`, then the browser ingests the cached risk-score
feed with a local `country-instability.ts` fallback. This TODO is only current
if reframed as user-defined Tier 2 monitoring layered on top of that contract.
**AI instructions**
1. Add a "+" button in the CII panel to search and add countries by name.
2. Store Tier 2 list in localStorage.
3. Define whether Tier 2 scores are server/API-backed or explicitly local-only fallback scores.
4. Display Tier 2 countries in a collapsible sub-section of the CII panel.
---
### TODO-010 β Historical Playback with Timeline Scrubbing
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~3 days |
| **Depends on** | β |
**Description**
The snapshot system captures periodic state but playback is rudimentary.
Add a visual timeline scrubber to replay dashboard state over time.
**AI instructions**
1. Build a timeline UI component (`src/components/Timeline.ts`) showing dots for each stored snapshot (up to 7 days).
2. Clicking a dot restores that snapshot via `App.restoreSnapshot()`.
3. Dragging the scrubber auto-plays through snapshots.
4. Add a "Live" button to exit playback and resume real-time data.
---
### TODO-011 β Election Calendar Integration (Auto-Boost Sensitivity)
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
Automatically boost CII sensitivity 30 days before major elections.
**AI instructions**
1. Create `src/config/elections.ts` with a calendar of upcoming elections (date, country code, type).
2. In `calculateCII()`, check if any monitored country has an election within 30 days.
3. If yes, apply a multiplier to the Information component (e.g., 1.3Γ).
4. Show an "π³ Election Watch" badge on the CII panel for those countries.
---
### TODO-012 β News Translation Support (Localized Feeds)
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~3 days |
| **Depends on** | β |
**Description**
`docs/NEWS_TRANSLATION_ANALYSIS.md` already proposes a hybrid approach: localized feeds + on-demand LLM translation.
**AI instructions**
1. Restructure `src/config/feeds.ts` to support per-language URLs.
2. In `src/services/rss.ts`, select the URL matching `i18n.language`.
3. For feeds without a localized URL, add a "Translate" button per news card that calls `summarization.ts`.
4. Cache translations in a Map to avoid re-translation.
---
### TODO-013 β Map Popup Modularization
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~2 days |
| **Depends on** | BUG-016, BUG-020 |
**Description**
`MapPopup.ts` (113 KB) and `DeckGLMap.ts` (156 KB) are the two largest component files.
Split each into per-layer modules.
**AI instructions**
1. Create `src/components/popups/` directory.
2. Extract one file per popup type: `ConflictPopup.ts`, `MilitaryBasePopup.ts`, `VesselPopup.ts`, `AircraftPopup.ts`, etc.
3. Create a `PopupFactory.ts` dispatcher that selects the correct renderer by layer type.
4. Update `MapPopup.ts` to delegate to the factory.
---
### TODO-014 β ESLint + Prettier Setup
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
The project has no linter or formatter configured.
**AI instructions**
1. Install ESLint with `@typescript-eslint` and a Prettier plugin.
2. Configure rules to match the project's style.
3. Add `lint` and `format` npm scripts.
4. Add a `lint-staged` + `husky` pre-commit hook.
---
### TODO-015 β Desktop Notification Support for Critical Signals
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
Use the Web Notifications API (and Tauri's native notifications for desktop) to push critical signals when the tab is in the background.
**AI instructions**
1. Request notification permission on first critical signal.
2. When a signal with priority β₯ High is generated and the tab is hidden, show a native notification.
3. Clicking the notification focuses the tab and opens the Signal Modal.
---
### TODO-016 β Stablecoin De-peg Monitoring Enhancements
| Field | Value |
|---|---|
| **Priority** | π‘ Medium |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
The `StablecoinPanel` exists but lacks correlation with geopolitical events.
**AI instructions**
1. When a stablecoin deviates > 0.5% from peg, check if any CII country has a score > 70.
2. If correlated, generate a `stablecoin_depeg` signal.
3. Display in the Intelligence Findings badge.
---
## π’ Low Priority / Enhancements
### TODO-017 β Dark/Light Theme Toggle Improvements
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
Audit all CSS custom properties for light-theme counterparts. Ensure light mode is visually polished.
---
### TODO-018 β PWA Offline Dashboard State
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~2 days |
| **Depends on** | β |
**Description**
Display the last snapshot data when offline with an "Offline β showing cached data" banner.
---
### TODO-019 β Accessibility (a11y) Audit
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~3 days |
| **Depends on** | β |
**Description**
Add ARIA roles, labels, and keyboard navigation for panels, modals, and map controls.
---
### TODO-020 β UNHCR / World Bank / IMF Data Integration
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~2 days per source |
| **Depends on** | β |
**Description**
Additional humanitarian and economic data sources to strengthen CII scoring.
---
### TODO-021 β Automated Visual Regression Testing CI
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
Add GitHub Actions workflow running visual snapshot tests on every PR.
---
### TODO-022 β Sentry Error Tracking Configuration
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~2 hours |
| **Depends on** | β |
**Description**
Initialize Sentry in `src/main.ts` with DSN from environment variable.
---
### TODO-023 β Satellite Fire Detection Panel Enhancements
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~1 day |
| **Depends on** | β |
**Description**
Correlate fires near military installations or critical infrastructure β generate `fire_near_infrastructure` signals.
---
### TODO-024 β Keyboard-Navigable Map with Focus Management
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~2 days |
| **Depends on** | TODO-019 |
**Description**
Arrow keys for pan, `+`/`-` for zoom, `Tab` to cycle markers, `Enter` to open popup, `Escape` to close.
---
### TODO-025 β Data Export Improvements (Scheduled + API)
| Field | Value |
|---|---|
| **Priority** | π’ Low |
| **Effort** | ~2 days |
| **Depends on** | β |
**Description**
Add scheduled export and a public API endpoint for integration with external tools.
---
---
## UI / UX Improvements
> Items below are focused exclusively on visual design, interaction quality, layout, and user experience.
---
### TODO-026 β Panel Drag-and-Drop Reordering
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Users should be able to drag panels to reorder them. Persist order in localStorage. Show a subtle grab handle on hover.
### TODO-027 β Panel Resize Handles
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add vertical resize handles to panels so users can allocate more height to the panels they care about. Store sizes in localStorage.
### TODO-028 β Collapsible Panel Groups
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Group related panels (e.g., "Security", "Markets", "Intel") into collapsible accordion sections in the sidebar.
### TODO-029 β Panel Search / Quick Filter
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a search input at the top of the panel list to filter panels by name. Useful when 30+ panels are enabled.
### TODO-030 β Multi-Column Panel Layout
- **Priority:** π‘ Medium | **Effort:** ~1 day
- On ultra-wide monitors (>2560px), allow a 2- or 3-column panel layout instead of forcing a single column sidebar.
### TODO-031 β Panel Pinning ("Always on Top")
- **Priority:** π’ Low | **Effort:** ~4 hours
- Let users pin a panel so it stays visible at the top regardless of scroll position.
### TODO-032 β Panel Maximize / Full-Width View
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Double-click a panel header to expand it to full-screen overlay. Press Escape to return to normal.
### TODO-033 β Animated Panel Transitions
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add smooth CSS transitions (slide in, fade in) when panels are expanded/collapsed or reordered.
### TODO-034 β Panel Badge Animations
- **Priority:** π’ Low | **Effort:** ~2 hours
- When a panel receives new data, show a brief pulse animation on its badge count to draw attention.
### TODO-035 β Panel Data Age Indicator
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Show a colored dot on each panel header: green = <1 min stale, yellow = 1β5 min, red = >5 min. Help users know which data is fresh.
### TODO-036 β Contextual Right-Click Menu on Panels
- **Priority:** π’ Low | **Effort:** ~4 hours
- Right-click a panel header to access: Pin, Maximize, Export Data, Refresh, Hide.
### TODO-037 β Floating Action Button (FAB) for Quick Actions
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add a FAB in the bottom-right with quick actions: scroll to top, refresh all, toggle dark mode, open search.
### TODO-038 β Breadcrumb Navigation for Country Drill-Down
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- When in a Country Brief / Country Intel Modal, show breadcrumbs: `Dashboard > Middle East > Syria`. Clicking a breadcrumb navigates back.
### TODO-039 β Command Palette (Ctrl+K / βK)
- **Priority:** π΄ High | **Effort:** ~1 day
- Implement a Discord/VSCode-style command palette. Commands: "Go to country", "Toggle layer", "Open panel", "Export data", "Change language".
### TODO-040 β Global Keyboard Shortcuts Reference Sheet
- **Priority:** π’ Low | **Effort:** ~2 hours
- Press `?` to show a modal listing all available keyboard shortcuts. Include map controls, panel navigation, and search.
### TODO-041 β Toast Notification System
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Replace inline status messages with a stacking toast system (bottom-right). Toast types: success (green), warning (amber), error (red), info (blue). Auto-dismiss after 5s.
### TODO-042 β Skeleton Loading Placeholders
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Replace "Loadingβ¦" text with animated skeleton placeholders (shimmer effect) in all panels. Matches modern dashboard UX standards.
### TODO-043 β Empty State Illustrations
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add illustrated empty states to panels instead of plain "No data available" text. E.g., a calm globe for "No active sirens", a radar icon for "Scanningβ¦".
### TODO-044 β News Card Redesign with Image Thumbnails
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Fetch og:image from news links and display as small thumbnails in the NewsPanel cards. Fallback to a gradient placeholder with the source favicon.
### TODO-045 β News Article Preview Modal
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Click a news item to see a summarized preview in a modal (using the existing summarization service) instead of opening the external link immediately.
### TODO-046 β News Sentiment Badge per Article
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Show a tiny sentiment badge (π΄ negative, π‘ neutral, π’ positive) on each news card derived from the entity-extraction service.
### TODO-047 β News Source Credibility Indicator
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add a tiny icon on each news card indicating source reliability tier (Tier 1 / Tier 2 / Unknown). Based on a static config of known outlets.
### TODO-048 β News Read/Unread State
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Track which news items the user has clicked/read. Display unread items with a bold title, read items with a muted style. Store in localStorage.
### TODO-049 β News Bookmark / Save for Later
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add a bookmark icon on each news card. Bookmarked articles appear in a "Saved" tab within the NewsPanel.
### TODO-050 β Map Style Selector (Satellite / Dark / Light / Terrain)
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a map style picker (bottom-left corner) with preview thumbnails for each style. Already have multiple map styles defined but no UI to switch.
### TODO-051 β Map Mini-Compass Widget
- **Priority:** π’ Low | **Effort:** ~2 hours
- Add a small compass rose to the map corner showing north orientation. Clicking resets rotation to north-up.
### TODO-052 β Map Ruler / Measurement Tool
- **Priority:** π’ Low | **Effort:** ~1 day
- Click two points on the map to measure distance (km/mi). Useful for assessing military range or event proximity.
### TODO-053 β Map Cluster Expansion Animation
- **Priority:** π’ Low | **Effort:** ~4 hours
- When clicking a cluster marker, animate the cluster expanding into individual markers with a spring/burst effect.
### TODO-054 β Map Heatmap Toggle for Event Density
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add a heatmap view toggle that overlays event density (conflicts, protests, military activity) as a continuous gradient.
### TODO-055 β Map Layer Legend Panel
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Show a collapsible legend in the bottom-left explaining all active layer symbols (conflict red dot, military blue triangle, etc.).
### TODO-056 β Map Geofence Alert Zones
- **Priority:** π‘ Medium | **Effort:** ~2 days
- Let users draw a polygon on the map and get notified when any event (conflict, military, fire) occurs within that zone.
### TODO-057 β Map Screenshot / Export as Image
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add a "Capture Map" button that exports the current map view + active layers as a high-resolution PNG.
### TODO-058 β Country Flag Icons in Panel Lists
- **Priority:** π’ Low | **Effort:** ~4 hours
- Show small country flag emojis/icons next to country names in CII, Displacement, UCDP, and other panels.
### TODO-059 β Country Quick Info Tooltip on Map Hover
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Hovering over a country on the map shows a lightweight tooltip with: country name, CII score, active conflicts count, population.
### TODO-060 β Animated Number Counters on Panel Metrics
- **Priority:** π’ Low | **Effort:** ~2 hours
- When panel counts update (e.g., CII score changes from 65β72), animate the number transition with a counting-up effect.
### TODO-061 β Color-Coded Severity Levels Across All Panels
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Standardize severity color coding across all panels: critical=red, high=orange, medium=yellow, low=blue, info=gray. Currently inconsistent.
### TODO-062 β Sparkline Mini-Charts in Panel Headers
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add tiny inline sparkline charts next to panel count badges showing the metric's trend over the last 24 hours.
### TODO-063 β Panel Data Trend Arrows
- **Priority:** π‘ Medium | **Effort:** ~2 hours
- Show β or β arrows next to panel counts indicating if the value has increased or decreased since last refresh.
### TODO-064 β Responsive Mobile Layout (Below 768px)
- **Priority:** π΄ High | **Effort:** ~3 days
- Currently shows a MobileWarningModal. Instead, implement a responsive bottom-sheet layout with swipeable panels and a condensed header.
### TODO-065 β Tablet Layout (768pxβ1024px)
- **Priority:** π‘ Medium | **Effort:** ~2 days
- Implement a split-view layout for tablets: panels on the left third, map on the right two-thirds. Touch-optimized controls.
### TODO-066 β Map Controls Touch Optimization
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Increase hit areas for layer toggles and zoom buttons on touch devices. Add pinch-to-zoom and drag-to-pan gesture hints.
### TODO-067 β Swipe Gesture Navigation Between Panels (Mobile)
- **Priority:** π‘ Medium | **Effort:** ~1 day
- On mobile, allow swiping left/right to navigate between panels instead of scrolling a long list.
### TODO-068 β Full-Screen Immersive Map Mode
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a "Focus Mode" button that hides the header and sidebar, showing only the map with a floating minimal toolbar.
### TODO-069 β Map Auto-Focus on Critical Events
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- When a critical signal is detected (e.g., new military surge), optionally auto-pan the map to the event location with a brief highlighting animation.
### TODO-070 β Notification Center / Activity Feed
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add a bell icon in the header that shows a chronological feed of all signals, alerts, and data updates with timestamps. Mark as read/unread.
### TODO-071 β User Onboarding Tour
- **Priority:** π‘ Medium | **Effort:** ~1 day
- First-time users see a guided tour (tooltip sequence) explaining: map layers, panels, search, CII, signals, and keyboard shortcuts.
### TODO-072 β Settings Panel UI Redesign
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Group all configuration options into a clean modal with tabs: General, Appearance, Notifications, Data Sources, Map, Advanced.
### TODO-073 β Rich Tooltip System (Tippy.js-style)
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Replace browser-native `title` attributes with styled tooltips that support HTML content, positioning, and animation.
### TODO-074 β Loading Progress Bar (Global)
- **Priority:** π‘ Medium | **Effort:** ~2 hours
- Show a thin progress bar at the top of the viewport (YouTube-style) during initial data loading sequence.
### TODO-075 β Custom Accent Color Picker
- **Priority:** π’ Low | **Effort:** ~4 hours
- Let users pick a custom accent color (default: blue) that applies to buttons, links, active indicators, and chart highlights.
### TODO-076 β Font Size / Density Toggle
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a "Compact / Default / Comfortable" density toggle affecting panel padding, font sizes, and row heights. Analysts on large monitors want compact; casual users want comfortable.
### TODO-077 β High-Contrast Mode
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add an accessibility option for high-contrast mode with increased border weight, higher color contrast ratios, and no transparency.
### TODO-078 β Map Event Popup Redesign
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Redesign the map popup cards with a card-style layout: image/icon header, structured data rows, action buttons (zoom in, view country profile, share).
### TODO-079 β Sticky Panel Header on Scroll
- **Priority:** π’ Low | **Effort:** ~2 hours
- When scrolling within a long panel content area, keep the panel header sticky at the top so the title and controls remain visible.
### TODO-080 β CII Score Donut Chart Visualization
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Render CII scores as animated donut/ring charts instead of plain numbers. Segments colored by component (conflict, economy, social, info).
### TODO-081 β Signal Timeline Visualization
- **Priority:** π‘ Medium | **Effort:** ~1 day
- In the Signal Modal, add a horizontal timeline bar showing when each signal was generated over the last 24 hours. Cluster by type.
### TODO-082 β Country Intelligence Profile Page
- **Priority:** π‘ Medium | **Effort:** ~2 days
- Expand CountryBriefPage with tabbed sections: Overview, CII Breakdown, News Feed, Military Activity, Economic Data, Climate Data.
### TODO-083 β Dark Map Popup Styling
- **Priority:** π’ Low | **Effort:** ~2 hours
- Ensure all map popups use the dark theme consistently β currently some popups have white backgrounds.
### TODO-084 β Animated Globe Spinner for Initial Load
- **Priority:** π’ Low | **Effort:** ~4 hours
- Replace the plain loading spinner with a slowly rotating wireframe globe animation during initial app bootstrap.
### TODO-085 β Panel Export as Image (PNG/SVG)
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add an "Export as Image" button for each panel that renders the panel's current content as a downloadable PNG/SVG.
### TODO-086 β Strategic Posture Visual Indicators on Map
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Show colored region overlays or border highlights on the map for countries in the Strategic Posture analysis, colored by posture level.
### TODO-087 β News Panel Infinite Scroll
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Replace the current page-based news list with infinite scroll. Load more items as the user scrolls down.
### TODO-088 β Economic Panel Mini-Chart Inline Rendering
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Render small inline area charts for economic indicators (GDP growth, inflation, unemployment) within the EconomicPanel rows.
### TODO-089 β Prediction Market Price Sparklines
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add tiny sparklines next to each prediction market entry in the PredictionPanel showing price movement over the last 7 days.
### TODO-090 β Stablecoin Panel Historical Chart
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a small line chart at the bottom of the StablecoinPanel showing peg deviation over the last 30 days.
### TODO-091 β Panel Tab Navigation (Internal Sub-views)
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- For complex panels (Market, Economic, CII), add sub-tabs within the panel to organize content without needing to scroll.
### TODO-092 β Glassmorphism Panel Headers
- **Priority:** π’ Low | **Effort:** ~2 hours
- Apply a subtle frosted-glass/blur effect to panel headers (backdrop-filter: blur) for a modern look.
### TODO-093 β Map Layer Opacity Sliders
- **Priority:** π’ Low | **Effort:** ~4 hours
- In the layer control, add an opacity slider (0β100%) for each layer so users can see overlapping data more clearly.
### TODO-094 β Typewriter Effect for AI Insight Text
- **Priority:** π’ Low | **Effort:** ~2 hours
- When the InsightsPanel displays new AI-generated analysis, render it with a typewriter animation to feel more "live".
### TODO-095 β Interactive Tutorial for Map Layers
- **Priority:** π’ Low | **Effort:** ~1 day
- Click "?" next to each map layer toggle to show a brief explanation + sample screenshot of what that layer looks like.
### TODO-096 β Compact Header Mode for More Map Space
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a toggle to collapse the header into a minimal single-line bar (logo + essential icons only). Gives ~40px more vertical map space.
### TODO-097 β Live News Panel Video Thumbnail Previews
- **Priority:** π’ Low | **Effort:** ~4 hours
- In the LiveNewsPanel, show a small preview thumbnail of the YouTube stream. Indicate "LIVE" with a pulsing red dot.
### TODO-098 β RTL Layout Full Audit
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Audit and fix all RTL layout issues for Arabic. Cover sidebar direction, panel alignment, table column order, and map control placement.
### TODO-099 β Customizable Dashboard Presets
- **Priority:** π’ Low | **Effort:** ~1 day
- Let users save and load named panel configurations: "DefCon View" (military + CII only), "Market Watch" (financial panels only), "Full Intel".
### TODO-100 β Story Share Card Redesign
- **Priority:** π’ Low | **Effort:** ~4 hours
- Redesign the `story-share.ts` OG card template with richer previews: map snapshot, event title, CII score, and World Monitor branding.
### TODO-101 β Multi-Event Comparison View
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Let users select 2β3 events and view them side-by-side in a split comparison modal with timestamps, locations, and severity.
### TODO-102 β Map Bookmark / Saved Views
- **Priority:** π’ Low | **Effort:** ~4 hours
- Save named map positions (lat/lon/zoom) for quick return: "Middle East Overview", "South China Sea", "Ukraine Front".
### TODO-103 β Country Flag Overlay on Map
- **Priority:** π’ Low | **Effort:** ~4 hours
- When zoomed to a specific country, show a faint country flag watermark behind the map data for quick identification.
### TODO-104 β Panel Content Text Selection + Copy
- **Priority:** π’ Low | **Effort:** ~2 hours
- Ensure all panel text content is selectable and copyable. Currently some panels prevent text selection via CSS.
### TODO-105 β CII Alert Sound Toggle
- **Priority:** π’ Low | **Effort:** ~2 hours
- Add an option (off by default) to play a subtle alert tone when a CII score crosses a critical threshold (e.g., >80).
### TODO-106 β Map Night/Day Terminator Line
- **Priority:** π’ Low | **Effort:** ~4 hours
- Overlay the day/night terminator line on the map, updating in real-time. Useful for military analysts assessing time-of-day context.
### TODO-107 β Map Clock Widget (Multi-Timezone)
- **Priority:** π’ Low | **Effort:** ~4 hours
- Show a small clock widget on the map displaying UTC + 2 user-selected timezones (e.g., Jerusalem, Washington DC).
### TODO-108 β Gradient Heat Indicator for CII Panel Rows
- **Priority:** π’ Low | **Effort:** ~2 hours
- Add a subtle gradient background to CII country rows coloring from green to red based on score. Makes it scannable at a glance.
### TODO-109 β Map Event Timeline Slider
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add a time slider below the map to filter events by time range (last 1h, 6h, 24h, 7d). Slider updates all map layers.
### TODO-110 β Micro-Interaction: Panel Expand Ripple Effect
- **Priority:** π’ Low | **Effort:** ~1 hour
- Add a Material Design-style ripple effect when clicking panel headers to expand/collapse them.
### TODO-111 β Context Menu on Map Markers
- **Priority:** π’ Low | **Effort:** ~4 hours
- Right-click a map marker to access: "View details", "Show nearby events", "Center map here", "Add to watchlist".
### TODO-112 β Intelligence Briefing Auto-Summary
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Add a "Daily Briefing" button that auto-generates a 1-page markdown summary of the top signals, CII changes, and notable events from the last 24 hours.
### TODO-113 β Popover Quick Stats on Header Metrics
- **Priority:** π’ Low | **Effort:** ~4 hours
- Hovering over header metric counters (conflicts, flights, vessels) shows a popover with breakdown by region and trend.
### TODO-114 β Sidebar Width Adjustment
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a draggable border between the sidebar and map that lets users adjust the sidebar width. Persist in localStorage.
### TODO-115 β Animated Data Flow Visualization on Map
- **Priority:** π’ Low | **Effort:** ~2 days
- Show animated dots flowing along trade routes, pipelines, and submarine cables on the map representing live data flow.
### TODO-116 β Regional Zoom Presets
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add quick-zoom buttons for major regions: "Middle East", "Europe", "East Asia", "Global View". Each sets a predefined viewport.
### TODO-117 β Panel Grouping by Data Freshness
- **Priority:** π’ Low | **Effort:** ~4 hours
- Sort/group panels by which have the freshest data, showing the most recently updated panels at the top.
### TODO-118 β Inline Panel Help Text
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add a collapsible "How to interpret" section inside each panel for first-time users explaining what the data means and why it matters.
### TODO-119 β Signal Priority Filter in Header
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Add a dropdown filter next to the Intelligence Findings badge to filter signals by priority: Critical, High, Medium, Low, All.
### TODO-120 β Animated Map Marker Icons by Event Type
- **Priority:** π’ Low | **Effort:** ~4 hours
- Use animated SVG markers on the map: pulsing red for active conflicts, rotating for military flights, wave animation for naval vessels.
### TODO-121 β Country Timeline Panel
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Expand the existing CountryTimeline component into a full panel showing a vertical timeline of all events affecting a selected country.
### TODO-122 β Dashboard Snapshot Sharing via URL
- **Priority:** π‘ Medium | **Effort:** ~1 day
- Generate a shareable URL that encodes the current map view, active layers, open panels, and selected country. Others can open the same view.
### TODO-123 β Accessibility: Color-Blind Safe Palette
- **Priority:** π’ Low | **Effort:** ~4 hours
- Add a color-blind-safe mode that replaces red/green severity indicators with blue/orange + patterns.
### TODO-124 β Panel Content Pagination
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- For panels with 100+ items (news, UCDP events), add proper pagination controls with page numbers instead of endless scrolling.
### TODO-125 β Map Drawing Tools (Annotations)
- **Priority:** π’ Low | **Effort:** ~2 days
- Let analysts draw circles, lines, and polygons on the map as temporary annotations. Options to label and color-code. Not persisted.
### TODO-126 β Quick Currency / Unit Converter Widget
- **Priority:** π’ Low | **Effort:** ~4 hours
- A small floating widget for converting between currencies, distances (km/mi), and populations. Useful when reading international data.
### TODO-127 β Panel Dependency Graph View
- **Priority:** π’ Low | **Effort:** ~1 day
- Add a "System View" that shows a node graph of how data flows between services and panels. Educational / debugging tool.
### TODO-128 β Map 3D Building Extrusion Mode
- **Priority:** π’ Low | **Effort:** ~4 hours
- When zoomed in to city level, toggle 3D building extrusions for spatial context. Already supported by deck.gl.
### TODO-129 β Hover Preview Cards for Map Markers
- **Priority:** π‘ Medium | **Effort:** ~4 hours
- Hovering over a map marker shows a small preview card (type, title, severity). Clicking opens the full popup.
### TODO-130 β Event Sound Effects (Optional)
- **Priority:** π’ Low | **Effort:** ~2 hours
- Optional mode (off by default): play brief sound effects for different event types β siren for Oref, ping for new signal, etc.
### TODO-131 β Self-Hosted Map Tiles via Protomaps + CloudFront
- **Priority:** π΄ High | **Effort:** ~2 days
- Replace CARTO/Stadia third-party basemap tiles with self-hosted Protomaps PMTiles on CloudFront. Eliminates CORS failures, third-party availability issues, and rate limits. CARTO has been intermittently blocking cross-origin requests (no `Access-Control-Allow-Origin` header), causing blank maps until the OpenFreeMap fallback kicks in. Self-hosted tiles = zero external dependency for the base map.
- **Approach:** Download a PMTiles archive (OpenStreetMap-based, ~70GB planet or extract regions), host on S3 + CloudFront CDN, use `pmtiles://` protocol with MapLibre GL JS. Style JSON also self-hosted.
- **References:** protomaps.com, github.com/protomaps/PMTiles
|