Commit Graph
172 Commits
Author SHA1 Message Date
bruno de5cc97015 fix: export getVaultIcon from viewer.js, import in sidebar.js
CI / lint (push) Successful in 16s
CI / security (push) Successful in 13s
CI / test (push) Successful in 18s
CI / build (push) Successful in 8s
2026-05-28 20:31:15 -04:00
bruno c7378e4f12 fix: export icon from viewer.js, import syncVaultSelectors in config.js, cleanup dupes
CI / lint (push) Successful in 16s
CI / security (push) Successful in 10s
CI / test (push) Successful in 22s
CI / build (push) Successful in 3s
2026-05-28 20:26:04 -04:00
bruno e17da88a81 fix: export _populateRecentVaultFilter from config.js, import in sidebar.js
CI / lint (push) Successful in 12s
CI / security (push) Successful in 7s
CI / test (push) Successful in 16s
CI / build (push) Successful in 2s
2026-05-28 19:43:34 -04:00
bruno 6e59dfdd06 fix: export populateCustomDropdown from ui.js + missing imports
CI / lint (push) Successful in 12s
CI / security (push) Successful in 7s
CI / test (push) Successful in 15s
CI / build (push) Successful in 2s
2026-05-28 19:35:22 -04:00
bruno 015bec7774 fix: add missing imports (api, escapeHtml, safeCreateIcons, getFileIcon) to sidebar, legacy, viewer, dashboard, config
CI / lint (push) Successful in 12s
CI / security (push) Successful in 8s
CI / test (push) Successful in 22s
CI / build (push) Successful in 2s
2026-05-28 19:28:50 -04:00
bruno c83068f473 fix: add safeCreateIcons import to auth.js + export closeHeaderMenu from ui.js
CI / lint (push) Successful in 12s
CI / security (push) Successful in 8s
CI / test (push) Successful in 14s
CI / build (push) Successful in 2s
2026-05-28 19:20:23 -04:00
bruno e2b35fc19e fix: remove duplicate inline exports from legacy.js (already in export block)
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 17s
CI / build (push) Successful in 2s
2026-05-28 18:55:00 -04:00
bruno 9971168025 fix: remaining const state.allVaults → allVaults in auth.js
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 3s
2026-05-28 18:51:06 -04:00
bruno ffc6dac172 feat: frontend tests — import/export validator + unit tests + CI integration
CI / lint (push) Successful in 14s
CI / security (push) Successful in 11s
CI / test (push) Successful in 17s
CI / build (push) Successful in 2s
- tests/frontend/validate-imports.mjs: 0 errors on 13 modules, 79 exports
  Detects: missing exports, broken imports, const reassignments
- tests/frontend/unit.test.mjs: escapeHtml, state object, module syntax
- Added to CI lint job (runs after Ruff + Mypy)
2026-05-28 18:46:10 -04:00
bruno 2c6c74419c fix: revert _state.allVaults → _allVaults (AdminPanel local property)
CI / lint (push) Successful in 11s
CI / security (push) Successful in 7s
CI / test (push) Successful in 15s
CI / build (push) Successful in 2s
2026-05-28 18:40:00 -04:00
bruno 148b3851ae fix: add missing state. prefix to all bare state variable references across all modules
CI / lint (push) Successful in 15s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 2s
2026-05-28 18:33:39 -04:00
bruno 75fac8256b fix: remove stray }; in ui.js
CI / lint (push) Successful in 12s
CI / security (push) Successful in 7s
CI / test (push) Successful in 17s
CI / build (push) Successful in 2s
2026-05-28 18:29:53 -04:00
bruno 6fd3bb7351 fix: remove duplicate _origInit2 monkey-patch blocks in ui.js
CI / lint (push) Successful in 10s
CI / security (push) Successful in 11s
CI / test (push) Successful in 14s
CI / build (push) Successful in 2s
2026-05-28 18:26:23 -04:00
bruno 004729bdbb fix: remove duplicate FindInPageManager block in ui.js
CI / lint (push) Successful in 10s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 6s
2026-05-28 17:59:41 -04:00
bruno 40c439e1eb fix: complete audit — add missing TabManager, ContextMenuManager, FindInPageManager to ui.js; remove monkey-patch; add all exports
CI / lint (push) Successful in 12s
CI / security (push) Successful in 8s
CI / test (push) Successful in 15s
CI / build (push) Successful in 5s
2026-05-28 17:18:18 -04:00
bruno 58f7173cc3 fix: add missing exports to regenerated ui.js and search.js
CI / lint (push) Successful in 11s
CI / security (push) Successful in 9s
CI / test (push) Successful in 14s
CI / build (push) Successful in 2s
2026-05-28 17:09:10 -04:00
bruno eab6c11dc4 fix: add export to openFile in viewer.js
CI / lint (push) Successful in 18s
CI / security (push) Successful in 7s
CI / test (push) Successful in 15s
CI / build (push) Successful in 6s
2026-05-28 17:05:43 -04:00
bruno 6a55dfd5eb fix: over-aggressive state.xxx replacements on local variables
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 24s
CI / build (push) Successful in 3s
2026-05-28 17:02:27 -04:00
bruno 33cfefcb20 fix: remove duplicate escapeHtml in viewer.js (already imported)
CI / lint (push) Successful in 11s
CI / security (push) Successful in 8s
CI / test (push) Successful in 19s
CI / build (push) Successful in 2s
2026-05-28 16:58:25 -04:00
bruno 7c927ca54e fix: rebuild ui.js, search.js, viewer.js from app.js with shell script (no truncation)
CI / lint (push) Successful in 12s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 3s
2026-05-28 16:54:15 -04:00
bruno 97d14d867a fix: apply state.xxx pattern and exports to regenerated modules
CI / lint (push) Successful in 11s
CI / security (push) Successful in 17s
CI / test (push) Successful in 15s
CI / build (push) Successful in 3s
2026-05-28 16:50:06 -04:00
bruno 6d36b53b3a fix: regenerate corrupted ui.js, search.js, viewer.js from app.js
CI / lint (push) Successful in 12s
CI / security (push) Successful in 8s
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled
2026-05-28 16:49:29 -04:00
bruno a2ff9297ce fix: strip line number prefixes from all JS files
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 18s
CI / build (push) Successful in 2s
2026-05-28 16:46:17 -04:00
bruno deadf1e1ea fix: repair broken import blocks in sync.js and legacy.js
CI / lint (push) Successful in 12s
CI / security (push) Successful in 13s
CI / test (push) Successful in 19s
CI / build (push) Successful in 3s
2026-05-28 16:41:15 -04:00
bruno 643a73e0f5 fix: strip read_file line numbers accidentally injected into JS files
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 3s
2026-05-28 16:40:14 -04:00
bruno 7866f93778 refactor: state.js → mutable object to fix 'assignment to constant' errors
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 6s
ES module imports are read-only live bindings — can't reassign
imported let/const variables. Replace individual 'export let' with
single 'export const state = {...}' mutable object.

