docs: update HISTORY, FUTURE, DEVELOPMENT_LOG for v0.22.0
This commit is contained in:
parent
d67fe6e61d
commit
5c35b20c00
|
|
@ -6,6 +6,38 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### v0.22.0 — React Query Migration
|
||||||
|
**Status:** ✅ COMPLETED
|
||||||
|
**Date:** 2026-05-10
|
||||||
|
**Priority:** MEDIUM
|
||||||
|
|
||||||
|
| Agent | Status | Time | Notes |
|
||||||
|
|-------|--------|------|-------|
|
||||||
|
| Neo | ❌ FAILED | 2s | Rate-limited, partial work only (installed deps, started TrackerPage migration) |
|
||||||
|
| Ripley | ✅ COMPLETED | — | Completed React Query migration, fixed error handling, version bump |
|
||||||
|
| Bishop | ✅ COMPLETED | 2m57s | 8/8 PASS |
|
||||||
|
| Hudson | ✅ COMPLETED | 26s | 4/5 PASS (1 FAIL fixed: error handling toast duplication) |
|
||||||
|
|
||||||
|
**Files modified:** `client/App.jsx`, `client/hooks/useQueries.js` (new), `client/pages/TrackerPage.jsx`, `package.json`, `package-lock.json`
|
||||||
|
|
||||||
|
**Work Completed:**
|
||||||
|
- [x] Installed @tanstack/react-query + @tanstack/react-query-devtools
|
||||||
|
- [x] Created custom hooks: useTracker, useBills, useCategories
|
||||||
|
- [x] Migrated TrackerPage from useState/useEffect to useTracker() hook
|
||||||
|
- [x] Added QueryClientProvider with sensible defaults
|
||||||
|
- [x] Added ReactQueryDevtools for development
|
||||||
|
- [x] Fixed load→refetch callback references
|
||||||
|
- [x] Fixed error handling: useRef pattern prevents duplicate toasts
|
||||||
|
|
||||||
|
**Security Audit (Hudson):**
|
||||||
|
1. Query key injection: ✅ PASS — safe numeric params
|
||||||
|
2. DevTools exposure: ✅ PASS — only API data, dev-only
|
||||||
|
3. Refetch callback safety: ✅ PASS — no uncontrolled loops
|
||||||
|
4. Error handling: ❌ FAIL → ✅ FIXED — useRef pattern prevents duplicate toasts
|
||||||
|
5. Cache configuration: ⚠️ INFO — long cache acceptable for UX
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### v0.21.0 — 3-Month Trend Indicator
|
### v0.21.0 — 3-Month Trend Indicator
|
||||||
**Status:** 🔄 IN PROGRESS
|
**Status:** 🔄 IN PROGRESS
|
||||||
**Date:** 2026-05-10
|
**Date:** 2026-05-10
|
||||||
|
|
|
||||||
25
FUTURE.md
25
FUTURE.md
|
|
@ -3,7 +3,7 @@
|
||||||
**This document tracks potential future enhancements for Bill Tracker.**
|
**This document tracks potential future enhancements for Bill Tracker.**
|
||||||
|
|
||||||
**Last Updated:** 2026-05-10
|
**Last Updated:** 2026-05-10
|
||||||
**Current Version:** v0.21.1
|
**Current Version:** v0.22.0
|
||||||
|
|
||||||
## How to Use This Document
|
## How to Use This Document
|
||||||
|
|
||||||
|
|
@ -39,29 +39,6 @@ Items are grouped under their priority section heading (`## 🔴 CRITICAL`, `##
|
||||||
|
|
||||||
### 🟡 MEDIUM
|
### 🟡 MEDIUM
|
||||||
|
|
||||||
### Add React Query (TanStack Query) for server state management
|
|
||||||
**Priority:** MEDIUM
|
|
||||||
**Added:** 2026-05-08 by Scarlett
|
|
||||||
|
|
||||||
**Description:**
|
|
||||||
Currently using manual `useState`/`useEffect` patterns with custom `api` wrapper for data fetching. This leads to duplicated loading/error handling, stale data issues, and no request caching.
|
|
||||||
|
|
||||||
**Rationale:**
|
|
||||||
Developer experience and performance. React Query provides:
|
|
||||||
- Automatic request caching and stale-while-revalidate
|
|
||||||
- Background refetching
|
|
||||||
- Optimistic updates
|
|
||||||
- Request deduplication
|
|
||||||
- Built-in loading/error states
|
|
||||||
|
|
||||||
**Implementation Notes:**
|
|
||||||
- Replace manual API calls in pages with `useQuery`, `useMutation`
|
|
||||||
- Add query keys for cache invalidation
|
|
||||||
- Implement global query client with React Query DevTools
|
|
||||||
- Gradual migration: start with TrackerPage, then BillsPage, then AnalyticsPage
|
|
||||||
- Files likely to be modified: `client/pages/*.jsx`, add `client/hooks/useQueryClient.js`
|
|
||||||
- Estimated effort: 4-6 hours for full migration
|
|
||||||
|
|
||||||
### Architecture: Business Logic Mixed with Route Handlers
|
### Architecture: Business Logic Mixed with Route Handlers
|
||||||
**Priority:** MEDIUM
|
**Priority:** MEDIUM
|
||||||
**Added:** 2026-05-08 by Neo
|
**Added:** 2026-05-08 by Neo
|
||||||
|
|
|
||||||
13
HISTORY.md
13
HISTORY.md
|
|
@ -1,5 +1,18 @@
|
||||||
# Bill Tracker — Changelog
|
# Bill Tracker — Changelog
|
||||||
|
|
||||||
|
## v0.22.0
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **React Query Migration** — TrackerPage now uses TanStack Query (useQuery) for data fetching with caching, stale-while-revalidate, and auto-refetch
|
||||||
|
- **Custom Query Hooks** — `useTracker()`, `useBills()`, `useCategories()` in `client/hooks/useQueries.js`
|
||||||
|
- **Query DevTools** — React Query DevTools available in development mode
|
||||||
|
- **QueryClientProvider** — Global config with 2min staleTime, 1 retry, refetchOnWindowFocus disabled
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- TrackerPage: replaced manual `useState`/`useEffect` with `useTracker()` hook
|
||||||
|
- `load()` callback replaced by `refetch()` from React Query
|
||||||
|
- Error handling: `useEffect` + `useRef` pattern prevents duplicate toast notifications
|
||||||
|
|
||||||
## v0.21.1
|
## v0.21.1
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue