Replace budget chip picker with a 5min-3hr slider - #2
Merged
Merged
Conversation
DURATION_OPTIONS-style fixed chips (5/10/15/30) capped the daily budget at 30 minutes and only offered 4 discrete values. Replaced with a Slider spanning 5 minutes to 3 hours in 5-minute steps, with the label auto-switching units past the hour mark (30M, 1H, 1H30M) instead of ever showing raw minutes like 90M.
The budget picked here is exactly what the roast overlay measures a session against later, so the copy under the slider now previews that escalation live as the user drags: short and mild at low minutes, louder/punchier/redder past the hour mark, up to a THREE HOURS callout at the top of the range.
Replaces the single-line-per-range copy with 5 tiers (5-25min, 30-55min, 1h-1h55m, 2h-2h55m, 3h), each holding several lines that get picked at random. _AppRow is now stateful so the chosen line stays stable while the user drags within one tier, and only re-rolls when the slider crosses into a new tier — avoids the line flickering on every 5-minute step.
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
Replaces the fixed 5/10/15/30-minute chip picker for
WatchedAppEntity.budgetMin(app picker / manage-apps screen) with aSlider:30M,1H,1H30M— never a raw value like90Monce hours read better.5M…3H) so the range is clear at a glance.SliderTheme(ink track/thumb, yellow value-indicator text) to match the existing Bonked visual language rather than the Material default.Changes
app/lib/src/onboarding/app_picker_screen.dart:_budgetOptionschip list and thebudgetOptionsprop threaded through_AppRow._formatBudget()(minute→label formatting) and the_kBudgetMinMinutes/_kBudgetMaxMinutes/_kBudgetStepMinutesconstants._AppRownow renders aSlider(wrapped inSliderTheme) instead of the chip row, with a label above showing the live-selected value and min/max labels below the track.No native/Kotlin changes —
budgetMinis still a plainIntend to end (Room entity, Pigeon DTO), so nothing downstream needed touching.Test plan
5Mat the low end, switches to1Hat 60, and shows1H30Metc. in between; confirm the saved budget round-trips correctly (re-open the screen, value persists).flutter analyze/build in this environment (no Flutter SDK available) — reviewed the diff manually for correctness.https://claude.ai/code/session_01APiUERJLZddCPpd8gJ94R4
Generated by Claude Code