feat(ui): allow JSONB insert and adding the collapsable JSON#937
feat(ui): allow JSONB insert and adding the collapsable JSON#937daryllimyt merged 17 commits intoTracecatHQ:mainfrom
Conversation
daryllimyt
left a comment
There was a problem hiding this comment.
Added comments suggesting we reuse the json viewer we've been using all this while. Would be good to have your thoughts here too @topher-lo
|
Agreed on the JSON viewer. Also we should consider only showing prettified JSON if expanded. Otherwise the tables will get too with <5-10 rows and large nested jsons (which is expected for LLM memory and security related logs) |
|
oh sorry, I hadn't noticed you guys were using that. Let me go ahead and make the adjustments |
|
@topher-lo done, the JSON gets prettified very nicely if you choose the Nested option. This is probably some of the best UI/UX I've ever seen for viewing JSONs, this is great! Much better now honestly |
…x/json-table-insert-and-view
…arro01X/tracecat into fix/json-table-insert-and-view
|
Alright there we go, everything is running well on my end. The branch hadn't been updated so running the new/modified tests that are in the CI/CD pipeline wasn't working |
|
Looking good. Just waiting on @daryllimyt for final review |
daryllimyt
left a comment
There was a problem hiding this comment.
Looks good, just a couple of small adjustments
| import { TableViewAction } from "@/components/tables/table-view-action" | ||
| import { TableViewColumnMenu } from "@/components/tables/table-view-column-menu" | ||
| import { JsonViewWithControls } from "../workbench/events/events-selected-action" | ||
| import { TooltipProvider } from "@radix-ui/react-tooltip" |
There was a problem hiding this comment.
Prefer shadcn tooltip over the raw radix one
| import { TooltipProvider } from "@radix-ui/react-tooltip" | |
| import { TooltipProvider } from "@/components/ui/tooltip" |
| import { DataTable } from "@/components/data-table" | ||
| import { TableViewAction } from "@/components/tables/table-view-action" | ||
| import { TableViewColumnMenu } from "@/components/tables/table-view-column-menu" | ||
| import { JsonViewWithControls } from "../workbench/events/events-selected-action" |
There was a problem hiding this comment.
Could we:
- Move
JsonViewWithControlsinto a separate file under/components/json-viewer.tsx - Import it in thie file and in
/workbench/events/events-selected-actionusing its absolute path prefixed with @ i.e.@/components/json-viewer.tsx
…arro01X/tracecat into fix/json-table-insert-and-view
There was a problem hiding this comment.
LGTM 🚢 ! Just some linter errors and it's good to go. Great work @Jarro01X !

Checklist
uv run pytest tests)?pre-commit run --all-files)?Description
Adding a fix that makes it possible to add JSONB to tables, and the ability to collapse or retract items longer then 15 lines
Related Issues
Fixes #931
Screenshots
See comments below
Steps to QA