Repository navigation
fix(settings): show an inline error when the default coverage field is empty - #634
Merged
Merged
Conversation
Contributor
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 6 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 68 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Comment |
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.
Closes #522
State on main (3413591): the propagation half is fixed by #538 (changed coverage wins over stale service rows, settings.ts saveGlobalSettings, defaultCoverageChanged), and save-time rejection of an empty global coverage is in place (settings.ts:3495-3496, tested at settings.test.ts 'an empty global coverage field is rejected instead of saving 0'). The plans.ts:1345 reference in the issue is stale (that line is now deletePlanAction, no coverage code).
Still present: the issue's acceptance asks for an inline error. wireInlineRangeValidation (settings.ts check()) treats an empty value as valid and hides the error, so the field shows no indication until Save.
Fix: new
requiredoption on wireInlineRangeValidation; an empty value is invalid when set. Enabled only for setting-default-coverage; other fields keep the empty-clears-error behavior. Message is the existing range message, same as the save toast wording.Tests (settings.test.ts, inline range validation block): empty coverage on input shows aria-invalid and the visible error; empty notification-days stays clean. On main the first fails because check() returns early on raw === '' (read step by step; jest cannot run offline here, CI is the authority).
Decision: required is opt-in rather than changing the default, to leave other fields unchanged.