♻️ Frontend Refactoring: Safety, UX & Code Quality (50 files) - #32
Merged
Conversation
… couleurs hardcodées)
… showToast, admin.js, log-level, config-row)
…ery polling, meta color-scheme
C1: _esc undefined → escHtml dans notifications.js C2: onchange déplacé de <label> vers <input> (4 toggles) C3: --border-color → --border-card (variable inexistante) H1: static_path → url_for (JS 404) H2: null guard sur llama buttons dans config.js Dead: supprime chat.html.j2, _release-selector.html.j2, components/
logs.css: #666 → --log-text-muted; supprime .log-level-* dupliqués (déjà dans theme.css avec variables CSS dark-mode); .logs-error utilise --color-danger avec color-mix progress-bar.js: #4caf50 → classe .progress-fill.complete + --color-success
- Python: create_repo_router() factory in src/api/v1/base/repo_router.py github.py and spec.py slimmed to ~5 lines each include_outdated_check toggle (False for spec repos) - JS: shared RepoBrowser class in repo-browser.js github.js and sigma-spec.js slimmed to config-only - UX: split Save & Close into separate buttons Save: save selections + trigger scan Close: just close (no scan) - Remove List document button (scan automatic on Save) - Add Index button to GitHub page (group: docs) - Replace alert() in Index with inline button feedback - Fix Qdrant downloader: use .tar.gz for Linux/macOS - Null-safe DOM bindings in _init() - Fix qdrant.js function names (remove _ prefix) - persist() call in save_selected_dirs() - Update tests for new module paths
- Add _isSaving flag to prevent concurrent save clicks - Add fetchWithTimeout helper with 10s AbortController timeout - Replace confirm() with showConfirm() in prompts.js and repo-browser.js - Add auto-refresh for VectorDB status every 30s - Update refactor.md with Phase 1-3 completion status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive frontend refactoring across 50 files with 1885 insertions and 2262 deletions. Focus on save function safety, UX improvements, code organization, and quality fixes.
Key Changes
🔒 Save Function Safety
_isSavingflag to prevent concurrent save clickssaveBackendConfig,saveLoggingConfig,saveBackendServiceConfig⏱️ API Timeout Helper
fetchWithTimeouthelper with 10s AbortController timeout✅ UX Improvements
confirm()with customshowConfirm()inprompts.jsandrepo-browser.js📦 Code Organization
prompts.js,github.js,sigma-spec.js)static/js/external/for libs,static/js/internal/for first-partyrepo_routerfactory from github/spec routers🎨 Style & CSS
logs.cssandprogress-bar.jsbtn,card, etc.)color-scheme: light darkmeta tag🐛 Bug Fixes
admin.js📝 Documentation
Testing
Stats