[Designer] #342 UX round 1 — raw enum → 한국어 라벨 + 스트릭 hero

dev v0.4.2 위 hotfix. v0.4.1 단말 테스트에서 발견된 raw 식별자
노출 P0 3 + P1 2.

- ui/labels.dart 신규 — habitTypeLabel(FromDb) / rewardTierLabel.
  domain enum 의 한국어 라벨 단일 지점 (domain layer 분리).
- habit_list 부제: 'build · L3 · …' → '만들기 · …'.
  FrameLevel 노출 제거 (시스템 규약).
- streak: 'T0' / 'T1' raw → '🌱 새싹' / '🥉 3회 도전' …,
  영문 'Never miss twice' → '이틀 연속 빠졌어요. 한 단계 강등됐습니다',
  현재 스트릭을 displayLarge hero 로 위계 강조.
- habit_create 드롭다운: '만들기 (build)' → '만들기'.
- 설계서 docs/design/342-v042-hotfix/README.md — A/B/C 11 AC.
- CHANGELOG v0.4.2 에 UX round 1 섹션 추가.

167 tests passed, analyze clean. APK 재빌드 보류 (사용자 결정).

Refs #342
This commit is contained in:
2026-06-15 15:23:05 +09:00
parent 3b8ea95aa6
commit e81f3e44a4
6 changed files with 196 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ import '../../core/time.dart';
import '../../domain/models/tracker_entry.dart';
import '../../domain/streak/compute_streak.dart';
import '../../state/providers.dart';
import '../labels.dart';
class StreakScreen extends ConsumerWidget {
final String habitId;
@@ -51,25 +52,43 @@ class StreakScreen extends ConsumerWidget {
asOf: nowKst(),
habitStartedAt: habit.startedAt as String,
);
final theme = Theme.of(context);
return Padding(
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(habit.title as String,
style: Theme.of(context).textTheme.titleLarge),
style: theme.textTheme.titleLarge),
const SizedBox(height: 24),
_Row('현재 스트릭', '${state.currentStreak}'),
// Hero — 핵심 동기 지표. 큰 숫자 + 티어 emoji 라벨로 위계 강조.
Center(
child: Column(
children: [
Text(
'${state.currentStreak}',
style: theme.textTheme.displayLarge?.copyWith(
fontWeight: FontWeight.w700,
color: theme.colorScheme.primary,
),
),
Text('일 연속 (현재 스트릭)',
style: theme.textTheme.bodyMedium),
const SizedBox(height: 4),
Text(rewardTierLabel(state.currentTier),
style: theme.textTheme.titleMedium),
],
),
),
const Divider(height: 40),
_Row('최장 스트릭', '${state.longestStreak}'),
_Row('최근 30일 / 완료', '${state.doneCountInWindow30}'),
_Row('Phase 42일 / 완료', '${state.doneCountInPhase42}'),
const Divider(height: 32),
_Row('현재 티어', state.currentTier.dbValue),
if (state.neverMissTwiceBroken)
const Padding(
padding: EdgeInsets.only(top: 12),
child: Text(
'Never miss twice 발동 — 티어 강등',
'이틀 연속 빠졌어요. 한 단계 강등됐습니다.',
style: TextStyle(color: Colors.redAccent),
),
),