Skip to content

refactor(cams): centralize the UserTaskState → UI mapping #640

Description

@Zeroupper

Problem

(verified) lib/ui/pages/task_list_page.dart hardcodes a Map<UserTaskState, Icon> (:742-751) plus ~8 scattered state comparisons (e.g., :202-203, :337-339, :434-435); a CAMS enum change degrades silently (missing map entries) rather than failing loudly.

Proposed fix

One exhaustive switch (Dart 3 exhaustiveness gives compile errors on enum drift) in a single presentation mapper used by all task UI.

Acceptance criteria

  • One mapping site
  • Compile-time error if CAMS adds/renames a state

Effort: S · Priority: P2 · Change risk: Low

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions