-
-
Notifications
You must be signed in to change notification settings - Fork 650
Open
Description
bandicam.2025-12-26.15-33-04-334.mp4
Description
The "Advanced matching" checkbox in the Uptime Monitor editing page gets automatically unchecked when users type in the "Expected value" field. Additionally, after saving data and reloading the page, the checkbox remains unchecked even when expectedValue or jsonPath fields contain data.
Steps to Reproduce
- Navigate to Uptime Monitor creation/editing page (
/uptime/createor/uptime/configure/:id) - Select monitor type as "http"
- Check the "Advanced matching" checkbox
- Start typing in the "Expected value" field
- Observe that the checkbox gets unchecked immediately
Alternative scenario:
- Create/edit a monitor with advanced matching enabled
- Fill in
expectedValueorjsonPathfields - Save the monitor
- Reload the page
- Observe that the "Advanced matching" checkbox is unchecked despite having data in the fields
Expected Behavior
- The "Advanced matching" checkbox should remain checked when typing in the "Expected value" or "JSON Path" fields
- After saving and reloading, if
matchMethod,expectedValue, orjsonPathcontains data, the checkbox should be automatically checked
Actual Behavior
- The checkbox gets unchecked immediately when typing in "Expected value" field
- After reloading, the checkbox remains unchecked even when advanced matching fields contain data
Root Cause
The useEffect hook that manages the checkbox state was watching the entire monitor object, causing it to re-run on every keystroke. Additionally, it only checked for monitor.matchMethod existence, ignoring expectedValue and jsonPath fields.
Proposed Solution
- Update the
useEffectdependency array to only watchmonitor.matchMethod,monitor.expectedValue, andmonitor.jsonPathinstead of the entiremonitorobject - Modify the condition to check for any of the three fields (
matchMethod,expectedValue, orjsonPath) instead of justmatchMethod - Add logic in the
onChangehandler to automatically check the checkbox when users type inexpectedValueorjsonPathfields
Environment
- Checkmate version: 3.2.0
- Browser: [Any]
- OS: [Any]
Additional Context
This issue affects the user experience when configuring HTTP monitors with advanced matching rules, as users need to manually re-check the checkbox every time they type in the expected value field.
Metadata
Metadata
Assignees
Labels
No labels