carp-dk / carp-dk/carp_study_app

refactor(cams): centralize the UserTaskState → UI mapping

Open
#640 0 comments 0 reactions 1 assignee Claimed by @Zeroupper View on GitHub
Dominant language
Dart
Stars
10
Forks
5
Avg merge
1d 3h
Merged PRs (30d)
14

Description

## Problem
(verified) `lib/ui/pages/task_list_page.dart` hardcodes a `Map` (: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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.