Files
TimandGitHub 41a84f681c refactor(web): migrate Hypernative to v3 feature architecture pattern (#7060)
* refactor(hypernative): migrate to v3 feature architecture

Migrate the Hypernative feature to the v3 feature architecture pattern
with lazy loading, feature contracts, and proper public API boundaries.

Key changes:
- Create feature handle with contract.ts, feature.ts, and index.ts
- Add lazy-loaded components: HypernativeLogo, HypernativeTooltip,
  HnAnalysisGroupCard, HnCustomChecksCard, HnInfoCard
- Export hooks directly from index.ts (useHypernativeOAuth,
  useIsHypernativeEligible, useHypernativeAuth)
- Move HypernativeCustomChecks from safe-shield to hypernative as
  HnCustomChecksCard
- Move HypernativeInfo from safe-shield to hypernative as HnInfoCard
- Create HnAnalysisGroupCard wrapper with Hypernative branding footer
- Update all consumers to use useLoadFeature(HypernativeFeature)
- Make AnalysisGroupCard generic with optional footer prop
- Update test mocks to support useLoadFeature and useHasFeature

Components accessing hypernative feature now use the proxy pattern:
  const hn = useLoadFeature(HypernativeFeature)
  <hn.HnInfoCard ... />

This enables code splitting and reduces initial bundle size by
lazy-loading Hypernative code only when the feature flag is enabled.

* docs: add hypernative v3 migration specification

Add comprehensive specification documents for migrating the Hypernative feature to the v3 feature architecture pattern.

* fix: storybook tests

* refactor: rename useQueueAssessment to useHnQueueAssessment

* refactor: remove unused exports from public API

* refactor: consolidate imports to use public API

* fix: gate all assessment requests behind feature flag

Ensure Hypernative assessment requests are only sent when the HYPERNATIVE
feature flag is enabled:
- Queue batch assessments (QueueAssessmentProvider)
- Queue transaction assessment visibility (useShowHypernativeAssessment)
- Single transaction threat analysis (useThreatAnalysis, useNestedThreatAnalysis)

When the feature is disabled, the system falls back to Blockaid analysis.

* chore: trigger CI pipeline

* chore: trigger CI pipeline

* refactor: update import paths to use relative paths in Hypernative components and hooks
2026-01-30 10:07:06 +01:00
..