From 0cace688e27287d904e3bc49a5fa039262775307 Mon Sep 17 00:00:00 2001 From: Spark Date: Sat, 28 Nov 2026 13:07:10 -0500 Subject: [PATCH] =?UTF-8?q?fix(sync):=20retirer=20le=20statut=20IA=20r?= =?UTF-8?q?=C3=A9siduel=20=E2=80=94=20toast=20410=20au=20chargement=20(2.9?= =?UTF-8?q?5.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 ++- README.fr.md | 6 +- README.md | 6 +- VERSION | 2 +- desktop/Cargo.lock | 2 +- desktop/Cargo.toml | 2 +- desktop/tauri.conf.json | 2 +- docs/ROADMAP.md | 2 +- frontend/js/sync.js | 152 -------------------------------------- frontend/style.css | 53 ------------- package.json | 2 +- tests/test_draco_barre.py | 13 ++++ 12 files changed, 34 insertions(+), 218 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d53f21e..880d2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Format basé sur [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/), et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). > **En cours de développement** : les changements à venir sont listés dans la section -> [Unreleased](#unreleased). La dernière version livrée est **2.95.0**. +> [Unreleased](#unreleased). La dernière version livrée est **2.95.1**. --- @@ -14,6 +14,14 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- +## [2.95.1] — 2026-11-28 + +### Corrigé + +- **Toast 410 au chargement (résidu D5)** : le panneau de synchronisation interrogeait encore l'ancien endpoint `/api/ai/status` au démarrage et affichait le message « L'assistant intégré d'ObsiGate a été retiré » en toast d'erreur. La section « statut IA » du panneau sync, son appel de démarrage et ses styles sont retirés ; test de garde `test_aucun_appel_ia_residuel_sync`. **Redéploiement Docker requis.** + +--- + ## [2.95.0] — 2026-11-28 ### Ajouté diff --git a/README.fr.md b/README.fr.md index 22086c8..53349c4 100644 --- a/README.fr.md +++ b/README.fr.md @@ -4,7 +4,7 @@ **Porte d'entrée web ultra-léger pour vos vaults Obsidian** — Accédez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive. -[![Version](https://img.shields.io/badge/Version-2.95.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.95.1-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -981,8 +981,8 @@ Ce projet est sous licence **MIT** — voir le fichier [LICENSE](LICENSE) pour l ## 📝 Changelog -Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.95.0). +Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.95.1). --- -*Projet : ObsiGate | Version : 2.95.0 | Dernière mise à jour : Septembre 2026* +*Projet : ObsiGate | Version : 2.95.1 | Dernière mise à jour : Septembre 2026* diff --git a/README.md b/README.md index 95f2e6b..bbe7818 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Ultra-light web gateway for your Obsidian vaults** — Access, browse, and search all your Obsidian notes from any device via a modern, responsive web interface. -[![Version](https://img.shields.io/badge/Version-2.95.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.95.1-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -1156,8 +1156,8 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) ## 📝 Changelog -See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.95.0). +See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.95.1). --- -*Project: ObsiGate | Version: 2.95.0 | Last updated: September 2026* +*Project: ObsiGate | Version: 2.95.1 | Last updated: September 2026* diff --git a/VERSION b/VERSION index f3071c0..4d066b3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.95.0 +2.95.1 diff --git a/desktop/Cargo.lock b/desktop/Cargo.lock index ce8d1d4..c10bd7a 100644 --- a/desktop/Cargo.lock +++ b/desktop/Cargo.lock @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "obsigate-desktop" -version = "2.95.0" +version = "2.95.1" dependencies = [ "chrono", "env_logger", diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index ac159e5..078eee6 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "obsigate-desktop" -version = "2.95.0" +version = "2.95.1" description = "ObsiGate Desktop — Porte d'entrée native pour vos vaults Obsidian" authors = ["Bruno Charest"] edition = "2021" diff --git a/desktop/tauri.conf.json b/desktop/tauri.conf.json index c5fe866..c5f2a9d 100644 --- a/desktop/tauri.conf.json +++ b/desktop/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/nicedoc/obsigate/main/desktop/tauri.conf.schema.json", "productName": "ObsiGate", - "version": "2.95.0", + "version": "2.95.1", "identifier": "com.obsigate.desktop", "build": { "frontendDist": "../frontend", diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 826078b..808b03e 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,6 +1,6 @@ # ObsiGate — Roadmap -> **Version :** 2.95.0 | **Dernière mise à jour :** 2026-11-28 +> **Version :** 2.95.1 | **Dernière mise à jour :** 2026-11-28 > **Ce fichier ne contient que le travail à venir** (🔵 En cours + ⚪ Backlog) et un index compact > vers les fonctionnalités livrées. > - **Méthode de livraison à appliquer pour toute tâche : [DELIVERY_WORKFLOW.md](./DELIVERY_WORKFLOW.md)** diff --git a/frontend/js/sync.js b/frontend/js/sync.js index c647741..c9599c6 100644 --- a/frontend/js/sync.js +++ b/frontend/js/sync.js @@ -286,9 +286,6 @@ function initSyncStatus() { }); IndexUpdateManager.connect(); - - // Initialize AI status tracking - _initAIStatus(); } function toggleSyncPanel() { @@ -366,159 +363,10 @@ function _renderSyncPanel(panel) { } panel.innerHTML = html; - - // ── AI Status section ── - _renderAIStatusSection(panel); } // --------------------------------------------------------------------------- // AI Status Indicator (inside sync panel + header badge animation) -// --------------------------------------------------------------------------- - -let _aiProcessing = false; -let _aiConfigured = null; // null = unknown, true/false -let _aiAutocomplete = null; // null = unknown, {available, server_ok, model_loaded, model, error} - -/** Check if AI is configured by calling the /api/ai/status endpoint. - * Updates _aiConfigured, _aiAutocomplete and refreshes the panel if open. */ -async function _checkAIStatus() { - try { - const status = await api('/api/ai/status'); - _aiConfigured = status.configured === true; - _aiAutocomplete = status.autocomplete || null; - } catch { - _aiConfigured = false; - _aiAutocomplete = null; - } - _updateAIStatusInPanel(); -} - -function _renderAIStatusSection(panel) { - const section = document.createElement('div'); - section.className = 'sync-panel__ai-section'; - section.id = 'sync-panel-ai'; - - // ---- External provider status ---- - let extIcon, extText, extClass; - if (_aiProcessing) { - extIcon = 'loader'; - extText = t('sync.processing'); - extClass = 'sync-panel__ai--processing'; - } else if (_aiConfigured === true) { - extIcon = 'check-circle'; - extText = 'Fournisseur externe actif'; - extClass = 'sync-panel__ai--active'; - } else if (_aiConfigured === false) { - extIcon = 'x-circle'; - extText = t('sync.no_provider'); - extClass = 'sync-panel__ai--inactive'; - } else { - extIcon = 'help-circle'; - extText = t('sync.verifying'); - extClass = 'sync-panel__ai--unknown'; - } - - // ---- Autocomplete (Ollama) status ---- - let acIcon, acText, acClass; - if (_aiAutocomplete && _aiAutocomplete.available) { - acIcon = 'check-circle'; - acText = t('sync.autocomplete_active'); - acClass = 'sync-panel__ai--active'; - } else if (_aiAutocomplete && _aiAutocomplete.server_ok && !_aiAutocomplete.model_loaded) { - acIcon = 'alert-triangle'; - acText = t('sync.model_not_loaded'); - acClass = 'sync-panel__ai--inactive'; - } else if (_aiAutocomplete && _aiAutocomplete.error) { - acIcon = 'x-circle'; - acText = 'Serveur Ollama injoignable'; - acClass = 'sync-panel__ai--inactive'; - } else if (_aiAutocomplete === null) { - acIcon = 'help-circle'; - acText = t('sync.verifying'); - acClass = 'sync-panel__ai--unknown'; - } else { - acIcon = 'x-circle'; - acText = t('sync.not_configured'); - acClass = 'sync-panel__ai--inactive'; - } - - section.innerHTML = '' + - '
Intelligence Artificielle
' + - '
' + - 'Fournisseur' + - '' + - '' + - extText + - '' + - '
' + - '
' + - '' + t('sync.autocomplete') + '' + - '' + - '' + - acText + - '' + - '
'; - - panel.appendChild(section); - // Trigger icon refresh via global - if (window._obsigateRefreshIcons) window._obsigateRefreshIcons(); -} - -/** Update the AI section in the open sync panel. */ -function _updateAIStatusInPanel() { - const section = document.getElementById('sync-panel-ai'); - if (!section) return; - section.innerHTML = ''; - const panel = document.getElementById('sync-panel'); - if (panel) { - // Re-render just the AI section - const oldSection = panel.querySelector('.sync-panel__ai-section'); - if (oldSection) oldSection.remove(); - _renderAIStatusSection(panel); - } -} - -/** Flash the sync badge white during AI processing. - * NOTE: now handled via CSS class on #sync-badge. - * The visual flash in the editor itself is handled by ai.js - * which adds a processing indicator inline. */ -function _setBadgeAIProcessing(active) { - const badge = document.getElementById('sync-badge'); - if (!badge) return; - if (active) { - badge.classList.add('sync-badge--ai-processing'); - } else { - badge.classList.remove('sync-badge--ai-processing'); - } -} - -/** Initialize AI status tracking. */ -function _initAIStatus() { - // Check AI status immediately at startup - _checkAIStatus(); - - // Listen for AI processing events from ai.js - document.addEventListener('ai-processing-start', () => { - _aiProcessing = true; - _setBadgeAIProcessing(true); - _updateAIStatusInPanel(); - }); - - document.addEventListener('ai-processing-end', () => { - _aiProcessing = false; - _setBadgeAIProcessing(false); - _updateAIStatusInPanel(); - }); - - // Re-check AI status when sync panel opens (in case config changed) - const badge = document.getElementById('sync-badge'); - if (badge) { - badge.addEventListener('click', () => { - _checkAIStatus(); - }, { once: false }); - } -} - // --------------------------------------------------------------------------- // PWA Service Worker Registration // --------------------------------------------------------------------------- diff --git a/frontend/style.css b/frontend/style.css index fc6556a..422eaa0 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -5417,11 +5417,6 @@ body.resizing-v { } /* AI processing — white flash on the sync badge */ -.sync-badge--ai-processing { - background: #ffffff !important; - box-shadow: 0 0 6px 3px rgba(255, 255, 255, 0.6) !important; - animation: ai-flash 0.6s ease-in-out infinite; -} @keyframes ai-flash { 0%, 100% { opacity: 1; box-shadow: 0 0 6px 3px rgba(255,255,255,0.6); } @@ -5430,63 +5425,15 @@ body.resizing-v { /* ── AI Status section inside sync panel ── */ -.sync-panel__ai-section { - border-top: 1px solid var(--border); - padding: 10px 14px; -} -.sync-panel__ai-title { - font-size: 0.78rem; - font-weight: 600; - color: var(--text-primary); - margin-bottom: 8px; -} -.sync-panel__ai-row { - display: flex; - align-items: center; - justify-content: space-between; - margin-top: 5px; -} -.sync-panel__ai-label { - font-size: 0.72rem; - color: var(--text-muted); -} -.sync-panel__ai-state { - font-size: 0.75rem; - display: flex; - align-items: center; - gap: 5px; - padding: 2px 8px; - border-radius: 4px; -} -.sync-panel__ai-state i { - flex-shrink: 0; -} -.sync-panel__ai--active { - color: #22c55e; - background: rgba(34, 197, 94, 0.1); -} -.sync-panel__ai--inactive { - color: #f59e0b; - background: rgba(245, 158, 11, 0.1); -} -.sync-panel__ai--processing { - color: #ffffff; - background: rgba(59, 130, 246, 0.2); - animation: ai-status-pulse 1s ease-in-out infinite; -} -.sync-panel__ai--unknown { - color: var(--text-muted); - background: var(--bg-tertiary); -} @keyframes ai-status-pulse { 0%, 100% { opacity: 1; } diff --git a/package.json b/package.json index 27d82d0..d0a79c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsigate", - "version": "2.95.0", + "version": "2.95.1", "description": "**Porte d'entr\u00e9e web ultra-l\u00e9ger pour vos vaults Obsidian** \u2014 Acc\u00e9dez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive.", "main": "patch.js", "directories": { diff --git a/tests/test_draco_barre.py b/tests/test_draco_barre.py index d1004f1..5010ac5 100644 --- a/tests/test_draco_barre.py +++ b/tests/test_draco_barre.py @@ -532,3 +532,16 @@ def test_finition_transition_d7_237(): assert doc.exists() viewer = (FRONTEND / "js" / "viewer.js").read_text(encoding="utf-8") assert 't("viewer.popout")' in viewer and "forge.popout" not in viewer + + +def test_aucun_appel_ia_residuel_sync(): + """Correctif 2.95.1 — le panneau de synchronisation ne doit plus + interroger l'ancien statut IA : l'appel à /api/ai/status au + démarrage affichait le message 410 en toast d'erreur (retour + terrain de Bruno, 2026-11-28).""" + sync = (FRONTEND / "js" / "sync.js").read_text(encoding="utf-8") + assert "/api/ai" not in sync + assert "_checkAIStatus" not in sync + assert "_renderAIStatusSection" not in sync + css = (FRONTEND / "style.css").read_text(encoding="utf-8") + assert ".sync-panel__ai" not in css -- 2.54.0