Skip to content

fix(settings): repair keep-warm minutes input UX#127

Merged
quiet-node merged 2 commits intomainfrom
worktree-dreamy-meandering-clock
May 4, 2026
Merged

fix(settings): repair keep-warm minutes input UX#127
quiet-node merged 2 commits intomainfrom
worktree-dreamy-meandering-clock

Conversation

@quiet-node
Copy link
Copy Markdown
Owner

Summary

  • Fix inability to clear a single-digit value and retype: add rawMin string state that allows empty intermediate values while inactivityMin (the debounced-save driver) stays numeric
  • Fix out-of-bounds values not reflecting in the UI: clamp rawMin immediately on onChange so the display always matches what is saved
  • Fix empty-field blur defaulting to previous value instead of 0: onBlur now resolves empty input to 0
  • Fix input width clipping 3+ digit values: 32px48px
  • Fix resync clobbering in-progress edits: minFocusedRef guards setRawMin in the resync block so a mid-debounce onSaved callback cannot reset the field while the user is typing

Test plan

  • Type a value and verify config.toml auto-saves within ~250ms
  • Clear all digits; input goes empty; blur → shows 0 and saves 0
  • Type a value over 1440 (e.g. 9999); input immediately clamps to 1440
  • Type a value below -1 (e.g. -99); input immediately clamps to -1
  • Delete digits quickly; no ghost digit reappears mid-edit
  • bun run test:all:coverage passes

quiet-node added 2 commits May 4, 2026 12:27
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node quiet-node merged commit 38b506c into main May 4, 2026
3 checks passed
@quiet-node quiet-node deleted the worktree-dreamy-meandering-clock branch May 4, 2026 18:05
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.

1 participant