diff --git a/src/background/messenger/api.ts b/src/background/messenger/api.ts index 153c4c1b02..e5f53f1d9d 100644 --- a/src/background/messenger/api.ts +++ b/src/background/messenger/api.ts @@ -70,7 +70,7 @@ export const recordLog = getNotifier("RECORD_LOG", bg); export const clearLogs = getMethod("CLEAR_LOGS", bg); export const clearLog = getMethod("CLEAR_LOG", bg); export const clearExtensionDebugLogs = getMethod( - "CLEAR_EXTENSION_DEBUG_LOGS", + "CLEAR_MOD_COMPONENT_DEBUG_LOGS", bg, ); diff --git a/src/background/messenger/registration.ts b/src/background/messenger/registration.ts index a40edeb586..857ea76d46 100644 --- a/src/background/messenger/registration.ts +++ b/src/background/messenger/registration.ts @@ -110,7 +110,7 @@ declare global { RECORD_ERROR: typeof recordError; CLEAR_LOGS: typeof clearLogs; CLEAR_LOG: typeof clearLog; - CLEAR_EXTENSION_DEBUG_LOGS: typeof clearModComponentDebugLogs; + CLEAR_MOD_COMPONENT_DEBUG_LOGS: typeof clearModComponentDebugLogs; INTEGRATION_REGISTRY_CLEAR: typeof integrationRegistry.clear; LOCATOR_FIND_ALL_SANITIZED_CONFIGS_FOR_INTEGRATION: typeof integrationConfigLocator.findAllSanitizedConfigsForIntegration; @@ -183,7 +183,7 @@ export default function registerMessenger(): void { RECORD_ERROR: recordError, CLEAR_LOGS: clearLogs, CLEAR_LOG: clearLog, - CLEAR_EXTENSION_DEBUG_LOGS: clearModComponentDebugLogs, + CLEAR_MOD_COMPONENT_DEBUG_LOGS: clearModComponentDebugLogs, INTEGRATION_REGISTRY_CLEAR: integrationRegistry.clear.bind(integrationRegistry), diff --git a/src/bricks/effects/pageState.ts b/src/bricks/effects/pageState.ts index 4990676ded..ad61a7ade0 100644 --- a/src/bricks/effects/pageState.ts +++ b/src/bricks/effects/pageState.ts @@ -150,15 +150,15 @@ export class SetPageState extends TransformerABC { }>, { logger, platform }: BrickOptions, ): Promise { - const { modId: blueprintId, modComponentId: extensionId } = logger.context; + const { modId, modComponentId } = logger.context; return platform.state.setState({ namespace, data, mergeStrategy, // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unnecessary-type-assertion -- TODO: https://github.com/pixiebrix/pixiebrix-extension/issues/7891 - modComponentId: extensionId!, - modId: blueprintId, + modComponentId: modComponentId!, + modId, }); } } diff --git a/src/extensionConsole/pages/mods/hooks/useReactivateAction.ts b/src/extensionConsole/pages/mods/hooks/useReactivateAction.ts index ed0976348d..fa936a3374 100644 --- a/src/extensionConsole/pages/mods/hooks/useReactivateAction.ts +++ b/src/extensionConsole/pages/mods/hooks/useReactivateAction.ts @@ -38,7 +38,7 @@ const useReactivateAction = (modViewItem: ModViewItem): (() => void) | null => { if (hasModDefinition) { const modId = isModDefinition(mod) ? mod.metadata.id : mod._recipe?.id; - assertNotNullish(modId, "blueprintId is required to reactivate mod"); + assertNotNullish(modId, "modId is required to reactivate mod"); reportEvent(Events.START_MOD_ACTIVATE, { modId, diff --git a/src/utils/modUtils.ts b/src/utils/modUtils.ts index bb33ce1cc1..1c990234df 100644 --- a/src/utils/modUtils.ts +++ b/src/utils/modUtils.ts @@ -94,6 +94,8 @@ export function mapModComponentToMessageContext( /** * Returns the message context for a ModComponentRef. For use with passing to reportEvent * @see selectEventData + * + * TODO: Once we update the shape of ModComponentRef, we need to audit unnecessary usage of this function */ export function mapModComponentRefToMessageContext( modComponentRef: ModComponentRef,