Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .claudedocs/sentry-triage/2026-02-19.md

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ src-tauri/sidecar/node/*

# Compiled sebuf gateway bundle (built by scripts/build-sidecar-sebuf.mjs)
api/[[][[].*.js
.claudedocs/
15 changes: 13 additions & 2 deletions src/app/search-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { CIIPanel } from '@/components';
import { SITE_VARIANT, STORAGE_KEYS } from '@/config';
import { LAYER_PRESETS, LAYER_KEY_MAP } from '@/config/commands';
import { calculateCII, TIER1_COUNTRIES } from '@/services/country-instability';
import { CURATED_COUNTRIES } from '@/config/countries';
import { INTEL_HOTSPOTS, CONFLICT_ZONES, MILITARY_BASES, UNDERSEA_CABLES, NUCLEAR_FACILITIES } from '@/config/geo';
import { PIPELINES } from '@/config/pipelines';
import { AI_DATA_CENTERS } from '@/config/ai-datacenters';
Expand Down Expand Up @@ -55,8 +56,8 @@ export class SearchManager implements AppModule {
}
: SITE_VARIANT === 'happy'
? {
placeholder: 'Search good news...',
hint: 'Search positive stories and breakthroughs',
placeholder: 'Search or type a command...',
hint: 'Good News • Countries • Navigation • Settings',
}
: SITE_VARIANT === 'finance'
? {
Expand Down Expand Up @@ -468,6 +469,16 @@ export class SearchManager implements AppModule {
case 'time':
this.ctx.map?.setTimeRange(action as import('@/components').TimeRange);
break;

case 'country': {
const name = TIER1_COUNTRIES[action]
|| CURATED_COUNTRIES[action]?.name
|| new Intl.DisplayNames(['en'], { type: 'region' }).of(action)
|| action;
trackCountrySelected(action, name, 'command');
this.callbacks.openCountryBriefByCode(action, name);
break;
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/components/SearchModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,12 @@ export class SearchModal {

this.resultsList.innerHTML = `
<div class="search-empty">
<div class="search-empty-icon">🔍</div>
<div class="search-empty-icon">\u2318</div>
<div>${t('modals.search.empty')}</div>
<div class="search-empty-hint">${this.hint}</div>
<div class="search-empty-examples">
<span>Try: <kbd>dark mode</kbd> <kbd>iran</kbd> <kbd>military layers</kbd> <kbd>crypto</kbd></span>
</div>
</div>
`;
}
Expand Down
43 changes: 42 additions & 1 deletion src/config/commands.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { MapLayers } from '@/types';
import { CURATED_COUNTRIES } from '@/config/countries';

export interface Command {
id: string;
keywords: string[];
label: string;
icon: string;
category: 'navigate' | 'layers' | 'panels' | 'view' | 'actions';
category: 'navigate' | 'layers' | 'panels' | 'view' | 'actions' | 'country';
}

export const LAYER_PRESETS: Record<string, (keyof MapLayers)[]> = {
Expand Down Expand Up @@ -104,3 +105,43 @@ export const COMMANDS: Command[] = [
{ id: 'time:48h', keywords: ['48h', '2 days', 'last 2 days'], label: 'Show events from last 48 hours', icon: '\u{1F4C5}', category: 'actions' },
{ id: 'time:7d', keywords: ['7d', 'week', 'last week', '7 days'], label: 'Show events from last 7 days', icon: '\u{1F5D3}\uFE0F', category: 'actions' },
];

function toFlagEmoji(code: string): string {
return code.toUpperCase().split('').map(c => String.fromCodePoint(0x1f1e6 + c.charCodeAt(0) - 65)).join('');
}

// All ISO 3166-1 alpha-2 codes — Intl.DisplayNames resolves human-readable names at runtime
const ISO_CODES = [
'AD','AE','AF','AG','AL','AM','AO','AR','AT','AU','AZ','BA','BB','BD','BE','BF',
'BG','BH','BI','BJ','BN','BO','BR','BS','BT','BW','BY','BZ','CA','CD','CF','CG',
'CH','CI','CL','CM','CN','CO','CR','CU','CV','CY','CZ','DE','DJ','DK','DM','DO',
'DZ','EC','EE','EG','ER','ES','ET','FI','FJ','FM','FR','GA','GB','GD','GE','GH',
'GM','GN','GQ','GR','GT','GW','GY','HN','HR','HT','HU','ID','IE','IL','IN','IQ',
'IR','IS','IT','JM','JO','JP','KE','KG','KH','KI','KM','KN','KP','KR','KW','KZ',
'LA','LB','LC','LI','LK','LR','LS','LT','LU','LV','LY','MA','MC','MD','ME','MG',
'MH','MK','ML','MM','MN','MR','MT','MU','MV','MW','MX','MY','MZ','NA','NE','NG',
'NI','NL','NO','NP','NR','NZ','OM','PA','PE','PG','PH','PK','PL','PS','PT','PW',
'PY','QA','RO','RS','RU','RW','SA','SB','SC','SD','SE','SG','SI','SK','SL','SM',
'SN','SO','SR','SS','ST','SV','SY','SZ','TD','TG','TH','TJ','TL','TM','TN','TO',
'TR','TT','TV','TW','TZ','UA','UG','US','UY','UZ','VA','VC','VE','VN','VU','WS',
'YE','ZA','ZM','ZW',
];

const displayNames = new Intl.DisplayNames(['en'], { type: 'region' });

const COUNTRY_COMMANDS: Command[] = ISO_CODES.map(code => {
const curated = CURATED_COUNTRIES[code];
const name = curated?.name || displayNames.of(code) || code;
const keywords = curated
? [name.toLowerCase(), ...curated.searchAliases]
: [name.toLowerCase()];
return {
id: `country:${code}`,
keywords,
label: `Open ${name} brief`,
icon: toFlagEmoji(code),
category: 'country' as const,
};
});

COMMANDS.push(...COUNTRY_COMMANDS);
14 changes: 7 additions & 7 deletions src/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@
},
"modals": {
"search": {
"placeholder": "البحث في الأخبار، خطوط الأنابيب، القواعد، الأسواق...",
"hint": "أخبارأنابيبقواعدكابلاتمراكز بيانات • أسواق",
"placeholderTech": "البحث في الشركات، مختبرات AI، الشركات الناشئة، الفعاليات...",
"hintTech": "مقرات • شركات • مختبرات AI • شركات ناشئة • مسرّعاتفعاليات",
"placeholderFinance": "البحث في البورصات، الأسواق، البنوك المركزية...",
"hintFinance": "بورصاتمراكز مالية • بنوك مركزية • سلع",
"placeholder": "ابحث أو اكتب أمرًا...",
"hint": "بحثدولطبقاتلوحاتتنقل • إعدادات",
"placeholderTech": "ابحث أو اكتب أمرًا...",
"hintTech": "بحث • شركات • مختبرات AI • طبقات • تنقلإعدادات",
"placeholderFinance": "ابحث أو اكتب أمرًا...",
"hintFinance": "بحثبورصات • أسواق • طبقات • تنقل • إعدادات",
"recent": "عمليات البحث الأخيرة",
"empty": "البحث عبر جميع مصادر البيانات",
"empty": "ابحث في البيانات أو نفّذ أوامر",
"noResults": "لا توجد نتائج",
"navigate": "تنقّل",
"select": "اختيار",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@
},
"modals": {
"search": {
"placeholder": "Durchsuchen Sie Nachrichten, Pipelines, Stützpunkte, Märkte ...",
"hint": "NachrichtenPipelinesStützpunkteKabelRechenzentrenMärkte",
"placeholder": "Suchen oder Befehl eingeben...",
"hint": "SucheLänderEbenenPanelsNavigationEinstellungen",
"recent": "Aktuelle Suchanfragen",
"empty": "Durchsuchen Sie alle Datenquellen",
"empty": "Daten durchsuchen oder Befehle ausführen",
"noResults": "No results found",
"navigate": "navigieren",
"select": "wählen",
Expand All @@ -235,10 +235,10 @@
"techhq": "Tech-Hauptquartier",
"accelerator": "Beschleuniger"
},
"placeholderTech": "Suchen Sie nach Unternehmen, KI-Laboren, Start-ups, Veranstaltungen ...",
"hintTech": "Hauptsitze • Unternehmen • KI-Labore • StartupsBeschleunigerVeranstaltungen",
"placeholderFinance": "Suchen Sie nach Börsen, Märkten, Zentralbanken...",
"hintFinance": "Börsen • FinanzzentrenZentralbankenRohstoffe"
"placeholderTech": "Suchen oder Befehl eingeben...",
"hintTech": "Suche • Unternehmen • KI-Labore • EbenenNavigationEinstellungen",
"placeholderFinance": "Suchen oder Befehl eingeben...",
"hintFinance": "Suche • Börsen • MärkteEbenenNavigation • Einstellungen"
},
"signal": {
"title": "INTELLIGENZFINDEN",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@
},
"modals": {
"search": {
"placeholder": "Αναζήτηση ειδήσεων, αγωγών, βάσεων, αγορών...",
"hint": "ΕιδήσειςΑγωγοίΒάσειςΚαλώδιαΚέντρα Δεδομένων • Αγορές",
"placeholderTech": "Αναζήτηση εταιρειών, AI labs, startups, εκδηλώσεων...",
"hintTech": "Έδρες • Εταιρείες • AI Labs • StartupsAcceleratorsΕκδηλώσεις",
"placeholderFinance": "Αναζήτηση χρηματιστηρίων, αγορών, κεντρικών τραπεζών...",
"hintFinance": "ΧρηματιστήριαΧρηματοπιστωτικά Κέντρα • Κεντρικές Τράπεζες • Εμπορεύματα",
"placeholder": "Αναζήτηση ή πληκτρολογήστε εντολή...",
"hint": "ΑναζήτησηΧώρεςΕπίπεδαΠάνελΠλοήγηση • Ρυθμίσεις",
"placeholderTech": "Αναζήτηση ή πληκτρολογήστε εντολή...",
"hintTech": "Αναζήτηση • Εταιρείες • AI Labs • ΕπίπεδαΠλοήγησηΡυθμίσεις",
"placeholderFinance": "Αναζήτηση ή πληκτρολογήστε εντολή...",
"hintFinance": "ΑναζήτησηΧρηματιστήρια • Αγορές • Επίπεδα • Πλοήγηση • Ρυθμίσεις",
"recent": "Πρόσφατες Αναζητήσεις",
"empty": "Αναζήτηση σε όλες τις πηγές δεδομένων",
"empty": "Αναζήτηση δεδομένων ή εκτέλεση εντολών",
"noResults": "Κανένα αποτέλεσμα",
"navigate": "πλοήγηση",
"select": "επιλογή",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@
},
"modals": {
"search": {
"placeholder": "Search news, pipelines, bases, markets...",
"hint": "NewsPipelinesBasesCablesDatacentersMarkets",
"placeholderTech": "Search companies, AI labs, startups, events...",
"hintTech": "HQs • Companies • AI Labs • StartupsAcceleratorsEvents",
"placeholderFinance": "Search exchanges, markets, central banks...",
"hintFinance": "ExchangesFinancial Centers • Central Banks • Commodities",
"placeholder": "Search or type a command...",
"hint": "SearchCountriesLayersPanelsNavigationSettings",
"placeholderTech": "Search or type a command...",
"hintTech": "Search • Companies • AI Labs • LayersNavigationSettings",
"placeholderFinance": "Search or type a command...",
"hintFinance": "SearchExchanges • Markets • Layers • Navigation • Settings",
"recent": "Recent Searches",
"empty": "Search across all data sources",
"empty": "Search data or run commands",
"noResults": "No results",
"navigate": "navigate",
"select": "select",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@
},
"modals": {
"search": {
"placeholder": "Busca noticias, pipelines, bases, mercados...",
"hint": "NoticiasDuctosBasesCablesDatacentersMercados",
"placeholder": "Buscar o escribir un comando...",
"hint": "BúsquedaPaísesCapasPanelesNavegaciónAjustes",
"recent": "Búsquedas recientes",
"empty": "Buscar en todas las fuentes de datos",
"empty": "Buscar datos o ejecutar comandos",
"noResults": "No results found",
"navigate": "navegar por",
"select": "seleccionar",
Expand All @@ -235,10 +235,10 @@
"techhq": "Sede tecnológica",
"accelerator": "Aceleradora"
},
"placeholderTech": "Busca empresas, laboratorios de IA, startups, eventos...",
"hintTech": "Sedes centrales • Empresas • Laboratorios de IA • StartupsAceleradorasEventos",
"placeholderFinance": "Buscar bolsas, mercados, bancos centrales...",
"hintFinance": "BolsasCentros financieros • Bancos centrales • Materias primas"
"placeholderTech": "Buscar o escribir un comando...",
"hintTech": "Búsqueda • Empresas • Laboratorios IA • CapasNavegaciónAjustes",
"placeholderFinance": "Buscar o escribir un comando...",
"hintFinance": "BúsquedaBolsas • Mercados • Capas • Navegación • Ajustes"
},
"signal": {
"title": "ENCUENTRO DE INTELIGENCIA",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@
},
"modals": {
"search": {
"placeholder": "Rechercher actus, pipelines, bases, marchés...",
"hint": "ActusPipelinesBasesCâblesDatacentersMarchés",
"placeholder": "Rechercher ou saisir une commande...",
"hint": "RecherchePaysCouchesPanneauxNavigationParamètres",
"recent": "Recherches récentes",
"empty": "Rechercher dans toutes les sources",
"empty": "Rechercher des données ou exécuter des commandes",
"noResults": "Aucun résultat trouvé",
"navigate": "naviguer",
"select": "sélectionner",
Expand All @@ -235,10 +235,10 @@
"techhq": "Siège Tech",
"accelerator": "Accélérateur"
},
"placeholderTech": "Rechercher des entreprises, des laboratoires d'IA, des startups, des événements...",
"hintTech": "Sièges • Entreprises • AI LabsStartupsAccélérateursÉvénements",
"placeholderFinance": "Rechercher des bourses, des marchés, des banques centrales...",
"hintFinance": "BoursesCentres financiers • Banques centrales • Matières premières"
"placeholderTech": "Rechercher ou saisir une commande...",
"hintTech": "Recherche • Entreprises • Labos IACouchesNavigationParamètres",
"placeholderFinance": "Rechercher ou saisir une commande...",
"hintFinance": "RechercheBourses • Marchés • Couches • Navigation • Paramètres"
},
"signal": {
"title": "DÉCOUVERTE RENSEIGNEMENT",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@
},
"modals": {
"search": {
"placeholder": "Cerca notizie, oleodotti, basi, mercati...",
"hint": "NotizieOleodottiBasiCaviDatacenterMercati",
"placeholder": "Cerca o digita un comando...",
"hint": "RicercaPaesiLivelliPannelliNavigazioneImpostazioni",
"recent": "Ricerche recenti",
"empty": "Cerca in tutte le fonti dati",
"empty": "Cerca dati o esegui comandi",
"noResults": "Nessun risultato",
"navigate": "naviga",
"select": "seleziona",
Expand All @@ -235,10 +235,10 @@
"techhq": "Sede tecnologica",
"accelerator": "Acceleratore"
},
"placeholderTech": "Cerca aziende, laboratori IA, startup, eventi...",
"hintTech": "Sedi • Aziende • Laboratori IA • StartupAcceleratoriEventi",
"placeholderFinance": "Cerca borse, mercati, banche centrali...",
"hintFinance": "BorseCentri finanziari • Banche centrali • Materie prime"
"placeholderTech": "Cerca o digita un comando...",
"hintTech": "Ricerca • Aziende • Laboratori IA • LivelliNavigazioneImpostazioni",
"placeholderFinance": "Cerca o digita un comando...",
"hintFinance": "RicercaBorse • Mercati • Livelli • Navigazione • Impostazioni"
},
"signal": {
"title": "RICERCA DI INTELLIGENZA",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@
},
"modals": {
"search": {
"placeholder": "ニュース、パイプライン、基地、市場を検索...",
"hint": "ニュース・パイプライン・基地・ケーブル・データセンター・市場",
"placeholderTech": "企業、AIラボ、スタートアップ、イベントを検索...",
"hintTech": "本社・企業・AIラボ・スタートアップ・アクセラレーター・イベント",
"placeholderFinance": "取引所、市場、中央銀行を検索...",
"hintFinance": "取引所・金融センター・中央銀行・コモディティ",
"placeholder": "検索またはコマンドを入力...",
"hint": "検索 • 国 • レイヤー • パネル • ナビゲーション • 設定",
"placeholderTech": "検索またはコマンドを入力...",
"hintTech": "検索 • 企業 • AIラボ • レイヤー • ナビゲーション • 設定",
"placeholderFinance": "検索またはコマンドを入力...",
"hintFinance": "検索 • 取引所 • 市場 • レイヤー • ナビゲーション • 設定",
"recent": "最近の検索",
"empty": "全データソースを横断検索",
"empty": "データ検索またはコマンド実行",
"noResults": "結果なし",
"navigate": "移動",
"select": "選択",
Expand Down
14 changes: 7 additions & 7 deletions src/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
},
"modals": {
"search": {
"placeholder": "Zoek naar nieuws, pijpleidingen, bases, markten...",
"hint": "NieuwsPijpleidingenBasissenKabelsDatacentraMarkten",
"placeholder": "Zoeken of commando typen...",
"hint": "ZoekenLandenLagenPanelenNavigatieInstellingen",
"recent": "Recente zoekopdrachten",
"empty": "Zoek in alle gegevensbronnen",
"empty": "Zoek gegevens of voer opdrachten uit",
"noResults": "No results found",
"navigate": "navigeren",
"select": "selecteren",
Expand All @@ -95,10 +95,10 @@
"techhq": "Tech-hoofdkantoor",
"accelerator": "Gaspedaal"
},
"placeholderTech": "Zoek bedrijven, AI-labs, startups, evenementen...",
"hintTech": "Hoofdkantoren • Bedrijven • AI Labs • StartupsAcceleratorsEvenementen",
"placeholderFinance": "Zoek beurzen, markten, centrale banken...",
"hintFinance": "BeurzenFinanciële centra • Centrale banken • Grondstoffen"
"placeholderTech": "Zoeken of commando typen...",
"hintTech": "Zoeken • Bedrijven • AI Labs • LagenNavigatieInstellingen",
"placeholderFinance": "Zoeken of commando typen...",
"hintFinance": "ZoekenBeurzen • Markten • Lagen • Navigatie • Instellingen"
},
"signal": {
"source": "Source",
Expand Down
Loading