Stop automatic source browser opens

This commit is contained in:
2026-08-06 00:44:21 +02:00
parent 6f2d998754
commit 82d0a07e1f
4 changed files with 3 additions and 14 deletions
+1
View File
@@ -74,6 +74,7 @@ This project replaces the Excel/VBA workflow named `Catalog maker - 20` with a N
- Scrapers must use controlled browser navigation, selectors, explicit waits and bounded request counts.
- The configured browser engine for a source is authoritative. If a source says `firefox`, launch Firefox or fail loudly; do not silently fall back to Chromium, Edge or another browser.
- Automated source lookup, mapping checks and picture lookup must run headless/in the background by default. Open a visible browser only for explicit user `Open` actions or deliberate diagnostics after an error.
- `Find sources` must never automatically open found source candidates in a visible browser. It only fills the source popup; visible browser opening belongs only to the per-row `Open` action or an explicit diagnostic path.
- Visible source windows, URL health checks, source lookup and picture parsing must all use the same configured browser engine from that source's database setting.
- Source candidate `Open` actions in the UI must call the backend source opener with `manufacturerId`, `sourceKey` and URL. Do not use plain `target="_blank"` source links for mapped supplier/manufacturer sources because that ignores the configured browser engine.
- Keep scraping slow and observable, preserve source URL/status information, and handle blocked pages or missing selectors as explicit errors.
+1 -1
View File
@@ -97,7 +97,7 @@ let currentCombinations = [];
let loadRequestId = 0;
let applicationMode = "dry-run";
let databaseConnectionState = "unknown";
const localDraftKey = "catalog-maker:current-product-draft:v2";
const localDraftKey = "catalog-maker:current-product-draft:v3";
const selectedManufacturerKey = "catalog-maker:selected-manufacturer";
let localDraftProductKey = "";
const fieldNames = [
+1 -1
View File
@@ -99,7 +99,7 @@ let currentCombinations = [];
let loadRequestId = 0;
let applicationMode = "dry-run";
let databaseConnectionState = "unknown";
const localDraftKey = "catalog-maker:current-product-draft:v2";
const localDraftKey = "catalog-maker:current-product-draft:v3";
const selectedManufacturerKey = "catalog-maker:selected-manufacturer";
let localDraftProductKey = "";
-12
View File
@@ -188,18 +188,6 @@ export async function findProductSources(
),
);
for (const item of items) {
if (item.source?.key !== "hudy") continue;
const candidate = item.candidates?.[0];
if (candidate?.url) {
try {
await openInBrowser(candidate.url, { engine: item.source.browserEngine });
} catch {
// Picture extraction can continue even if the visible browser cannot start.
}
}
}
return {
configured: mapping.configured,
items,