All modules updated: import { state } from './state.js'
All state access changed to state.xxx pattern.

Fixes cascade of 'Assignment to constant variable' errors.
2026-05-28 16:34:39 -04:00
bruno 16e0860a69 fix: export RightSidebarManager from ui.js
CI / lint (push) Successful in 13s
CI / security (push) Successful in 9s
CI / test (push) Successful in 16s
CI / build (push) Successful in 3s
2026-05-28 16:20:17 -04:00
bruno 48ab3d2b80 fix: add missing _recentFilesCache and _recentRefreshTimer in config.js
CI / lint (push) Successful in 14s
CI / security (push) Successful in 10s
CI / test (push) Successful in 22s
CI / build (push) Successful in 3s
2026-05-28 16:15:49 -04:00
bruno 60c23e811b fix: add missing safeCreateIcons import in ui.js
CI / lint (push) Successful in 13s
CI / security (push) Successful in 9s
CI / test (push) Successful in 16s
CI / build (push) Successful in 3s
2026-05-28 16:06:40 -04:00
bruno a0768d7a76 fix: remove broken ES module const reassignment (openFile monkey-patch)
CI / lint (push) Successful in 13s
CI / security (push) Successful in 9s
CI / test (push) Successful in 19s
CI / build (push) Successful in 2s
2026-05-28 15:43:31 -04:00
bruno 83a5de2ed2 fix: add missing openFile import in ui.js
CI / lint (push) Successful in 13s
CI / security (push) Successful in 9s
CI / test (push) Successful in 16s
CI / build (push) Successful in 3s
2026-05-28 15:35:35 -04:00
bruno 25cfd7cc56 fix: export DashboardSharedWidget from dashboard.js
CI / lint (push) Successful in 12s
CI / security (push) Successful in 9s
CI / test (push) Successful in 42s
CI / build (push) Successful in 3s
2026-05-28 14:58:42 -04:00
bruno e9e954f36b feat(graph): Phase 4 — Barnes-Hut, cache, lazy loading
CI / lint (push) Successful in 13s
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
CI / security (push) Has been cancelled
Performance optimizations for large vaults:
- Barnes-Hut quadtree repulsion (O(n log n) for >200 nodes)
- Naive O(n²) preserved for small graphs (<200 nodes)
- Graph cache: reuse data when same (vault, path, depth, scope, tag)
- Cache key displayed in info bar: '(cache)' label
2026-05-28 14:52:31 -04:00
bruno 0416266dde feat(graph): Phase 3 — type filter, export PNG, fullscreen, focus node
CI / lint (push) Has started running
CI / test (push) Has been cancelled
CI / security (push) Has been cancelled
CI / build (push) Has been cancelled
- Type filter checkboxes (dossier, .md, autre) in legend
- Export PNG button (canvas.toDataURL)
- Fullscreen button (Fullscreen API)
- Focus node function (center on specific node)
- Filter applied during _draw() to skip hidden nodes
2026-05-28 14:48:31 -04:00
bruno a373279b08 feat(graph): Phase 1+2 — full-vault, tag filter, backlinks, tooltips, depth slider
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / security (push) Has been cancelled
CI / build (push) Has been cancelled
Backend (main.py):
- GraphNode: added tags, incoming_count, outgoing_count
- GraphEdge: added 'backlink' relation
- GraphResponse: added 'scope' field
- api_graph: scope=full|directory, tag= filter, backlinks
- Full-vault tree walk with configurable depth 0-3
- Tag index from in-memory file index for fast filtering
- Incoming/outgoing link count per node

