{"record":{"id":"92af0ab307a2c52c","repo":"koala73/worldmonitor","slug":"the-search-palette-did-not-become-visible","errorCode":null,"errorMessage":"The search palette did not become visible.","messagePattern":"The search palette did not become visible\\.","errorType":"exception","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"warning","filePath":"src/services/webmcp.ts","lineNumber":1909,"sourceCode":"        }\n        return `Opened intelligence brief for ${name} (${iso2}).`;\n      }, trackEvent),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.openSearch,\n      title: 'Open Search',\n      description:\n        'Open the global search command palette so the user can find countries, signals, alerts, and other entities tracked by World Monitor.',\n      inputSchema: {\n        type: 'object',\n        properties: {},\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: false },\n      execute: withBindings(WEBMCP_SPA_TOOL.openSearch, async (_args, extra) => {\n        const opened = await app.openSearch(extra);\n        if (opened !== true) {\n          throw new SafeWebMcpError(\n            'The search palette did not become visible.',\n            'unavailable',\n          );\n        }\n        return 'Opened search palette.';\n      }, trackEvent),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.getDashboardContext,\n      title: 'Get Dashboard Context',\n      description:\n        'Read a bounded snapshot of the visible dashboard: active variant, map view, center, zoom, map mode (2d or 3d), time range, enabled layers, and mounted or enabled panel IDs.',\n      inputSchema: {\n        type: 'object',\n        properties: {},\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: true },","sourceCodeStart":1891,"sourceCodeEnd":1927,"githubUrl":"https://github.com/koala73/worldmonitor/blob/7d06c8633d256c18e38133030bc3613976a96ec9/src/services/webmcp.ts#L1891-L1927","documentation":"The WEBMCP_SPA_TOOL.openSearch tool calls app.openSearch(extra); if the return value is not exactly true (the palette did not visibly open), it throws this SafeWebMcpError with reason 'unavailable'. The tool contract requires visible UI, so a no-op or blocked open is reported as an error to the agent.","triggerScenarios":"Calling the openSearch WebMCP tool when the app cannot make the search palette visible — e.g. the SPA route/controller refuses to open search, another modal/overlay blocks it, or the app is in a state where openSearch returns false/undefined.","commonSituations":"Automation invoking openSearch while the dashboard is still booting; the palette suppressed by app state (e.g. a fullscreen overlay, embedded mode, or keyboard-input capture); UI regression making openSearch return non-true.","solutions":["Retry after the dashboard finishes loading / the blocking overlay is dismissed, then call openSearch again","Fall back to direct search interaction (query the search API or navigate to the search route) instead of the palette","Verify no app state (modals, embedded mode, reduced-UI flags) prevents the palette from showing","If openSearch systematically returns non-true, file a bug with the app state at call time"],"exampleFix":"// before\nconst opened = await app.openSearch(extra);\nif (opened !== true) throw new SafeWebMcpError('The search palette did not become visible.', 'unavailable');\n// after\nconst opened = await app.openSearch(extra);\nif (opened !== true) {\n  await dismissBlockingOverlays(app);\n  if (await app.openSearch(extra) !== true) throw new SafeWebMcpError('The search palette did not become visible.', 'unavailable');\n}","handlingStrategy":"fallback","validationCode":"if (!appReady) { await waitForAppReady(); }","typeGuard":null,"tryCatchPattern":"try { await callWebMcpTool('openSearch'); } catch (e) { if (e.message.includes('search palette')) { await navigateToSearchRoute(); } else throw e; }","preventionTips":["Ensure openSearch returns a strict boolean true only on visible success","Block tool invocation while boot overlays or modals are active","Fall back to a direct search route when the palette cannot open"],"tags":["webmcp","ui","search-palette","unavailable"],"backgroundTag":"unexpected-response-shape","analyzedSha":"7d06c8633d256c18e38133030bc3613976a96ec9","analyzedAt":"2026-09-15T16:44:39.439Z","contentChangedAt":"2026-09-15T16:44:39.439Z","schemaVersion":2},"datasetVersion":"2026-09-15T18:17:12.389Z"}