Skip to content

sql: render "record" composite columns with the JSON tree viewer [UX-1330]#2533

Open
c-julin wants to merge 8 commits into
masterfrom
ux-1330-sql-record-type-label
Open

sql: render "record" composite columns with the JSON tree viewer [UX-1330]#2533
c-julin wants to merge 8 commits into
masterfrom
ux-1330-sql-record-type-label

Conversation

@c-julin

@c-julin c-julin commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

The SQL backend is changing the column type label for composite (struct) columns from json/json[] to record/record[]. This updates the frontend renderer to recognize the new labels.

columnKindForPgType now maps record/record[] to the existing json display kind, so composite cells keep the nested JSON tree viewer and the catalog tree / cell popover surface the accurate record label instead of json.

Why

Labeling these columns json led Postgres users to try JSON arrow operators (->, ->>), which the engine rejects — composite columns are accessed with (col).field. The record label stops implying unsupported JSON semantics. Cell values are still rendered as JSON for readability; only the type label changes.

image

Paired change

Backend counterpart (must land together): redpanda-data/console-enterprise#803

Tests

vitest run on sql-types.test.ts + catalog-tree.test.tsx — 33 passed.

UX-1330

…1330]

The backend now labels composite (struct) columns "record"/"record[]"
instead of "json"/"json[]". Map those type strings to the json display
kind so composite cells keep the nested JSON tree viewer and the catalog
tree/cell popover show the "record" label.
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

🚨 Registry drift detected

App: frontend · Scope: diff vs origin/master · Files: 6

Count
⚠️ Outdated registry components 6
🛠 Locally-modified components 1
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0
Components needing attention
Status Component Uses Detail
⚠️ outdated alert installed 1.11.1 → latest 2.1.1
⚠️ outdated badge installed 1.11.1 → latest 2.1.1
⚠️ outdated button installed 1.11.1 → latest 2.1.1
⚠️ outdated empty installed 1.11.1 → latest 2.1.1
⚠️ outdated kbd installed 1.11.1 → latest 2.1.1
🛠 locally-modified popover no tagged release matches installed bytes
⚠️ outdated resizable installed 1.11.1 → latest 2.1.1

Refresh command:

bunx shadcn@latest add @redpanda/alert @redpanda/badge @redpanda/button @redpanda/empty @redpanda/kbd @redpanda/resizable --overwrite

Generated by lookout audit-changes.

The backend now appends an actionable hint after a blank line. Split it
off the error message and render it in the existing styled hint slot
below the alert, instead of inline in the message body.
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

Successfully merging this pull request may close these issues.

2 participants