diff --git a/CHANGELOG.md b/CHANGELOG.md index 08440fa..1823f54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,180 +1,5 @@ # Changelog -## 1.0.3 - 2025-11-07 - -### Added -- **Modular Entry Orchestrator and Feature Modules** - - Added a lean ES module entry orchestrator `index.js` that initializes auth and feature modules after `authStateReady`. - - Created feature-specific modules to prepare deconstruction of the monolith while preserving identical behavior: - - `warrantyListController.js` (list loading/filtering/rendering controller surface) - - `tagManager.js` (tag management: load/render/create/update/delete) - - `addWarrantyForm.js` (multi-step add warranty wizard surface) - - Wired pages to load the new module entry with `` alongside legacy `script.js` for zero-regression rollout. - - _Files: `frontend/js/index.js`, `frontend/js/controllers/warrantyListController.js`, `frontend/js/components/tagManager.js`, `frontend/js/components/addWarrantyForm.js`, `frontend/index.html`, `frontend/about.html`, `frontend/status.html`, `frontend/register.html`, `frontend/reset-password.html`, `frontend/reset-password-request.html`_ - -- **Centralized Authentication Service** - - New module `authService.js` exposes `initAuth`, `login`, `logout`, `getToken`, `getCurrentUser`, `isAuthenticated`. - - Backwards compatibility: attaches a `window.auth` facade so existing code continues to work. - - Handles header UI state, user menu/settings dropdown toggling, and dispatches a unified `authStateReady` event. - - Robustly hides “Create Account” UI when registration is disabled (with a MutationObserver to keep it hidden after other scripts mutate the DOM). - - _Files: `frontend/js/services/authService.js`, `frontend/*.html` (module includes)_ - -- **Dedicated API Service** - - New `apiService.js` provides a `baseRequest` wrapper that injects the `Authorization` header and normalizes error handling. - - Exposes named helpers (e.g., `getWarranties`, `updateWarranty`, `deleteWarranty`, `getStatistics`, `savePreferences`) and a `window.api` shim for non-module scripts. - - Safe global `fetch` shim adds the Authorization header for `/api/...` calls when missing. - - _Files: `frontend/js/services/apiService.js`, `frontend/*.html` (module includes)_ - - - **Central State Management Store** - - Introduced a `store.js` module to act as a single source of truth for application data (warranties, filters, loading states), eliminating scattered global variables. - - UI updates are now driven by custom events, creating a predictable data flow. - - _Files: `frontend/js/store.js`_ - -- **Component-Based UI Modules** - - Created a suite of new, reusable UI component modules to replace HTML string concatenation. Each is responsible for building a specific part of the UI via safe DOM manipulation. - - Modules include: `warrantyCard.js`, `tag.js`, `modals.js`, `editModal.js`, `claims.js`, `notes.js`, `paperless.js`, and `ui.js`. - - _Files: `frontend/js/components/*`_ - -- **HTML `