27 Commits
Author SHA1 Message Date
bruno 2813d546a7 feat: facette Extensions dans les facettes de recherche #157
CI / lint (push) Successful in 2m41s
CI / security (push) Successful in 2m0s
CI / test (push) Successful in 4m45s
CI / build (push) Successful in 3m4s
CI / e2e (push) Successful in 15m36s
2026-10-01 20:35:21 -04:00
bruno 66a5505965 fix: correction raccourci palette + filtrage ext/vault/tag dans palette fichiers
CI / lint (push) Successful in 2m40s
CI / security (push) Failing after 1m53s
CI / test (push) Successful in 4m36s
CI / build (push) Successful in 1m48s
CI / e2e (push) Successful in 17m29s
- Correction du raccourci clavier inversé dans l'aide :
  Ctrl+Shift+Space → Palette de fichiers (navigation rapide)
  Ctrl+Alt+Space → Palette de commandes
- Ajout du support des filtres ext:xxx, vault:nom, tag:monTag dans la palette de fichiers
- parseQuery étendu pour gérer les opérateurs de filtrage
- Filtrage client-side par extension et tag dans searchFiles et searchBrowseGlobal
- Backend : suggest_titles retourne les tags pour chaque suggestion
- Schema TitleSuggestion : ajout du champ tags
- Placeholders mis à jour pour indiquer les nouveaux filtres disponibles

Fixes : raccourci inversé, filtrage par extension/vault/tag dans palette fichiers
2026-10-01 10:29:42 -04:00
bruno 06f8e63d06 feat: tableurs indexables, saisie typée et valeurs calculées #153
Les tableurs étaient invisibles à la recherche, chaque saisie devenait
du texte, et une formule n'affichait que sa formule.

- A5 : extract_indexable_text() indexe les noms de feuilles et les 20
  premières lignes (plafond 5 k caractères) pour le TF-IDF et la
  recherche sémantique. Un mot tapé dans une cellule rend le fichier
  trouvable ; un classeur chiffré s'indexe par son seul nom.
- A10 : la saisie est typée comme dans Excel — booléens
  (TRUE/FAUX/OUI/NON) et dates FR JJ/MM/AAAA en ordre jour-first, donc
  01/02/2026 est le 1er février. Une saisie ressemblant à une formule
  n'est jamais convertie (BUG-088 préservé).
- A12 : la valeur calculée par Excel s'affiche sous la formule, via une
  2e lecture data_only=True faite seulement si l'archive contient un
  <v>. Info-bulle traduite FR/EN, aucun texte d'interface côté backend.
- BUG-089 : un reindex manuel ne reconstruisait pas l'index inversé, et
  backend/search.py lisait l'index via un import par valeur — après un
  rechargement du module, la recherche écrivait dans un dict périmé.

Contre-preuves vérifiées pour A5, A10 et A12 (neutralisation de chaque
fonction → échec des tests concernés). Tests : 1402 pytest, 10 JSDOM,
4 E2E, suite E2E complète verte, ruff/mypy 0.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <[email protected]>
2026-09-27 22:43:24 -04:00
bruno 31d4616baf feat: garde-fous d'écriture des classeurs Excel #153 (P0)
L'édition d'un .xlsx pouvait détruire une partie du classeur, le
concurrencer en silence, ou diffuser une injection de formule.

- BUG-085 : inspect_workbook() détecte ce qu'un round-trip openpyxl perd
  (valeurs calculées en cache, slicers, contrôles, connexions, custom
  XML, signature, commentaires enrichis, macros) → xlsx_lossy_features
  exposé en lecture, bandeau FR/EN, et 409 xlsx_lossy_content sans
  `force` (confirmation explicite puis reprise). Périmètre réel
  revalidé : graphiques, images et TCD survivent au round-trip.
- BUG-086 : écriture atomique (fichier .tmp + os.replace) : un plantage
  ne peut plus tronquer le classeur, le backup reste intact.
