diff --git a/app/services/browserless_service.py b/app/services/browserless_service.py index 73922f2..07dad1b 100644 --- a/app/services/browserless_service.py +++ b/app/services/browserless_service.py @@ -53,8 +53,12 @@ POPUP_SELECTORS = [ # Amazon Interstitials (Soft blocks) "button:has-text('Continuer les achats')", + "span:has-text('Continuer les achats')", + "a:has-text('Continuer les achats')", "input[value='Continuer les achats']", + "input[value='Continue shopping']", "span.a-button-inner > input.a-button-input[type='submit']", + "form:has-text('Continuer les achats') input[type='submit']", "[aria-labelledby='continue-shopping-label']", ] diff --git a/app/services/scheduler_service.py b/app/services/scheduler_service.py index 67b620a..b8b3ec4 100644 --- a/app/services/scheduler_service.py +++ b/app/services/scheduler_service.py @@ -127,6 +127,18 @@ async def process_item_check(item_id: int): if not screenshot_path: raise Exception("Failed to capture screenshot") + # Update the main item screenshot for the UI + try: + import shutil + import os + dest_path = f"/app/screenshots/item_{item_id}.png" + # Ensure directory exists + os.makedirs(os.path.dirname(dest_path), exist_ok=True) + shutil.copy2(screenshot_path, dest_path) + logger.info(f"Updated main screenshot for item {item_id}") + except Exception as e: + logger.error(f"Failed to update main screenshot: {e}") + if not (ai_result := await AIService.analyze_image(screenshot_path, page_text=page_text)): raise Exception("AI analysis failed") diff --git a/app/services/search_service.py b/app/services/search_service.py index 0805c40..07e9ae9 100644 --- a/app/services/search_service.py +++ b/app/services/search_service.py @@ -422,6 +422,10 @@ def seed_default_sites(db: Session) -> int: site = existing_sites[clean_domain] changed = False for key, value in site_data.items(): + # Skip updating user-configurable fields to preserve preferences + if key in ["is_active", "priority"]: + continue + if getattr(site, key) != value: setattr(site, key, value) changed = True diff --git a/frontend/src/components/dashboard/ItemCard.jsx b/frontend/src/components/dashboard/ItemCard.jsx index f986e53..73e9e75 100644 --- a/frontend/src/components/dashboard/ItemCard.jsx +++ b/frontend/src/components/dashboard/ItemCard.jsx @@ -245,17 +245,17 @@ export function ItemCard({ item, onEdit, onDelete, onCheck, onZoom, onCategoryUp
{onViewHistory && ( - )} - - -
diff --git a/frontend/src/components/dashboard/ItemModal.jsx b/frontend/src/components/dashboard/ItemModal.jsx index 220caca..7abbdec 100644 --- a/frontend/src/components/dashboard/ItemModal.jsx +++ b/frontend/src/components/dashboard/ItemModal.jsx @@ -138,7 +138,7 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) {
setFormData({ ...formData, category: e.target.value })} autoFocus @@ -151,7 +151,7 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) { setShowCustomInput(false); setFormData({ ...formData, category: '' }); }} - title="Select existing category" + title="Sélectionner une catégorie existante" > @@ -171,30 +171,30 @@ export function ItemModal({ item, onClose, onSaved, open, categories = [] }) { }} > - + - None + Aucune {categories.map(cat => ( {cat} ))} - Custom... + Autre... )}
- +