Background
TypeScript compilation is currently failing in CI with approximately 20+ errors across multiple files. These are pre-existing issues that accumulated over time and are now blocking CI pipeline success.
Current Impact
- ❌ Frontend CI failing
- ❌ TypeScript Code Quality checks failing
- ⚠️ Development experience degraded (type safety not working)
- ✅ Application still functions correctly (runtime not affected)
Issues Identified
1. Missing Redux Actions
Files affected: RulesExplorer.tsx
error TS2304: Cannot find name 'fetchRules'
error TS2304: Cannot find name 'fetchRuleDetails'
error TS2304: Cannot find name 'fetchRuleDependencies'
error TS2304: Cannot find name 'exportRules'
Root Cause: Redux slice actions not properly imported or defined
2. SearchRequest Interface Incomplete
Files affected: ruleService.ts
error TS2339: Property 'platform' does not exist on type 'SearchRequest'
error TS2339: Property 'severity' does not exist on type 'SearchRequest'
error TS2339: Property 'category' does not exist on type 'SearchRequest'
error TS2339: Property 'framework' does not exist on type 'SearchRequest'
Root Cause: SearchRequest interface definition missing filter properties
3. Type Mismatches in Components
Files affected: ScanProgressDialog.tsx, AddHost.tsx, RulesExplorer.tsx
error TS7009: 'new' expression, whose target lacks a construct signature
error TS2322: Type incompatibility between component props
error TS2345: Argument type mismatch
Root Cause: Component props and state types not properly aligned
4. Auth Headers Type Issue
Files affected: useAuthHeaders.ts
error TS2411: Property 'Authorization' of type 'string | undefined' is not assignable to 'string' index type
Root Cause: Optional Authorization header not handled correctly in type definition
Recommended Fix Approach
Phase 1: Critical Types (Priority: High)
- Fix Redux action imports in RulesExplorer
- Complete SearchRequest interface definition
- Fix useAuthHeaders type safety
Estimated Effort: 2-3 hours
Phase 2: Component Type Fixes (Priority: Medium)
- Fix ScanProgressDialog constructor types
- Fix AddHost RadioGroup props
- Fix RulesExplorer action button types
Estimated Effort: 3-4 hours
Phase 3: Comprehensive Type Safety (Priority: Low)
- Enable strict TypeScript mode
- Add missing type definitions
- Fix all remaining type errors
Estimated Effort: 1-2 days
Files Requiring Attention
frontend/src/components/rules/RulesExplorer.tsx
frontend/src/services/ruleService.ts
frontend/src/hooks/useAuthHeaders.ts
frontend/src/components/host-groups/ScanProgressDialog.tsx
frontend/src/pages/hosts/AddHost.tsx
Success Criteria
Related
Priority
Medium - Doesn't block current functionality but degrades code quality and CI reliability.
Created as follow-up to PR #74 merge.
Background
TypeScript compilation is currently failing in CI with approximately 20+ errors across multiple files. These are pre-existing issues that accumulated over time and are now blocking CI pipeline success.
Current Impact
Issues Identified
1. Missing Redux Actions
Files affected:
RulesExplorer.tsxRoot Cause: Redux slice actions not properly imported or defined
2. SearchRequest Interface Incomplete
Files affected:
ruleService.tsRoot Cause: SearchRequest interface definition missing filter properties
3. Type Mismatches in Components
Files affected:
ScanProgressDialog.tsx,AddHost.tsx,RulesExplorer.tsxRoot Cause: Component props and state types not properly aligned
4. Auth Headers Type Issue
Files affected:
useAuthHeaders.tsRoot Cause: Optional Authorization header not handled correctly in type definition
Recommended Fix Approach
Phase 1: Critical Types (Priority: High)
Estimated Effort: 2-3 hours
Phase 2: Component Type Fixes (Priority: Medium)
Estimated Effort: 3-4 hours
Phase 3: Comprehensive Type Safety (Priority: Low)
Estimated Effort: 1-2 days
Files Requiring Attention
frontend/src/components/rules/RulesExplorer.tsxfrontend/src/services/ruleService.tsfrontend/src/hooks/useAuthHeaders.tsfrontend/src/components/host-groups/ScanProgressDialog.tsxfrontend/src/pages/hosts/AddHost.tsxSuccess Criteria
npx tsc --noEmitpasses with 0 errorsRelated
Priority
Medium - Doesn't block current functionality but degrades code quality and CI reliability.
Created as follow-up to PR #74 merge.