Conversation
What was broken F2F schedule rows in the work challenge editor would not reliably accept manual typing in the Hours and Minutes fields. Clearing a value to replace it immediately snapped back to the derived duration state, which blocked manual entry. Root cause PhaseDurationInput treated both controls as fully derived numeric inputs and reparsed them on every keystroke. Temporary empty states could not persist long enough for a user to replace the current value. What was changed Updated PhaseDurationInput to keep local string state while the user edits, sanitize numeric input, and only sync back to the derived duration when a valid value is present. The fields now use text inputs with numeric input mode and restore the last valid derived value on blur when left empty. Any added/updated tests Added PhaseDurationInput.spec.tsx to cover manual replacement of both hours and minutes values. Verified the related challenge schedule specs still pass. The full yarn test:no-watch suite still has existing unrelated failures in src/apps/wallet-admin/src/home/tabs/payments/PaymentsListView.spec.tsx on the current origin/dev baseline.
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 was broken
F2F schedule rows in the work challenge editor would not reliably accept manual typing in the Hours and Minutes fields. Clearing a value to replace it immediately snapped back to the derived duration state, which blocked manual entry.
Root cause
PhaseDurationInput treated both controls as fully derived numeric inputs and reparsed them on every keystroke. Temporary empty states could not persist long enough for a user to replace the current value.
What was changed
Updated PhaseDurationInput to keep local string state while the user edits, sanitize numeric input, and only sync back to the derived duration when a valid value is present. The fields now use text inputs with numeric input mode and restore the last valid derived value on blur when left empty.
Any added/updated tests
Added PhaseDurationInput.spec.tsx to cover manual replacement of both hours and minutes values.
Verified the related challenge schedule specs still pass.
The full yarn test:no-watch suite still has existing unrelated failures in src/apps/wallet-admin/src/home/tabs/payments/PaymentsListView.spec.tsx on the current origin/dev baseline.