feat: dual-axis step graph with session editing#5
Merged
Conversation
Replace the thin ActivityTimeline bar on the Activities screen with an interactive dual-axis step graph showing cumulative and per-bucket step counts over the day. Phase 1 — Step graph: - buildStepGraphData() groups SensorWindows into configurable time buckets - StepGraph composable with Canvas-based dual lines, activity region backgrounds, horizontal pan/pinch zoom, tap crosshair with tooltip - BucketSizeSelector chips (1m/5m/15m/30m/1h) - ViewModel extended with SensorWindowRepository and bucket size state Phase 2 — Activity markers: - Thin dashed vertical lines at session boundaries - Tap near a marker shows session detail tooltip (type, range, duration, steps) - highlightedSessionIndex highlights a session region on the graph - Tapping a log row highlights and shows the marker tooltip Phase 3 — Session editing: - ManualSessionOverride Room entity + DAO with MIGRATION_3_4 - mergeSessionOverrides() merges recomputed sessions with manual overrides - SessionEditSheet bottom sheet with zoomed graph, draggable start/end markers, activity type chips, save/cancel/delete - ViewModel CRUD for overrides, 4-flow combine (sessions + windows + overrides + bucketSize) 21 StepGraph tests + 7 MergeSessionOverrides tests + 11 ViewModel tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Room entity and DAO for user-edited activity session overrides, with database migration v3→v4. The mergeSessionOverrides() function combines recomputed sessions with manual overrides at the ViewModel level. SessionEditSheet provides a bottom sheet with a zoomed step graph, draggable start/end boundary markers, and activity type selector chips. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a "Use test data" switch in Settings > Developer (debug only) that replaces real sensor data with generated test data on both the Dashboard and Activities screens. Each date produces a unique pattern using date-seeded randomization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # app/src/main/java/com/podometer/ui/activities/ActivitiesViewModel.kt # app/src/test/java/com/podometer/ui/activities/ActivitiesViewModelTest.kt
Add YAxisLabels composable with nice rounded numbers (niceAxisMax), fix centroid-anchored pinch zoom, use fractional positioning for time labels, and give legend line samples explicit width so they're visible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- niceAxisMax: edge cases (0, negative), 1-2-5 rounding, always >= input - formatAxisLabel: plain numbers, thousands with decimal, 10k+ shorthand - TestDataGenerator: determinism, date variation, invariants (ordering, non-negative steps, chronological sessions), transitions, weekly summaries, cycling sessions, all 7 day types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Test plan
🤖 Generated with Claude Code