Skip to content

dashboard UI shows invalid paths with curly braces and truncation #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
viktorasm opened this issue Mar 16, 2025 · 2 comments
Open

dashboard UI shows invalid paths with curly braces and truncation #627

viktorasm opened this issue Mar 16, 2025 · 2 comments

Comments

@viktorasm
Copy link

viktorasm commented Mar 16, 2025

In dashboard UI, for some reason, there is some random replacements of ] to }, and weird truncation at the end of the line.

Image

I've tried a quick local hack and this seems to work:

-				rows = append(rows, strings.ReplaceAll(violation.Path, "]", "}"))
+				rows = append(rows, violation.Path+" ")
Image

..the space helps with the truncation issue, and not sure what was the purpose for the curly brace replacements.

@viktorasm viktorasm changed the title UI shows invalid paths dashboard UI shows invalid paths with curly braces and truncation Mar 16, 2025
@LasneF
Copy link

LasneF commented Mar 17, 2025

would you be able to do a pull request ,this will check if all unit test are passing , if so, it looks legitimate
usually { } are more for path parameters in text here [] seems nicer / better

@daveshanley
Copy link
Owner

The reason this exists, is because the TUI (terminal UI) library used by vacuum requires font colors to be defined by enclosing square brackets. This completely conflicts with the JSON path, so as a workaround I replaced with braces.

I don't think the issue has been resolved in the upstream library, so I am amazed this works. I will look into it a little deeper.

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

No branches or pull requests

3 participants