diff --git a/agent.md b/agent.md index ea084c7..062be68 100644 --- a/agent.md +++ b/agent.md @@ -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. diff --git a/public/app.js b/public/app.js index 5767358..3cdc872 100644 --- a/public/app.js +++ b/public/app.js @@ -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 = [ diff --git a/public/app.ts b/public/app.ts index 32efba1..9d3589e 100644 --- a/public/app.ts +++ b/public/app.ts @@ -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 = ""; diff --git a/src/services/catalog-products.ts b/src/services/catalog-products.ts index 60b5f4f..9a530d7 100644 --- a/src/services/catalog-products.ts +++ b/src/services/catalog-products.ts @@ -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,