Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
feat(search): make every panel discoverable via CMD+K (#3966)
* feat(search): make every panel discoverable via CMD+K, not just the ones already open
CMD+K only indexed *enabled* panels, so search could merely jump to panels
already on screen. Disabled-by-default panels — and any panel off on the
current variant — were unreachable, and ~40 panels had also drifted out of
the category/command registries entirely. A user reacting to "SPR falls to a
2-year low" who typed "SPR" got nothing, even though the data + panel exist.
- Search now indexes the entitled *available* superset and renders disabled
panels with an "Add" affordance; selecting one enables it (cap-checked,
with a toast when the free-tier limit blocks it) then scrolls to it.
- Extracted enablePanelById() as the single enable path (shared by undo +
search-add). Best-effort scroll retries for async-mounted panels.
- Backfilled the drift: 34 panels into PANEL_CATEGORY_MAP, 5 missing
panel:<id> commands, 11 thin keyword sets widened, removed 2 dead commands
(energy-profile, maritime-activity), added 'spr' to oil-inventories.
- Contract tests enforce discoverability parity for all ~150 panels so a
future panel can't ship uncategorised / uncommanded / under-keyworded.
Closes the discoverability gap surfaced by the SPR example.
* refactor(search): address PR #3966 review — drop redundant pro-check, harden category parser
- syncPanelSearchIndex: isProUser() already folds in role==='pro', so the
trailing OR branch was dead code → simplified to isProUser().
- categoryMappedPanelIds (test): replace the fragile `\n};` end-sentinel with
a brace-walk to the map's matching close (anchored on `= {` to skip the
Record<…{…}…> type-annotation braces), so a later const reusing `};` can't
silently truncate the parsed set. E
Elie Habib committed
418bf7340ebb5abf934ed40154e322283ccf5d24
Parent: 491cdb2
Committed by GitHub <noreply@github.com>
on 5/29/2026, 12:00:20 PM