Frontend (graph.js + index.html):
- Theme-adaptive colors via CSS custom properties
- Depth slider (0-3) with live reload
- Full-vault toggle button (🌐 Tout / 📁 Dossier)
- Search input with tag filtering + visual highlighting
- Tooltip on hover (name, path, tags, link counts)
- Backlink edges rendered in red dashed
- Node size proportional to link count
- Larger modal (1000px, 85vh)
2026-05-28 14:46:22 -04:00
bruno 4836d6f1d0 refactor: split app.js (8875 lines) into 12 ES modules
CI / lint (push) Successful in 10s
CI / security (push) Successful in 8s
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled
frontend/js/ structure:
  state.js      (55 lines)  — Shared mutable state, constants
  utils.js      (510 lines) — EXT_ICONS, getFileIcon, escapeHtml, safeCreateIcons
  auth.js       (547 lines) — api(), AuthManager, initLoginForm, AdminPanel
  search.js     (1106 lines)— SearchHistory, QueryParser, Autocomplete, performSearch
  sidebar.js    (1091 lines)— Vault tree, sidebar filter, TagFilterService, loadTags
  viewer.js     (1554 lines)— openFile, Outline, ScrollSpy, Frontmatter, Editor
  ui.js         (2250 lines)— Theme, Toast, Sidebar, Dropdowns, Tabs, ContextMenu
  dashboard.js  (461 lines) — Dashboard widgets (Recent, Stats, Bookmarks)
  config.js     (999 lines) — Config panel, Hidden files, About, Sidebar tabs
  sync.js       (436 lines) — SSE/IndexUpdateManager, PWA registration
  graph.js      (401 lines) — GraphViewManager (force-directed canvas graph)
  legacy.js     (550 lines) — Remaining bridge functions (goHome, showWelcome, initSearch)
  app.js        (80 lines)  — Thin orchestrator: imports all modules, calls init()

index.html: switched from <script src="app.js"> to <script type="module" src="js/app.js">
Original app.js preserved for backward compatibility.
All 14 modules pass node --check syntax validation.
2026-05-28 14:04:50 -04:00
bruno a5afbb1dc1 fix: SSE sync indicator stuck on 'Connexion...' (3 fixes)
1. Move initSyncStatus() AFTER auth check — EventSource was connecting
   before the access_token cookie was available, causing 401 errors.

2. Reconnect SSE after login — Login form handler now calls
   IndexUpdateManager.connect() + showWelcome() after successful auth.

3. SSESafeGZipMiddleware — GZip buffering breaks Server-Sent Events
   streaming. Custom middleware subclass skips compression for
   /api/events endpoint (path-based bypass).
2026-05-27 21:40:32 -04:00
bruno d6cf2a1a7f Remove vault filter dropdown from dashboard 2026-05-27 15:57:59 -04:00
bruno 6e742bfa2c Adjust dashboard tab styling for responsive layout 2026-05-27 15:23:50 -04:00
bruno b5aae2b2fd Reduce dashboard tab padding and font, enlarge icons 2026-05-27 15:09:08 -04:00
bruno b879163052 Refine mobile styles and improve search, sidebar, and layout 2026-05-27 12:55:46 -04:00
bruno a7c719afb1 Prioritize autocomplete dropdown over search results on Enter keypress 2026-05-27 12:25:25 -04:00
bruno fcf134d37e Always show tags section with placeholder or error message 2026-05-27 12:01:23 -04:00
bruno 73593f5e89 Remove duplicate _collectItems call 2026-05-27 11:54:24 -04:00
bruno c3d583177a Handle aborted requests by returning early 2026-05-27 11:51:10 -04:00
bruno 96218f872e Avoid flashing loading state on fast search queries 2026-05-27 11:39:37 -04:00
bruno 56b2a004f9 Show loading state while fetching suggestions 2026-05-27 10:56:44 -04:00
bruno e5b5f2d4f4 Limit search history to 5 items and isolate suggestion fetches 2026-05-27 09:59:35 -04:00
bruno 586acbe9a1 Keep the dropdown hidden after search execution 2026-05-27 09:45:22 -04:00
bruno 0d3de28967 Simplify sidebar tabs, improve saved search display, and refactor
suggestions
2026-05-27 09:27:26 -04:00