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
This commit is contained in:
2026-06-04 12:11:51 -04:00
parent fc1a4e336e
commit 0b3a7d5c95
7 changed files with 353 additions and 30 deletions
+23 -1
View File
@@ -56,7 +56,8 @@ export const SearchHistory = {
// ---------------------------------------------------------------------------
export const QueryParser = {
parse(raw) {
const result = { tags: [], vault: null, title: null, path: null, ext: null, freeText: "" };
const result = { tags: [], vault: null, title: null, path: null, ext: null,
created: null, modified: null, size: null, freeText: "" };
if (!raw) return result;
const tokens = this._tokenize(raw);
const freeTokens = [];
@@ -75,6 +76,12 @@ export const QueryParser = {
result.path = tok.slice(5).replace(/"/g, "").trim();
} else if (lower.startsWith("ext:")) {
result.ext = tok.slice(4).replace(/"/g, "").trim().replace(/^\./, "").toLowerCase();
} else if (lower.startsWith("created:")) {
result.created = tok.slice(8).replace(/"/g, "").trim();
} else if (lower.startsWith("modified:")) {
result.modified = tok.slice(9).replace(/"/g, "").trim();
} else if (lower.startsWith("size:")) {
result.size = tok.slice(5).replace(/"/g, "").trim();
} else {
freeTokens.push(tok);
}
@@ -434,6 +441,18 @@ export const SearchChips = {
this._addChip("ext", `ext:${parsed.ext}`, parsed.ext);
hasChips = true;
}
if (parsed.created) {
this._addChip("date", `created:${parsed.created}`, `créé ${parsed.created}`);
hasChips = true;
}
if (parsed.modified) {
this._addChip("date", `modified:${parsed.modified}`, `modifié ${parsed.modified}`);
hasChips = true;
}
if (parsed.size) {
this._addChip("size", `size:${parsed.size}`, `taille ${parsed.size}`);
hasChips = true;
}
this._container.hidden = !hasChips;
},
clear() {
@@ -762,6 +781,9 @@ export async function performAdvancedSearch(query, vaultFilter, tagFilter, offse
const excludeEl = document.getElementById("search-exclude-input");
if (includeEl?.value.trim()) url += `&include_paths=${encodeURIComponent(includeEl.value.trim())}`;
if (excludeEl?.value.trim()) url += `&exclude_paths=${encodeURIComponent(excludeEl.value.trim())}`;
if (parsed.created) url += `&created=${encodeURIComponent(parsed.created)}`;
if (parsed.modified) url += `&modified=${encodeURIComponent(parsed.modified)}`;
if (parsed.size) url += `&size=${encodeURIComponent(parsed.size)}`;
// Search timeout — abort if server takes too long
const timeoutId = setTimeout(