Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 3.79 KB

File metadata and controls

55 lines (41 loc) · 3.79 KB

System Audit — 2026-03-07

Backup tag: v2026.03.07-stable at commit b352664 on master


CRITICAL

  • Replace 35 <img> tags with next/image (DetailWayfinder, OfficialCard, FeaturedPromo, D2Footer, GuidePage, D2Home, TeenHub, ImageLightbox) — also added images.remotePatterns to next.config.js
  • Add loading.tsx skeletons for top 10 dynamic routes: content/[id], services/[id], officials/[id], policies/[id], events/[id], organizations/[id], guides/[slug], opportunities/[id], agencies/[id], benefits/[id]
  • Add error.tsx at exchange layout level with branded error UI and retry button — already existed; added nested error.tsx in content/[id], officials/[id], policies/[id], services/[id]
  • Split WayfinderSidebar mega-component (370 lines) into 5 sub-components in sidebar/ directory (ZipPersonalization, SidebarSearch, DiscoverSection, PathwaysGrid, TopicsSection)

HIGH — Backend

  • getWayfinderContext — moved sequential reviewRow query into existing Promise.all batch
  • classify-pending cron — replaced sequential for-loop with parallel Promise.all for all 9 tables
  • Dashboard queries — added RPC-first approach with fallback for getContentByPathway and getContentByCenter
  • Duplicate classifier code — documented sync requirement between Node.js and Deno versions with KEEP IN SYNC warnings
  • No pagination on getOrganizations, getOfficials, getLearningPaths — added optional limit/offset params with backward-compatible defaults
  • Edge function timeout risk — inline classification can exceed 60s in sync functions

HIGH — Frontend

  • Wrap card components in React.memo: ContentCard, ServiceCard, PolicyCard, OfficialCard, LibraryCard, OpportunityCard
  • 333 inline style={{}} objects with runtime color math — migrate to CSS variables or Tailwind config
  • 0 error.tsx boundaries in nested exchange routes — added to content, officials, policies, services
  • InfoBubble: consolidated click-outside and escape-key useEffect hooks into single effect (4 → 3 effects)
  • Hydration mismatches: added typeof document guards in WayfinderSidebar, LanguageContext, ImageLightbox

MEDIUM — Backend

  • Missing request body validation on API routes — added validation guards to intake, ingest, enrich-entity routes
  • Inconsistent timeout patterns across external API calls (sync functions)
  • SELECT * on queries that only need a few columns (various data files)

MEDIUM — Frontend

  • Lucide icons: 49 files importing individually (~3KB each); create icon barrel export or registry
  • TranslatedContentGrid: client-side translation fetch could be server-side
  • OfficialCard / ServiceCard / PolicyCard are near-duplicates (~200 lines redundant); consolidate into EntityCard
  • Code-split DetailWayfinder (540 lines) and WayfinderCircles with React.lazy + Suspense
  • ContentShelf: replaced resize/scroll listeners with ResizeObserver + requestAnimationFrame throttling
  • Translation system: added request deduplication in LanguageContext to prevent duplicate fetches
  • Missing accessibility: added descriptive alt text to org logos/official photos, focus rings on InfoBubble, form labels on ZIP input
  • ShelfBraid content grouping logic — wrapped in useMemo with proper dependencies
  • No virtual scrolling for long lists (TranslatedContentGrid renders all items at once)
  • Missing dynamic OG metadata — added generateMetadata to key detail pages

LOW

  • Scrollbar-hide CSS defined globally but many components use inline equivalents
  • .color-bar-left pseudo-element pattern — removed (unused)
  • Long className strings — adopt clsx or classnames for readability
  • Leaflet z-index overrides — scoped to .map-container class, removed !important