yorkie-team / dashboard

Dashboard is an administrative tool that allows users to manage projects and documents with ease.
https://yorkie.dev/dashboard/
Apache License 2.0
20 stars 13 forks source link

Bug where attributes set in Tree are not displayed in the dashboard #128

Closed hackerwins closed 1 year ago

hackerwins commented 1 year ago

Description:

There is a bug where attributes set in Tree are not displayed in the dashboard.

Dashboard retrieves detailed information about a document by calling the GetDocument API from the server. It is suspected that attributes might be missing in the snapshot generated by the server.

Dashboard: https://github.com/yorkie-team/dashboard/blob/d32345e157ad639b5b1b789525d52bd61714885d/src/features/documents/DocumentDetail.tsx#L36-L39

Server: https://github.com/yorkie-team/yorkie/blob/525cacf2747f53187e41fd495e41f1b26e0a5d4e/server/rpc/admin_server.go#L209-L233

Why:

krapie commented 1 year ago

I think this is because codes for marshalling tree attributes are missing in Marshal() in crdt.Tree.

https://github.com/yorkie-team/yorkie/blob/525cacf2747f53187e41fd495e41f1b26e0a5d4e/pkg/document/crdt/tree.go#L286

(And GetDocummentSummary() uses Marshal() for creating snapshot).