You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Extracted shared `fetchHtml` and `normalizePhotoUrl` utilities; consolidated duplicate `normalizePhotoUrl` from `multi-platform-comparison.service.ts`
16
18
- Extracted `ensureAncestryLoggedIn` and `extractAncestryPhotoFromPage` helpers to dedupe Ancestry login + srcset logic
@@ -26,5 +28,10 @@
26
28
27
29
- Platform comparison now treats equivalent date formats as matches (e.g., "1979-07-31" vs "31 JUL 1979")
28
30
-`isLegacyFormat` augmentation type guard no longer crashes on string/null input
31
+
- DELETE database route no longer sends success response on error (headers-already-sent crash)
29
32
30
33
## Removed
34
+
35
+
- Socket.IO: removed server (`socket.service.ts`, `socket.io` dep) and client (`socket.ts`, `useSocket.ts` hooks), replaced with synchronous API + existing SSE
36
+
- Dead code: `TreeView` component, `ConnectionLine` component, `batchInsert()` (had SQL injection risk), `getCanonicalDbId()` identity function
Copy file name to clipboardExpand all lines: PLAN.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -531,17 +531,17 @@ Code audit identified DRY/YAGNI/performance issues to address before Phase 16:
531
531
-[ ]**Optimize `buildPersonFromSqlite()`**: Replace 6 sequential queries with JOINs or batched queries
532
532
-[ ]**Add composite DB index**: `vital_event(person_id, place)` for search query performance
533
533
-[ ]**Convert LRUCache class to factory function**: Match project's functional style in `cache.service.ts`
534
-
-[ ]**Add route-level code splitting**: Wrap page components in `React.lazy()` + `Suspense` in `App.tsx` (all pages eagerly imported today)
534
+
-[x]~~**Add route-level code splitting**: Wrap page components in `React.lazy()` + `Suspense` in `App.tsx` (all pages eagerly imported today)~~ (Done: all 19 page components lazy-loaded with Suspense + spinner fallback)
535
535
536
536
#### Dead Code Removal
537
-
-[ ]**Remove Socket.IO service + hooks** (298 lines): `client/src/services/socket.ts` and `client/src/hooks/useSocket.ts` — never imported, all real-time uses SSE
538
-
-[ ]**Remove dead `TreeView` component** (167 lines): `client/src/components/tree/TreeView.tsx` — superseded by `AncestryTreeView`, not referenced
539
-
-[ ]**Remove dead `ConnectionLine` components** (193 lines): `client/src/components/ancestry-tree/ConnectionLine.tsx` — exported but never imported
540
-
-[ ]**Remove dead `batchInsert()`**: Unused function in `sqlite.service.ts` with SQL injection risk (table/column names interpolated)
537
+
-[x]~~**Remove Socket.IO service + hooks**: `client/src/services/socket.ts` and `client/src/hooks/useSocket.ts`, `server/src/services/socket.service.ts` — replaced with synchronous API responses in `database.routes.ts`, removed `socket.io` server dep~~ (Done: converted refresh/calculate-generations to sync endpoints, removed Socket.IO from server + client hooks, cleaned browserSseManager)
538
+
-[x]~~**Remove dead `TreeView` component** (167 lines): `client/src/components/tree/TreeView.tsx` — superseded by `AncestryTreeView`, not referenced~~ (Done)
539
+
-[x]~~**Remove dead `ConnectionLine` components** (193 lines): `client/src/components/ancestry-tree/ConnectionLine.tsx` — exported but never imported~~ (Done)
540
+
-[x]~~**Remove dead `batchInsert()`**: Unused function in `sqlite.service.ts` with SQL injection risk (table/column names interpolated)~~ (Done)
541
541
542
542
#### Cleanup & Security
543
543
-[ ]**Audit legacy migration code**: Determine if `LegacyAugmentation` in `augmentation.service.ts:22-95` is still needed
544
-
-[ ]**Remove identity function**: `getCanonicalDbId()` in `database.service.ts:133-135` just returns its input
544
+
-[x]~~**Remove identity function**: `getCanonicalDbId()` in `database.service.ts:133-135` just returns its input~~ (Done: inlined in favorites.service.ts)
0 commit comments