diff --git a/frontend/src/components/config-details.ts b/frontend/src/components/config-details.ts
index faea67f3..1b14bd37 100644
--- a/frontend/src/components/config-details.ts
+++ b/frontend/src/components/config-details.ts
@@ -304,6 +304,18 @@ export class ConfigDetails extends LiteElement {
: msg("None"),
true
)}
+ ${when(
+ ["host", "domain", "custom", "any"].includes(
+ primarySeedConfig.scopeType || seedsConfig.scopeType
+ ),
+ () =>
+ this.renderSetting(
+ msg("Max Depth"),
+ primarySeedConfig.depth
+ ? msg(str`${primarySeedConfig.depth} hop(s)`)
+ : msg("None")
+ )
+ )}
${this.renderSetting(
msg("Include Any Linked Page (“one hop out”)"),
Boolean(primarySeedConfig.extraHops ?? seedsConfig.extraHops)
diff --git a/frontend/src/pages/org/workflow-editor.ts b/frontend/src/pages/org/workflow-editor.ts
index 99924e58..79f54c54 100644
--- a/frontend/src/pages/org/workflow-editor.ts
+++ b/frontend/src/pages/org/workflow-editor.ts
@@ -79,6 +79,7 @@ type FormState = {
behaviorTimeoutSeconds: number | null;
pageLoadTimeoutSeconds: number | null;
pageExtraDelaySeconds: number | null;
+ maxScopeDepth: number | null;
scopeType: WorkflowParams["config"]["scopeType"];
exclusions: WorkflowParams["config"]["exclude"];
pageLimit: WorkflowParams["config"]["limit"];
@@ -148,6 +149,7 @@ const getDefaultFormState = (): FormState => ({
behaviorTimeoutSeconds: null,
pageLoadTimeoutSeconds: null,
pageExtraDelaySeconds: null,
+ maxScopeDepth: null,
scopeType: "host",
exclusions: [],
pageLimit: null,
@@ -485,6 +487,7 @@ export class CrawlConfigEditor extends LiteElement {
seedsConfig.pageLoadTimeout ?? defaultFormState.pageLoadTimeoutSeconds,
pageExtraDelaySeconds:
seedsConfig.pageExtraDelay ?? defaultFormState.pageExtraDelaySeconds,
+ maxScopeDepth: primarySeedConfig.depth ?? defaultFormState.maxScopeDepth,
scale: this.initialWorkflow.scale,
blockAds: this.initialWorkflow.config.blockAds,
lang: this.initialWorkflow.config.lang,
@@ -1044,6 +1047,29 @@ https://example.com/path`}
${this.renderHelpTextCol(
msg(`Tells the crawler which pages it can visit.`)
)}
+ ${when(
+ ["host", "domain", "custom", "any"].includes(this.formState.scopeType),
+ () => html`
+ ${this.renderFormCol(html`
+