From 1c814cad6b3a7c4180d4b0900a461c25289080d2 Mon Sep 17 00:00:00 2001 From: sua yoo Date: Mon, 28 Jul 2025 23:02:23 -0700 Subject: [PATCH] feat: Handle "scope" context in error logs (#2772) Resolves https://github.com/webrecorder/browsertrix/issues/2771 ## Changes Handles new `scope` crawl error log context. --- frontend/src/features/archived-items/crawl-log-table.ts | 2 ++ frontend/src/types/crawler.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/frontend/src/features/archived-items/crawl-log-table.ts b/frontend/src/features/archived-items/crawl-log-table.ts index bd90e677..255c09c1 100644 --- a/frontend/src/features/archived-items/crawl-log-table.ts +++ b/frontend/src/features/archived-items/crawl-log-table.ts @@ -12,6 +12,7 @@ import { tw } from "@/utils/tailwind"; const labelFor: Record = { [CrawlLogContext.General]: msg("General"), + [CrawlLogContext.Scope]: msg("Crawl Scope"), [CrawlLogContext.Behavior]: msg("Page Behavior"), [CrawlLogContext.BehaviorScript]: msg("Built-in Behavior"), [CrawlLogContext.BehaviorScriptCustom]: msg("Custom Behavior Script"), @@ -21,6 +22,7 @@ const contextLevelFor: Record = { [CrawlLogContext.Behavior]: 1, [CrawlLogContext.BehaviorScript]: 2, [CrawlLogContext.General]: 3, + [CrawlLogContext.Scope]: 3, [CrawlLogContext.BehaviorScriptCustom]: 4, }; // Minimum context level to highlight diff --git a/frontend/src/types/crawler.ts b/frontend/src/types/crawler.ts index 45aa5d4f..0fefb915 100644 --- a/frontend/src/types/crawler.ts +++ b/frontend/src/types/crawler.ts @@ -256,6 +256,7 @@ export enum CrawlLogLevel { export enum CrawlLogContext { General = "general", + Scope = "scope", Behavior = "behavior", BehaviorScript = "behaviorScript", BehaviorScriptCustom = "behaviorScriptCustom",