Skip to content

chore: remove dead and non-functional code #181

Description

Summary

Remove verified dead modules and visible admin controls that do not perform any action. This is the first focused cleanup from the repository simplification audit.

Scope

  • Delete unused UI code with no repository call sites:
    • resolveVarConcatChar in ui/src/util/api.js
    • ImageLayerInfoModal.jsx
    • Home/DisasterEvents.jsx
    • HelpDocs/HelpDocsPrevNext.jsx (also calls an undefined navigate if mounted)
  • Remove the New Base Model and New Source Type buttons and their duplicate modal files. Both dialogs contain uncontrolled inputs and a Submit button with no handler, validation, or API call.
  • Remove the Base Model Edit/Remove and Source Type Edit/Remove menu items, which likewise have no handlers. Preserve Source Type mobile View/Hide Info behavior.
  • Remove direct UI dependency d3 and ui/public/assets/geo/world.geojson; their only consumer is the deleted DisasterEvents. Keep the separate country-boundary asset used by live forms.
  • Remove import-time sys.path.append(...) from hastegeo.core.models, processors, data_layer, and utils. Repository-wide AST search found no bare sibling imports that rely on them.

Acceptance criteria

  • Repository-wide searches find no remaining code references to deleted modules, helper, dependency, or asset.
  • Admin Base Models and Source Types retain list/sort behavior and Source Type responsive info; non-functional create/edit/remove controls are gone.
  • Importing modules from all four hastegeo.core packages works without sys.path mutation.
  • UI production build and all discovered UI tests pass.
  • Targeted Python import/tests pass.
  • No replacement abstraction is added for code that is simply dead.

Out of scope

  • Implementing base-model or source-type creation/edit/removal.
  • Broader lint, formatting, or UI refactors.
  • Other findings from REPOSITORY_SIMPLIFICATION_AUDIT.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions