Skip to content

Conversation

@AmandaBalderas20
Copy link

Changes
Added validation for JSONPath syntax in the Preview Modal.
When a user enters an invalid JSONPath expression, instead of showing a browser alert, an inline red error message now appears below the input.
This prevents invalid JSONPath expressions from being stored in localStorage, which previously caused UI reload errors and 404 responses.

Things to focus on
Please verify that:

  • Invalid JSONPath inputs correctly trigger the red “Invalid JSONPath syntax” message.
  • No browser alerts or console errors appear.
  • Valid JSONPath expressions are saved and loaded correctly after reload.

How Has This Been Tested?

  • Manually (please, describe, if necessary)
    • Steps:
      1. Open Topics → Messages → Preview.
      2. Enter:
        • Field: assignment
        • Json path: @.name=".*odometer.*" (invalid)
      3. Confirm red message “Invalid JSONPath syntax” appears.
      4. Enter valid JSONPath: $.members[*].client_id → saves correctly.
      5. Reload page — no 404 or console errors.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings (e.g. Sonar is happy)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

@AmandaBalderas20 AmandaBalderas20 requested a review from a team as a code owner November 1, 2025 05:04
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Nov 1, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi AmandaBalderas20! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@Haarolean
Copy link
Member

Hi @AmandaBalderas20, thanks for a contribution. Could you please share a screen recording and/or a screenshot demonstrating the things changed? This would speed up the review, thanks!

@AmandaBalderas20
Copy link
Author

Hi! Here’s the screen recording showing the fix in action. Let me know if you’d like me to include anything else!
https://github.com/user-attachments/assets/5b3df985-1404-46d7-8331-6ca0dfd2db3a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants