Skip to content

Open source alternative to Semrush and Ahrefs

fix: lock lighthouse launch flow to auto sampling (#80)

Ben Senescubbed7c760a36
diff --git a/src/client/features/audit/launch/LaunchFormCard.tsx b/src/client/features/audit/launch/LaunchFormCard.tsx
index 2e0cea16..72997e4d 100644
--- a/src/client/features/audit/launch/LaunchFormCard.tsx
+++ b/src/client/features/audit/launch/LaunchFormCard.tsx
@@ -132,9 +132,9 @@ function LighthouseOptions({ launchForm }: Pick<Props, "launchForm">) {
</launchForm.Field>
<span
className="text-sm font-medium text-base-content/80"
- title="Run Lighthouse checks through DataForSEO during this audit"
+ title="Lighthouse measures the performance of your pages and identifies issues."
>
- Include Lighthouse checks
+ Include Lighthouse
</span>
</label>
@@ -143,27 +143,11 @@ function LighthouseOptions({ launchForm }: Pick<Props, "launchForm">) {
>
{(runLighthouse) =>
runLighthouse ? (
- <div className="flex flex-wrap items-center gap-2">
- <span className="text-xs text-base-content/60">Audit scope</span>
- <launchForm.Field name="lighthouseMode">
- {(field) => (
- <select
- className="select select-bordered select-xs"
- value={field.state.value}
- onChange={(event) =>
- field.handleChange(
- event.target.value === "all" ? "all" : "auto",
- )
- }
- >
- <option value="auto">Auto sample (recommended)</option>
- <option value="all">All crawled pages</option>
- </select>
- )}
- </launchForm.Field>
- <span className="text-xs text-base-content/50">
- Powered by DataForSEO Lighthouse
- </span>
+ <div className="space-y-1">
+ <p className="text-xs text-base-content/60">
+ We choose a sample of 20 pages to audit, removing pages from
+ duplicate templates.
+ </p>
</div>
) : null
}
diff --git a/src/client/features/audit/launch/types.ts b/src/client/features/audit/launch/types.ts
index ad45ca53..8fec84c6 100644
--- a/src/client/features/audit/launch/types.ts
+++ b/src/client/features/audit/launch/types.ts
@@ -5,12 +5,10 @@ export type LaunchFormValues = {
url: string;
maxPagesInput: string;
runLighthouse: boolean;
- lighthouseMode: "auto" | "all";
};
export const DEFAULT_LAUNCH_FORM_VALUES: LaunchFormValues = {
url: "",
maxPagesInput: "50",
runLighthouse: false,
- lighthouseMode: "auto",
};
diff --git a/src/client/features/audit/launch/useLaunchController.ts b/src/client/features/audit/launch/useLaunchController.ts
index 724778ba..7d642030 100644
--- a/src/client/features/audit/launch/useLaunchController.ts
+++ b/src/client/features/audit/launch/useLaunchController.ts
@@ -81,9 +81,7 @@ export function useLaunchController({
projectId,
startUrl: value.url,
maxPages: effectiveMaxPages,
- lighthouseStrategy: value.runLighthouse
- ? value.lighthouseMode
- : "none",
+ lighthouseStrategy: value.runLighthouse ? "auto" : "none",
});
toast.success("Audit started!");
onAuditStarted(result.auditId);
@@ -117,7 +115,7 @@ function useLaunchMutations({
projectId: string;
startUrl: string;
maxPages: number;
- lighthouseStrategy: "auto" | "all" | "none";
+ lighthouseStrategy: "auto" | "none";
}) => startAudit({ data }),
});