commits
Optimization #10:
- created useSettingsStore with zustand persist middleware
- removed SettingsContext.tsx (88 lines) and provider wrapper
- added SSR-safe storage with cross-tab synchronization
- automatic JSON serialization, no manual parse/stringify
- maintained backward-compatible API (useSettings hook)
- bundle size: +2.3KB for zustand library
Optimization #9:
- created atproto.types.ts with proper AT Protocol interfaces
- replaced 7 any types in batch-search-actors.ts
- added ATProtoActor, ATProtoProfile, RankedActor, EnrichedActor types
- improves type safety, compile-time error catching, IDE support
Optimization #8:
- removed 3 duplicate type definitions (atprotoSession, SourceUser, SearchResult)
- import AtprotoSession and SearchResult from central types
- prevents type drift, establishes single source of truth
Optimizations #6 & #7:
- #6: verified early exit optimization already implemented in FollowService
- #7: created validation.utils.ts with Zod schemas for array validation
- replaced 3 duplicate validation blocks with reusable Zod schemas
- updated batch-follow-users, check-follow-status, batch-search-actors
Optimization #10:
- created useSettingsStore with zustand persist middleware
- removed SettingsContext.tsx (88 lines) and provider wrapper
- added SSR-safe storage with cross-tab synchronization
- automatic JSON serialization, no manual parse/stringify
- maintained backward-compatible API (useSettings hook)
- bundle size: +2.3KB for zustand library
Optimizations #6 & #7:
- #6: verified early exit optimization already implemented in FollowService
- #7: created validation.utils.ts with Zod schemas for array validation
- replaced 3 duplicate validation blocks with reusable Zod schemas
- updated batch-follow-users, check-follow-status, batch-search-actors