Skip to content

[Feature][Medium] Reduce technical debt: 81 untyped any usages, 23+ TODO/FIXME markers, and low test file coverage #3385

Closed

Description

@numbers-official

Summary

Three categories of accumulated technical debt that impact maintainability, type safety, and code quality:

1. Excessive any type usage (81 occurrences)

81 instances of : any, as any, or <any> in production TypeScript files. This undermines TypeScript's type safety and allows runtime type errors to slip through undetected.

High-priority files (security-sensitive code with any):

  • src/app/shared/pipes/safe-resource-url/safe-resource-url.pipe.ts:10 — pipe input typed as any
  • src/app/shared/preference-manager/preferences/capacitor-storage-preferences/capacitor-storage-preferences.ts:10 — BehaviorSubject
  • src/app/shared/collector/signature/capture-app-web-crypto-api-signature-provider/capture-app-web-crypto-api-signature-provider.service.ts:29 — idFor(source: any)

2. TODO/FIXME/WORKAROUND markers (23+ occurrences)

23+ unresolved TODO, FIXME, HACK, and WORKAROUND comments across the codebase, including:

  • src/app/features/home/custom-camera/custom-camera.page.ts:260 — FIXME: report _error to crashlytics
  • src/app/shared/collector/collector.service.ts:34-35 — FIXME and TODO for parameter refactoring
  • src/app/shared/in-app-store/in-app-store.service.ts:256 — TODO: report to remote error service
  • src/app/shared/dia-backend/auth/dia-backend-auth.service.ts:82 — TODO: remove this method (migration code)
  • Multiple WORKAROUND markers without linked resolution plans

3. Test file coverage gap

  • 125 spec files vs 236 source files = ~53% file coverage
  • Critical paths like wallet transfers, crypto key management, and auth flows need more thorough testing

Impact

  • any types bypass compile-time checks, allowing bugs in security-sensitive code
  • Unresolved TODOs indicate deferred decisions that may cause future issues
  • Low test coverage increases regression risk during refactoring

Suggested Approach

  1. Enable noImplicitAny in tsconfig.json and progressively fix violations
  2. Triage TODO/FIXME markers: convert actionable items to GitHub issues, remove stale ones
  3. Add integration tests for critical paths: auth flow, wallet operations, proof upload pipeline
  4. Consider setting a test coverage threshold (e.g., 70%) in CI

Generated by Health Monitor with Omni

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions