Skip to content

Fix: slider logs with default value can't be saved#133

Merged
mapgie merged 1 commit into
mainfrom
claude/slider-default-value-logging-8jq8zq
Jun 10, 2026
Merged

Fix: slider logs with default value can't be saved#133
mapgie merged 1 commit into
mainfrom
claude/slider-default-value-logging-8jq8zq

Conversation

@mapgie

@mapgie mapgie commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • A slider tracker entry shows numericMin as its default value, but LogCategoryViewModel.numericValue stays null until the user drags the slider.
  • save() treated numericValue == null as "nothing to save" and returned early, so tapping Save without touching the slider silently did nothing.
  • Now falls back to category.numericMin (the value already shown to the user) when numericValue is null.

Changes

  • LogCategoryViewModel.kt: fix the early-return in save() for numeric_slider
  • Version bump to 0.47.2-beta.1 (versionCode 102) + changelog entry
  • LESSONS.md: added a transferable lesson about null "not yet interacted" state vs. save validation

Test plan

  • Open a slider tracker item, don't touch the slider, tap Save - entry should be saved with the default (min) value
  • Move the slider and save - existing behaviour unchanged
  • Edit an existing slider log - existing behaviour unchanged

Generated by Claude Code

Previously, save() returned early when numericValue was null, which is
the state for a freshly opened slider entry even though the slider UI
already shows numericMin as the displayed value. Fall back to
category.numericMin so the displayed default is what gets saved.

https://claude.ai/code/session_01TFJgN6FrGieSumycWapWA7
@mapgie mapgie marked this pull request as ready for review June 10, 2026 17:10
@mapgie mapgie merged commit 14e959f into main Jun 10, 2026
4 checks passed
@mapgie mapgie deleted the claude/slider-default-value-logging-8jq8zq branch June 10, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants