mirror of
https://github.com/anand34577/ferrum.git
synced 2026-09-25 11:52:20 +00:00
444f862be9
Saving a dashboard's widget layout rebuilt the stored JSON without a version field, so it was written to the database as an unversioned (v1) layout every time, no matter what version the client actually sent. The next time the dashboard loaded, the client's one-time v1-to-v2 migration (doubling every widget's height and y position for the new row unit) ran again, because the saved layout looked unversioned. Since that migrated result got saved right back the same way, every save-reload cycle doubled each widget's height again - this is what showed up as widgets "randomly" growing or ending up a different size than what was saved. The server now always stamps its own current layout version when saving, instead of depending on the client to round-trip one correctly. Also added minimum/maximum size limits to each widget type so a resize can't be dragged down to an unreadable sliver or blown out to an extreme height by accident, and a regression test for the versioning bug itself.