Repository navigation
Feature/entry flow pool touches - Grand bain entry flow: scan sheet and length counter - #168
Merged
SalimMc merged 3 commits intoOct 30, 2026
Conversation
Convert metres to whole lengths of a 25 m or 50 m pool, step the distance one length at a time within the limits, and keep the number of lengths when the pool length changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The distance can now be counted in lengths of a 25 m or 50 m pool, between two lane ropes; the metres field stays the source of truth. The welcome check sits in spreading ripples, and the screen scrolls so the keyboard never hides Save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Accepted button moves into a sheet under the pass that asks the question and explains that a declined scan just means scanning again. Co-Authored-By: Claude Opus 5.5 <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.
What
Part of the "Grand bain" redesign, covering the entry flow from the scan to logging the swim. There are three commits, one per change.
1. Count a swim in pool lengths (
model/swim/SwimDistance.kt)Pure functions, no UI:
POOL_LENGTHS_METERS = listOf(25, 50).metersToLengths(meters, poolLength): the number of whole lengths, ornullwhen the metres are not a whole number of lengths (or nothing was swum).stepLengths(meters, poolLength, delta): adds or removes lengths.MAX_SWIM_DISTANCE_METERS.changePoolLength(meters, from, to): keeps the number of lengths when the user switches pool length.2. Pool stay screen (
ui/poolstay/PoolStayScreen.kt)LENGTHS_COUNT,LENGTHS_PLUS,LENGTHS_MINUS;poolLength(m).3. Scan confirmation sheet (
ui/subscription/SubscriptionQuickViewScreen.kt)CONFIRM_SHEET) under the pass. The sheet shows:New shared drawing (
ui/theme/)Ripples.kt: concentric rings that spread out once, with outer rings starting later (rippleRadius).LaneRope.kt: a cord with capsule floats, red near both walls (RED_FLOATS_AT_WALLS = 3) and blue/white between (laneFloatColor).Tests
SwimDistanceTest: whole lengths and thenullcases; stepping, rounding down and limits; rejecting a pool length of 0; keeping lengths across pool sizes and the edge cases where the distance is kept.PoolStayScreenTest:SubscriptionQuickViewScreenTest: the sheet shows the question and the declined-scan hint.RipplesTest,LaneRopeTest: ring radii and float colors../gradlew testDebugUnitTest --tests '*.ui.theme.*' --tests '*.ui.poolstay.*' --tests '*.ui.subscription.SubscriptionQuickView*' --tests '*.model.swim.*'andktfmtCheckpass. The full./gradlew checkwas not run on this branch; CI runs it.How to review
🤖 Generated with Claude Code