Skip to content

PM-4814: fix manual phase duration entry#1715

Merged
jmgasper merged 1 commit intodevfrom
PM-4814
Apr 10, 2026
Merged

PM-4814: fix manual phase duration entry#1715
jmgasper merged 1 commit intodevfrom
PM-4814

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 10, 2026

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.


Open with Devin

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.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 10, 2026 04:37
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@jmgasper jmgasper merged commit c761d30 into dev Apr 10, 2026
9 checks passed
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