- BUG-087 : verrou par fichier autour du read-modify-write (timeout 15 s,
  409 conflict) ; endpoint xlsx/save devenu synchrone pour que
  l'attente s'exécute dans le threadpool.
- BUG-088 : une saisie en '=' ou '@' est stockée en texte, sauf opt-in
  `allow_formula` ou le bouton f(x) de la visionneuse. Le handler
  ServiceError expose désormais code + details, que api() propage.
- BUG-084 : la suppression d'une vault purge enfin l'index inversé
  (documents fantômes qui continuaient de matcher) et is_stale() devient
  is_ready(), le nom étant trompeur (la staleness n'existe plus).

Tests : 1390 pytest, 10 JSDOM (xlsx-viewer.test.mjs, branché au CI),
3 E2E Playwright, suite E2E complète verte, ruff/mypy 0.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <[email protected]>
2026-09-27 20:39:12 -04:00
bruno 162a5b4acc fix(security): consolidation & securite phase 1 (#84, BUG-021 a BUG-034)
CI / lint (push) Successful in 1m20s
CI / security (push) Successful in 47s
CI / test (push) Successful in 2m21s
CI / build (push) Successful in 43s
CI / e2e (push) Successful in 10m48s
- sanitizer XSS serveur (markdown + page de partage) [BUG-021/022]
- rate-limit/lockout MFA [BUG-023]
- isolation vaults par segments [BUG-024]
- caps regex ReDoS [BUG-025]
- SSRF webhooks + secrets externalises [BUG-026]
- rotation/revocation des jetons [BUG-027]
- politique de mot de passe + invalidation sessions [BUG-028]
- verrous users.json [BUG-029]
- IP reelle dans les audits [BUG-030]
- rate-limit par compte [BUG-031]
- symlinks hors vault ignores [BUG-032]
- recherche simple via inverted index [BUG-033]
- token en memoire + cookie HttpOnly, CSP durcie [BUG-034]

Tests: pytest 961 passed / 6 skipped, ruff 0, mypy 0, frontend vert.
2026-09-13 10:51:42 -04:00
bruno 31d4be8015 feat(search): recherche semantique - embeddings vectoriels + hybride RRF (#70) 2026-09-12 00:12:20 -04:00
bruno 1673531b43 fix: resolve all CI lint and security issues
CI / lint (push) Failing after 9s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after 12s
- ruff: 602→0 errors (428 auto-fixed, pyproject.toml ignores for FastAPI patterns)
- bandit: skip B310 (urllib for vault file access is intentional)
- Fixed SIM118 (dict.keys()→dict), PERF102, SIM113, SIM117
- Created pyproject.toml with ruff + bandit config
- 285 tests still pass
2026-07-24 10:38:44 -04:00
bruno 0b3a7d5c95 feat: roadmap items #7 #8 #9 #10 — recent files, semver tag, search filters, dedup
- #7: Section « Récents » dans la page d'accueil vault (5 derniers fichiers)
- #8: Git tag v1.8.0
- #9: Filtres search avancés created:/modified:/size: avec parsing dates/sizes
- #10: Déduplication IGNORED_DIRS (indexer.py source unique, watcher+main importent)
- ROADMAP: tous les items marqués FAIT, version → 1.9.0
2026-06-04 12:11:51 -04:00
bruno 8819d04cf2 fix: indexation inversée non-bloquante — run_in_executor
CI / lint (push) Failing after 7s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Successful in 9s
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
2026-06-04 07:33:50 -04:00
bruno b76fc64325 fix: ajout méthode is_stale() manquante dans InvertedIndex 2026-05-30 17:00:00 -04:00
bruno fe1a2be364 fix: stem_token/stem_tokens — try/except sur crash snowballstemmer (IndexError sur tokens exotiques)
CI / lint (push) Successful in 14s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 2s
2026-05-29 13:33:04 -04:00
bruno 1b9ba69c52 perf: O(T) stemming instead of O(S×T) — fixes 15min index freeze
CI / lint (push) Successful in 14s
CI / security (push) Successful in 9s
CI / test (push) Successful in 18s
CI / build (push) Successful in 4s
Replace double-nested stem loop (stems × tokens) with single-pass
stem frequency map. For 100 unique tokens per file: 10,000 iterations
→ 100 iterations per file. Critical for large vaults.
2026-05-28 15:23:51 -04:00
bruno 23fa003422 feat: French stemming (snowballstemmer) — 'recettes' matches 'recette', 'mangeons' matches 'manger'
CI / test (push) Has been cancelled
CI / security (push) Has been cancelled
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
Add French snowball stemmer to tokenization pipeline:
- Index both original tokens AND their stems in InvertedIndex
- Query terms are also stemmed before lookup
- Stemmed forms accumulate TF from all original forms
- Lazy-init singleton pattern for stemmer
2026-05-28 13:15:37 -04:00
bruno 7b2da1ff6a feat: CI/CD pipeline + sortedcontainers for O(log n) index ops
CI / lint (push) Failing after 2m3s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Failing after 10s
CI/CD (.gitea/workflows/ci.yml):
- Lint: ruff + mypy on every push/PR
- Test: pytest with coverage report (175 tests)
- Security: bandit SAST + pip-audit dependency scan
- Build: Docker image verification

sortedcontainers (backend/search.py):
- Replace bisect with SortedList for _sorted_tokens
- O(log n) add() / discard() instead of O(n) insort/pop
- SortedList.bisect_left() for prefix search
- Add sortedcontainers>=2.4.0 to requirements.txt
2026-05-27 22:47:28 -04:00
bruno 8055b20e5f Fix tag filtering to preserve "all" vault filter 2026-05-27 12:08:59 -04:00
bruno e3c25b5b09 Add saved searches with CRUD API and UI sidebar
Add extension field to search results and display it
Add active filter badges and save button to search header
2026-05-27 08:39:52 -04:00
bruno aa2c05b05f Add regex search with highlighted snippet support 2026-05-27 08:15:39 -04:00
bruno 7c4f2964eb Render frontmatter as styled cards in public share view
Split search query tokens on word boundaries for accurate inverted-index
matching
2026-05-26 22:16:21 -04:00
bruno 8fdcdaf412 Add search toggles, path filters, and find/replace functionality 2026-05-26 13:35:38 -04:00
bruno 775722f5d4 Switch inverted index from stale check to incremental updates
Register a hook with the indexer so that file add/remove events
incrementally maintain the inverted index, removing the need for
periodic staleness checks and cooldowns. Rebuild the index once on
startup via init_inverted_index().
2026-05-26 12:37:59 -04:00
bruno b38f3f16e4 Coalesce index generation increments and add rebuild cooldown 2026-05-26 11:42:47 -04:00
bruno 84d3ad0e90 feat: add ext: operator for file extension filtering in advanced search
- Add ext: operator support to query parser in backend and frontend
- Update search documentation in README and help modal with ext: examples
- Parse ext: operator to extract file extension filter (strips leading dot, converts to lowercase)
- Filter search candidates by file extension in advanced_search function
- Add ext chip display in search UI alongside existing tag/vault/title/path chips
- Update API documentation and function
2026-03-31 13:41:07 -04:00
bruno b40fcae62f Add advanced search engine with inverted index, thread pool execution, configuration API, and comprehensive diagnostics 2026-03-23 13:21:20 -04:00
bruno e171a0dc35 Add advanced TF-IDF search with autocomplete, query operators, facets, pagination, and accent normalization 2026-03-23 12:09:46 -04:00
bruno d311a09527 Implement multi-stage Docker build with security hardening, add health check endpoint, optimize in-memory search with O(1) wikilink lookup, extract inline tags from markdown content, and enhance documentation with architecture diagrams and performance metrics 2026-03-22 19:03:34 -04:00
bruno b73aa19c51 Add file deletion endpoint with multi-tag filtering support and redesigned editor UI with icon-only buttons 2026-03-21 22:42:55 -04:00
bruno e76e9ea962 first commit 2026-03-21 09:52:44 -04:00