Skip to content

Backfill unit tests for intelligence/memory components (i18n coverage gap from #1518) #1870

@senamakel

Description

@senamakel

Context

PR #1518 (Chinese i18n) lightly touches ~50 frontend files to add useT() imports and t(...) substitutions. Most flagged "missing" lines in the diff-cover report are in components that had no test files at all before this PR — the i18n PR didn't introduce them, it just made the existing gap visible to the changed-lines coverage gate.

Diff-cover snapshot from the PR (52% on 372 changed lines, 178 missing):

Untested / poorly-tested components flagged

  • app/src/components/intelligence/MemoryHeatmap.tsx (0%)
  • app/src/components/intelligence/MemoryInsights.tsx (0%)
  • app/src/components/intelligence/MemoryGraph.tsx (26%)
  • app/src/components/intelligence/MemoryNavigator.tsx (0%)
  • app/src/components/intelligence/MemoryStatsBar.tsx (0%)
  • app/src/components/intelligence/MemoryResultList.tsx (0%)
  • app/src/components/intelligence/MemoryEmptyPlaceholder.tsx (0%)
  • app/src/components/intelligence/IntelligenceDreamsTab.tsx (0%)
  • app/src/components/intelligence/IntelligenceMemoryTab.tsx (0%)
  • app/src/components/intelligence/ActionableCard.tsx (0%)
  • app/src/components/settings/panels/AgentChatPanel.tsx (0%)
  • app/src/components/settings/panels/AutocompleteDebugPanel.tsx (0%)
  • app/src/components/settings/panels/BillingPanel.tsx (0%)
  • app/src/components/settings/panels/CronJobsPanel.tsx (0%)
  • app/src/components/settings/panels/LocalModelDebugPanel.tsx (0%)
  • app/src/components/settings/panels/MemoryDebugPanel.tsx (0%)
  • app/src/components/settings/panels/MessagingPanel.tsx (0%)
  • app/src/components/settings/panels/NotificationRoutingPanel.tsx (0%)
  • app/src/components/settings/panels/NotificationsPanel.tsx (0%)
  • app/src/components/settings/panels/RecoveryPhrasePanel.tsx (25%)
  • app/src/components/settings/panels/ScreenAwarenessDebugPanel.tsx (0%)
  • app/src/components/settings/panels/ScreenIntelligencePanel.tsx (33%)
  • app/src/components/settings/panels/TeamInvitesPanel.tsx (0%)
  • app/src/components/settings/panels/TeamManagementPanel.tsx (0%)
  • app/src/components/settings/panels/TeamMembersPanel.tsx (0%)
  • app/src/components/settings/panels/TeamPanel.tsx (0%)
  • app/src/components/settings/panels/ToolsPanel.tsx (0%)
  • app/src/components/settings/panels/VoiceDebugPanel.tsx (0%)
  • app/src/components/settings/panels/WebhooksDebugPanel.tsx (0%)
  • app/src/pages/Accounts.tsx (0%)
  • app/src/pages/Conversations.tsx (38%)
  • app/src/pages/Intelligence.tsx (0%)
  • app/src/pages/Invites.tsx (0%)
  • app/src/pages/Notifications.tsx (0%)
  • app/src/pages/Webhooks.tsx (0%)
  • app/src/pages/onboarding/components/BetaBanner.tsx (0%)
  • app/src/pages/onboarding/pages/ChatProviderPage.tsx (0%)
  • app/src/pages/onboarding/steps/ReferralApplyStep.tsx (0%)
  • app/src/components/BootCheckGate/BootCheckGate.tsx (61%)
  • app/src/components/settings/panels/AIPanel.tsx (20%) — upstream rewrite from feat(ai): unified per-workload provider routing + chat-provider factory (#1710) #1858; tests probably already in flight
  • app/src/components/settings/panels/LocalModelPanel.tsx (20%) — deleted in main, leftover from PR base
  • app/src/components/settings/panels/BackendProviderPanel.tsx (100% but deleted upstream)
  • app/src/lib/i18n/I18nContext.tsx (52%) — internal hook paths

Why this isn't fixed in #1518

Authoring real test suites for 30+ untested components (mocks, store wiring, RTL setup per component) is a separate workstream of its own. Bundling it with the i18n PR would push it past reviewable size and entangle two unrelated concerns. The PR's i18n changes themselves are correct; the gate is reporting a pre-existing testing gap.

Suggested approach

Per-component PRs grouped by domain:

  1. Intelligence/Memory tabMemoryHeatmap, MemoryInsights, MemoryGraph, MemoryNavigator, MemoryStatsBar, MemoryResultList, IntelligenceMemoryTab, IntelligenceDreamsTab.
  2. Settings panels (team/billing/notifications)TeamPanel, TeamMembersPanel, TeamInvitesPanel, TeamManagementPanel, BillingPanel, NotificationsPanel, NotificationRoutingPanel, MessagingPanel.
  3. Debug panelsMemoryDebugPanel, VoiceDebugPanel, WebhooksDebugPanel, LocalModelDebugPanel, ScreenAwarenessDebugPanel, AutocompleteDebugPanel.
  4. Top-level pagesAccounts, Conversations, Intelligence, Invites, Notifications, Webhooks.
  5. OnboardingBetaBanner, ChatProviderPage, ReferralApplyStep.

Each PR can target ≥80% on the files it touches and unblock the coverage gate without needing a project-wide test push.

Links

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions