console icon indicating copy to clipboard operation
console copied to clipboard

Advanced edit doesn't show JSON strings correctly in TablesDB UI (upd - any strings with commas)

Open algusarov opened this issue 2 months ago • 1 comments

👟 Reproduction steps

After migrating self-hosted from 1.7.* to 1.8.0 and so new UI for TablesDB in the Console, I see a bug for when a column contains a JSON string.

UPD: confirmed that the bug is also present in current Cloud version (and no need to have complicated JSON like below - just create new string array, then input "hello" as first item and "world1, world2" as 2nd item of the array - after reopening advanced edit from spreadsheet view, there will be 3 array items in the UI).

I have a table with a Array of String type:

Image

Each string represent a JSON which nests an array of objects, see an example of one value from the field (one item of the Array):

{"items":[{"type":"image", "bucketId":"media_prod", "fileId":"694a5f8b658134a2ddcb", "thumbId":"ebd27ce5-066a-4860-a191-71dcf7556bf4"}]}, {"items":[{"type":"image", "bucketId":"media_prod", "fileId":"694abae824651d505806", "thumbId":"afdd2fad-8f76-4f1d-b8d1-ddb3cef72ea8"}, {"type":"image", "bucketId":"media_prod", "fileId":"694abae8246866fb58cc", "thumbId":"0889a3b5-ba33-4cfc-bf1c-dd82c8d51fe2"}, {"type":"image", "bucketId":"media_prod", "fileId":"694abae8246a8681cb07", "thumbId":"256a0550-3c8d-4a4d-8c06-cd77bda46ff4"}, {"type":"image", "bucketId":"media_prod", "fileId":"694abae8246b5ed7c869", "thumbId":"fbfa2a25-aa1f-4adb-bdd6-5bbd88d6940c"}, {"type":"image", "bucketId":"media_prod", "fileId":"694abae8246c14d27146", "thumbId":"b48b64f3-c7f2-4aa1-816d-6746d02f7d28"}]}, {"items":[{"type":"image", "bucketId":"media_prod", "fileId":"694ad94728cef2cf10ce", "thumbId":"67fa0a29-ba1e-4046-9baf-33fd9f542cea"}]}

(I do this to keep links of media files in Storage and their relationship with database entries)

Now, when I use console's advanced edit functionality, by clicking Advanced edit here:

Image

It looks like it tries to parse the JSON string stored in the field to the effect below:

Image

Before introducing new Console with TablesUI, the values have been displayed normally (as a full JSON string per item of an array).

👍 Expected behavior

It should show items of the array (as Column is of array type), each showing full JSON string stored in the DB.

👎 Actual Behavior

It splits the JSON strings and displays it as separate fields, which doesn't allow to edit the values or to copy the full value from the Console.

🎲 Appwrite version

Version 1.8.x

💻 Operating system

Linux

👀 Have you spent some time to check if this issue has been raised before?

  • [x] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

algusarov avatar Dec 25 '25 21:12 algusarov