- config.json avait watcher_enabled=false → passe a true
- Le watcher natif surveille TestVault + TestDir
- Les nouveaux fichiers sont maintenant indexes en temps reel
- Suppression de OBSIGATE_WATCHER_ENABLED=false des compose (non lu par le code)
- Barre de filtres avec 3 pills: Tous, Recherches, Repertoires
- Chaque saved-search-item a data-type=search|directory
- _applySavedFilter() masque/affiche selon le filtre actif
- _initSavedFilter() initialise les listeners (run once)
- Extensible: ajouter un pill + data-type suffit
- Gere l'etat empty quand aucun resultat pour le filtre
- Recherche classique: icone search (loupe) grise a droite
- Recherche repertoire: icone folder-search bleue a droite
- Icones dans .saved-search-meta, poussees a droite via margin-left:auto
- Les badges/vault restent a gauche dans .saved-search-badges
- ContextMenuManager: option Ajouter aux recherches sauvegardees pour repertoires
- _saveDirectorySearch: POST /api/saved-searches avec include_paths=repertoire/**
- Bascule automatique vers longlet Sauvegardes dans le sidebar
- loadSavedSearches: icone folder-search + classe saved-search-dir pour recherches dossier
- Recherches dossier affichent le chemin au lieu d'une query vide
- Header: retire Aa/wd/.*, compteur 0/0, fleches nav (reste filtre + clear)
- Nouvelle barre flottante sticky en bas du content-area
- Style pill arrondi, fond semi-transparent, ombre legere
- Contient: compteur, nav prev/next, toggles Aa/wd/.*
- Apparait seulement quand des resultats sont affiches
- Disparait au clear ou retour dashboard
- Mobile: filtre + clear restent visibles
- IDs renommes rb-* pour eviter collisions
- Retrait des 3 boutons (delete/cancel/save) de la barre Forge (doublons)
- Retrait des handlers JS associés dans editor-poc.html
- Le header parent ObsiGate reste visible quand Forge est ouvert
- Les boutons save/delete du parent délèguent à Forge via postMessage
- Forge écoute 'parent-save' et 'parent-delete' du parent
- state.editorVault/editorPath settés dans viewer.js pour le parent
Tab/Shift+Tab: indent/dedent list items. Ctrl+K: link insertion prompt. Qi button: position:fixed (always visible). Auto-focus textarea on load. AI ready indicator in status bar. All error messages in French. Force-save shows 'Sauvegarde' toast.
Added CDN scripts: mermaid@11, highlight.js@11 with atom-one-dark theme. After server-rendered HTML is injected, processPreviewBlocks() renders Mermaid diagrams via mermaid.render() and highlights code blocks via hljs.highlightElement(). Preview now matches ObsiGate viewer fidelity.
Preview now saves content via API then fetches rendered HTML from GET /api/file/{vault}?path=... instead of client-side marked.parse(). This enables Mermaid diagrams, syntax highlighting, wikilink resolution, and frontmatter cards. Demo mode still uses marked.js fallback. Debounce increased to 500ms. Loading spinner during render.
height:100% doesn't work when parent uses flex height. position:absolute collapses the parent. 82vh = 90vh modal - header. Also set bodyEl overflow:hidden.
.editor-body has flex height, so percentage height on iframe didn't work. Changed to position:absolute;inset:0 which fills the relative parent regardless of flex sizing.
Added autoHeight() helper called after ta.value is set in both demo mode and API load. Previously only triggered on input event, so loaded files only showed first line (scrollHeight was 0 until user typed).
Forge button now reuses the existing editor-modal with an iframe. Same position as the Edit/CodeMirror modal. On close, the forge iframe is removed and the current file is refreshed (picks up changes saved by the POC's auto-save). Updated both frontend/js/viewer.js and frontend/app.js.
Changed from selectionStart to selectionEnd so bubble follows where user finished selecting. Removed broken fallback that repositioned to textarea bottom on every scroll. Simple viewport clamp instead.
Table: inline form with cols/rows inputs, positioned at cursor. Enter to insert, Esc to cancel. Code block: language picker with 41 languages (bash,js,ts,py,java,rust,go,c,cpp,html,css,json,yaml,sql,dockerfile...), navigable via arrows+Enter. All positioned via caretToPixel like other menus. Click outside closes.
Textarea overflow:hidden + auto-height via scrollHeight to eliminate double scrollbar. Sync scroll between editor and preview panes (bidirectional percentage). Alt+I menu now includes 7 Mermaid diagram templates (flowchart, sequence, class, state, ER, gantt, pie). Table now prompts for cols/rows via prompt(). Bubble menu follows cursor via document selectionchange event.
Slash nav: moved from textarea keydown to slashSearch input keydown (textarea loses focus when slash menu opens). QI nav: document-level up/down/enter/esc with highlight. Bubble: positioned at selection start via caretToPixel instead of textarea bottom center.
Slash menu now positioned below current line at the / character using monospace caret-to-pixel calc. Bubble menu now below textarea (was above). Quick Insert menu now opens below cursor line via Alt+I shortcut and click button. Status bar shows Alt+I hint.
GET /api/file/{vault}?path=... returns html/title but not raw content. Switched to GET /api/file/{vault}/raw?path=... which returns {raw:...}. Title now extracted from first # heading in the content.
Load file via ?vault=X&path=Y params using API. Auto-save 2s debounce with PUT /api/file/{vault}/save. Force save with Ctrl+S. Real AI integration: improve, fix-spelling, continue, summarize, translate, simplify, lengthen via /api/ai/* endpoints. AI status check + button states. Live markdown preview with marked.js CDN. Split view with draggable resize handle. Dirty/unsaved indicator. Vault+path in status bar. Word+char counter. All 5 zones preserved.
Replace contenteditable div with textarea for real markdown editing. insertAtCursor, wrapSelection, replaceLineAtCursor. 18 slash commands map to real markdown syntax. Bubble menu Bold/Italic/Strike/Code/Highlight wrap selection. Ctrl+B/I shortcuts. Word+char count.
Add standalone /editor-poc page demonstrating all 5 toolbar zones:
- Zone 1: Top Fixed Bar (hamburger, title, AI glow button, save indicator)
- Zone 2a: Slash Command Menu (/ on empty line, 15 commands, filtering)
- Zone 2b: Bubble Menu (on text selection, formatting + AI dropdown)
- Zone 3: Floating Quick Insert (per-line, Image/PDF/Code/Table/AI)
- Zone 4: AI Side Panel (Ctrl+J toggle, chat, suggestions)
- Zone 5: Drag & Drop overlay with dashed border
Files:
- new: frontend/editor-poc.html (46KB standalone vanilla JS)
- backend/main.py: +/editor-poc route before catch-all
- frontend/index.html: Editor POC button in header menu
- frontend/js/config.js: initEditorPocBtn() function + export
- frontend/js/legacy.js: re-export initEditorPocBtn
- frontend/js/app.js + frontend/app.js: init call in both versions
#15: Click backup item to preview content in side panel (100KB limit)
#16: Purge all backups per vault (red 'Vider' button)
#17: /api/backups/compress — gzip backups older than N days
#18: /api/backups/auto — backup files modified since N hours
#19: Restore button per backup in manager with timestamp extraction
+ Professional side-panel preview, action buttons on hover, vault grouping
- Config: max_backups_per_file (default 10) in config.json + UI field
- Auto-cleanup: _backup_file deletes oldest backups when limit exceeded
- New endpoints: GET /api/backups (list all), POST /api/backups/delete,
POST /api/backups/purge (by file or vault)
- New module: backup-manager.js - full-page view with filter, grouped by
vault/file, individual delete, per-file purge, stats
- Link from backup viewer footer: 'Gerer tous les backups'
- _get_backup_dir: now resolves relative path using the SPECIFIC vault's
directory (matching _backup_file exactly), not the first vault in index
- Removed _get_backup_root (unused after refactor)
- backups.js: global document click handler for #backup-close (same
pattern as Graph View's initGraphView)
- Close button created once in createOverlay() as a static DOM element
outside the panel, positioned absolutely (top-right corner)
- Never touched by setBody() innerHTML replacements
- Uses same class/id pattern as Graph View: editor-btn + backup-close
- Handler attached via addEventListener ONCE, never needs re-binding
- Removed all CLOSE_BTN from render functions (loading/error/empty/main)
- Close button: <button class="backup-close-btn"><i data-lucide="x"></i></button>
(same HTML pattern as AdminPanel editor-btn)
- Handler: addEventListener via DOM query in setBody() after innerHTML
(same JS pattern as AdminPanel)
- Removed all inline onclick, global capture handler, window._backupViewerClose
- CSS: .backup-close-btn now matches .editor-btn style (bordered icon button)
- Escape key + overlay click still work for closing
- _backup_file: resolve relative backup path against vault parent (survives CWD changes)
- _get_backup_root: same resolution logic for listing
- backups.js: global document-level capture-phase click handler for .backup-close-btn
(works regardless of innerHTML replacements, text node targets, or event bubbling)
- vaulthome.js: getFileIcon was imported from viewer.js but lives in utils.js
- backups.js: setBody() now re-binds close button handler after innerHTML replacement
- Vault home (#12): recursive file listing (rglob), rel_dir in metadata,
'recursif' badge, updated roadmap description
- Backup viewer: fix close button (inline onclick + event delegation
fallback for text nodes), improve error messages
- Backup API: remove response_model to prevent Pydantic 500 errors,
add try/except + logging on backups/diff/restore endpoints,
per-entry error handling in _list_backup_files,
encoding safety (errors='replace') on read_text
- AI status: call /api/ai/status at startup in _initAIStatus
instead of waiting for user click on sync badge
1. Suppression du badge vault-context-pill doublon en mobile
2. Couleurs dynamiques indicateur header:
- Bleu pour 'All' (.vault-ctx-all)
- Mauve/violet pour les vaults (.vault-ctx-vault)
- Jaune/ambre pour les répertoires (.vault-ctx-dir)
3. Statut IA: vérifie la présence du toolbar AI dans le DOM
au lieu d'appeler /api/ai/status (qui ne fonctionnait pas)
4. Indicateur de traitement AI dans l'éditeur (spinner + badge
'AI...' dans le header de l'editor modal) au lieu du flash
blanc sur le badge sync
- Indicateur de contexte de voute (#vault-context-indicator) n'est plus
caché en mobile (display: none retiré), conserve le même look que desktop
- Ajout console.log temporaire dans _checkAIStatus() pour déboguer
pourquoi l'API /api/ai/status retourne configured:false
Problème: l'indicateur affichait 'IA non configurée' alors que les
actions AI fonctionnaient.
Causes:
1. Deux endpoints /api/ai/status en conflit (main.py + ai_routes.py)
2. ai_routes.py lisait PROVIDERS évalué à l'import (os.getenv figé)
3. Cache côté frontend (_aiStatusChecked) empêchait de re-vérifier
Fixes:
- Suppression de l'endpoint redondant dans main.py
- ai_routes.py: lecture os.getenv au runtime (pas depuis PROVIDERS)
- sync.js: _checkAIStatus() appelée à chaque ouverture du panneau
Le menu déroulant AI dans le mode édition était coupé par le
overflow:hidden du .editor-container. Le menu est maintenant:
- Attaché à document.body avec position:fixed
- Positionné aux coordonnées du bouton via getBoundingClientRect()
- Retourné au-dessus si le menu dépasse le bas de l'écran
- maxHeight: 60vh avec overflow-y: auto pour les menus très longs
L'étape 'Building inverted index...' au démarrage bloquait l'event loop
asyncio, empêchant le serveur de répondre aux requêtes HTTP (navigation,
refresh) jusqu'à la fin de l'indexation.
- init_inverted_index() exécuté dans ThreadPoolExecutor via run_in_executor
- get_inverted_index() ne fait plus de rebuild auto bloquant
- Le serveur répond immédiatement, même pendant l'indexation
Point 11a — Indicateur AI Actif:
- Badge sync flashe en blanc pendant traitement AI (animation CSS)
- Événements ai-processing-start/end dans ai.js
- Section statut IA dans panneau sync (configurée/non configurée/en cours)
- Endpoint GET /api/ai/status vérifiant les clés API configurées
Point 11b — Page d'accueil de voute:
- Endpoint GET /api/vault/{vault}/files?dir=... (trié par mtime)
- Module vaulthome.js: affichage style résultats de recherche
- Breadcrumb navigable, mise à jour auto sur clic dossier dans tree
- Déclenché auto quand un vault spécifique est sélectionné
- Backend: 3 nouveaux endpoints
- GET /api/file/{vault}/backups — liste les backups horodatés
- GET /api/file/{vault}/diff — diff unifié entre versions
- POST /api/file/{vault}/restore — restaure une version (backup auto avant)
- Frontend: module backups.js — UI modale avec:
- Sélecteur gauche (backup) / droite (version actuelle ou autre backup)
- Diff coloré: vert pour ajouts, rouge pour suppressions
- Bouton Restaurer avec confirmation
- Menu contextuel: clic droit fichier → 'Backups / Versions'
- CSS: styles complets pour la modale, toolbar, table de diff
- ROADMAP: point 6 marqué comme complété
- Backend: nouvel endpoint POST /api/move/{vault_name} pour déplacer
fichiers et dossiers vers un autre répertoire parent
- Frontend: module dragdrop.js avec délégation d'événements sur le
vault-tree (dragstart, dragover, dragleave, drop)
- CSS: styles pour drag-source, drag-valid-target, drag-over
- Protections: pas de drop sur soi-même, pas dans un enfant,
pas de cross-vault
- Mise à jour de l'index et broadcast SSE après move
- ROADMAP: portion 5 marquée comme complétée