feat(dashboard): Phase 2 — tabs + data visualization with Swift Charts - #12
Merged
Conversation
Add HourlyWork [24]int field to State struct, with HOURLY_WORK comma-separated serialization in serialize() and a matching parser case in Load(). Includes round-trip and backward-compat tests.
Add HourlyWork [24]int to DayEndSummary, reset the bucket array on daily rollover, and increment the current-hour bucket in tickWork() whenever the user is active.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DashboardApp v2 Phase 2: 탭 네비게이션 + Swift Charts 기반 통계 시각화 추가. 시간대별 작업 데이터(
hourly_work)를 추가하여 히트맵에 활용.Design spec:
docs/superpowers/specs/2026-04-17-dashboard-v2-design.mdImplementation plan:
docs/superpowers/plans/2026-04-17-dashboard-v2-phase2.mdBackend (Go)
DailySummary.HourlyWork [24]int필드 추가 (하위 호환: 기존 JSON에 필드 없어도 zeroed 배열로 파싱)state.State.HourlyWork [24]int필드 + key=value serialize/parse (HOURLY_WORK=v0,v1,...,v23)tickWork(): 시간대별 작업 시간 누적 (time.Unix(unix, 0).Hour()버킷)DayEndSummary.HourlyWork필드로 일일 리셋 시 전달ActionSaveDailyHistory핸들러: 초 → 분 변환하여 히스토리에 저장Frontend (Swift / SwiftUI)
HistoryEntry+parseHistory(from:)+loadHistoryFromDisk()(하위 호환 보장)selectedTab,history상태 +loadHistory()메서드.labelsHidden()로 깔끔하게BarMark) — 축 색상 명시.scrollIndicators(.visible)로 스크롤 가능 표시Test plan
go test ./...— 모든 패키지 통과cd helpers && swift test— 59 tests 통과 (+4 HistoryParser, +2 State, +3 timer)make build— Swift 3 바이너리 + Go CLI 빌드 성공hourly_work)로 차트/히트맵/요약 카드 렌더링 확인~/.break-reminder-history.json하위 호환 (missinghourly_work→ 빈 배열)Known limitations (for Phase 4)
ThemeManager로 도입 예정.primary/.secondary는 적용됨)