bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Highlight the whole line (and show inline message) on JSON body syntax errors

Open sylv0r opened this issue 4 weeks ago • 6 comments

I have checked the following:

  • [x] I've searched existing issues and found nothing related to my issue.

This feature

  • [ ] Blocks me from using Bruno
  • [x] Would improve my quality of life in Bruno
  • [ ] Is something I've never seen an API client do before

🚀 Describe the feature you want to add, and how it would change your usage of Bruno

When the JSON body has a syntax error, only the line number in the gutter turns red. The error message only appears when you hover over that number. This is very easy to miss, especially in large bodies.

Proposal (similar to Postman):

  • Highlight the whole faulty line (red background or red wavy underline on the token).
  • Optionally show the parse error inline or in a status bar below the editor, without needing to hover.

Related: #594, #1007 (validation exists now, but it is hard to see).

📷 Mockups or Images of the feature

Image

I would like something like :

Image

sylv0r avatar Nov 05 '26 16:11 sylv0r

Hi @sylv0r,

I'd be interested in contributing this improvement. I have experience with React, JavaScript, and frontend development.

I'd like to investigate the existing JSON validation and editor diagnostics, then improve the error visibility with full-line highlighting and an inline message while reusing the existing parser.

Would you be open to a community contribution?

Thanks!

Priyeshshrivastav avatar Nov 05 '26 16:11 Priyeshshrivastav

Hi @Priyeshshrivastav ! Thanks for your interest 🙌

Just to clarify, I'm not a maintainer of Bruno, I only opened the issue, so I can't assign it or approve the approach. That said, I'd personally love to see this implemented, so feel free to go for it!

It's probably worth checking the contributing guidelines (CONTRIBUTING.md) and maybe waiting for a quick 👍 from one of the maintainers on the approach before opening a PR, so your work doesn't go to waste.

Happy to test it once there's a PR!

sylv0r avatar Nov 07 '26 18:11 sylv0r

up cc: @ganesh-bruno

sylv0r avatar Nov 10 '26 14:11 sylv0r

@sylv0r thanks for raising this, and for the mockup, it made the ask clear. We're discussing the approach internally and will update here once we land on something.

@Priyeshshrivastav apologies for the slow reply. We don't have a formal triage or assignment process, so you don't need to wait for a 👍 from us before starting. If something looks like a good fit, go ahead and pick it up.

Heads up that @rohitmore07 has opened #9813 for this one, so this issue is covered. If you're keen on something else, these are a good place to start: https://github.com/usebruno/bruno/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22

Worth a look at [CONTRIBUTING.md] too if you haven't already. Thanks for offering to help.

aditya-bruno avatar Nov 12 '26 10:11 aditya-bruno

Hi @aditya-bruno 👋

#9813 by @rohitmore07 is ready from my side: I tested it locally on Windows and approved it. The whole faulty line is now highlighted in red, and the error message shows on hover.

Whenever you or the team have time, could you take a look? Thanks!

sylv0r avatar Nov 12 '26 15:11 sylv0r

Hi all, thanks for your patience on this one. There’s a PR open for it, #9813, which highlights the whole line when there’s a JSON syntax error.

We’re reviewing it internally alongside other priorities, so we can’t share a timeline just yet. We’ll post an update here as soon as there’s progress.

aditya-bruno avatar Nov 24 '26 15:11 aditya-bruno