docs/Docs_To_Review/todo.md
Items are prefixed with TODO- and a three-digit number.
Priority: π΄ High Β· π‘ Medium Β· π’ Low.
Dependencies reference BUG- or other TODO- codes.
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 timersPanelManager β creates, orders, drags, and persists panel layoutMapController β wraps MapContainer, handles layer toggles and country clicksDeepLinkRouter β handles URL state, story links, country brief linksRefreshScheduler β manages setInterval/setTimeout lifecycleKeep App as a thin composition root.
AI instructions
src/controllers/ directory.App methods into each controller class.App constructor and init() to instantiate and wire controllers.App.destroy() delegates to each controller's destroy().| 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:
package.json)./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.
| 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
signalAggregator emits a signal at or above the user's threshold, POST the signal payload to the configured webhook URL.| 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/:
| 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".
| 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
src/services/temporal-baseline.ts to store per-hour-of-week baselines in IndexedDB.temporal_anomaly signals when z-score > 2.0.| 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
src/config/trade-routes.ts.| Field | Value |
|---|---|
| Priority | π‘ Medium |
| Effort | ~2 days |
| Depends on | β |
Description Overlay the map with country-colored fills based on CII score.
AI instructions
GeoJsonLayer with the existing country geometry from src/services/country-geometry.ts.| Field | Value |
|---|---|
| Priority | π‘ Medium |
| Effort | ~2 days |
| Depends on | β |
Description CII currently monitors 20 hardcoded Tier 1 countries. Allow users to add custom countries to a Tier 2 watchlist with the same scoring pipeline.
AI instructions
calculateCII() pipeline for Tier 2 countries (without conflict-zone floor scores).| 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
src/components/Timeline.ts) showing dots for each stored snapshot (up to 7 days).App.restoreSnapshot().| Field | Value |
|---|---|
| Priority | π‘ Medium |
| Effort | ~1 day |
| Depends on | β |
Description Automatically boost CII sensitivity 30 days before major elections.
AI instructions
src/config/elections.ts with a calendar of upcoming elections (date, country code, type).calculateCII(), check if any monitored country has an election within 30 days.| 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
src/config/feeds.ts to support per-language URLs.src/services/rss.ts, select the URL matching i18n.language.summarization.ts.| 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
src/components/popups/ directory.ConflictPopup.ts, MilitaryBasePopup.ts, VesselPopup.ts, AircraftPopup.ts, etc.PopupFactory.ts dispatcher that selects the correct renderer by layer type.MapPopup.ts to delegate to the factory.| Field | Value |
|---|---|
| Priority | π‘ Medium |
| Effort | ~1 day |
| Depends on | β |
Description The project has no linter or formatter configured.
AI instructions
@typescript-eslint and a Prettier plugin.lint and format npm scripts.lint-staged + husky pre-commit hook.| 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
| Field | Value |
|---|---|
| Priority | π‘ Medium |
| Effort | ~1 day |
| Depends on | β |
Description
The StablecoinPanel exists but lacks correlation with geopolitical events.
AI instructions
stablecoin_depeg signal.| 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.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~2 days |
| Depends on | β |
Description Display the last snapshot data when offline with an "Offline β showing cached data" banner.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~3 days |
| Depends on | β |
Description Add ARIA roles, labels, and keyboard navigation for panels, modals, and map controls.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~2 days per source |
| Depends on | β |
Description Additional humanitarian and economic data sources to strengthen CII scoring.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~1 day |
| Depends on | β |
Description Add GitHub Actions workflow running visual snapshot tests on every PR.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~2 hours |
| Depends on | β |
Description
Initialize Sentry in src/main.ts with DSN from environment variable.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~1 day |
| Depends on | β |
Description
Correlate fires near military installations or critical infrastructure β generate fire_near_infrastructure signals.
| 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.
| Field | Value |
|---|---|
| Priority | π’ Low |
| Effort | ~2 days |
| Depends on | β |
Description Add scheduled export and a public API endpoint for integration with external tools.
Items below are focused exclusively on visual design, interaction quality, layout, and user experience.
Dashboard > Middle East > Syria. Clicking a breadcrumb navigates back.? to show a modal listing all available keyboard shortcuts. Include map controls, panel navigation, and search.title attributes with styled tooltips that support HTML content, positioning, and animation.story-share.ts OG card template with richer previews: map snapshot, event title, CII score, and World Monitor branding.Access-Control-Allow-Origin header), causing blank maps until the OpenFreeMap fallback kicks in. Self-hosted tiles = zero external dependency for the base map.pmtiles:// protocol with MapLibre GL JS. Style JSON also self-hosted.