Skip to content

fix: preserve raw input in typed fields during editing#34

Merged
d12frosted merged 2 commits intomasterfrom
fix/preserve-raw-input
Jan 25, 2026
Merged

fix: preserve raw input in typed fields during editing#34
d12frosted merged 2 commits intomasterfrom
fix/preserve-raw-input

Conversation

@d12frosted
Copy link
Copy Markdown
Owner

Summary

  • Fix UX bug where user input was replaced with parsed values during editing
  • Example: typing "12.8" and backspacing to "12." now shows "12." instead of "12"
  • File paths like "~/data.el" no longer expand to full paths while typing
  • Adds debug logging (via vui-debug) for troubleshooting typed field state

Base automatically changed from feat/extensions-validation to feat/must-exist-validation January 25, 2026 21:16
@d12frosted d12frosted force-pushed the feat/must-exist-validation branch from ff219e8 to bb1e1b4 Compare January 25, 2026 21:16
Base automatically changed from feat/must-exist-validation to master January 25, 2026 21:17
Allows specifying allowed file extensions, e.g., :extensions '("el" "org").
Error message shows allowed extensions when validation fails.
Previously, typed fields would replace user input with parsed values
when the parent component re-rendered. For example, typing "12.8" and
backspacing to "12." would show "12" instead of "12." because the
parsed integer value was synced back to the display.

The fix introduces a two-pronged approach in on-update:
- Track last-prop-value: the last value synced FROM parent props
- Track synced-value: the last typed value from user input

Only sync raw-value when the change is truly external (prop changed
AND doesn't match user's typed value). This preserves raw input like
"12." or "~/data.el" while still allowing external value updates.

Also adds debug logging (enabled via vui-debug) for troubleshooting
typed field state changes.
@d12frosted d12frosted force-pushed the fix/preserve-raw-input branch from 0c3cf19 to c847aa0 Compare January 25, 2026 21:17
@d12frosted d12frosted merged commit 6edfb0b into master Jan 25, 2026
2 checks passed
@d12frosted d12frosted deleted the fix/preserve-raw-input branch January 25, 2026 21:19
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