From be4fae7d240c2b1a7c3b3133c90790e5cfea005a Mon Sep 17 00:00:00 2001 From: pikann22 Date: Sun, 30 Aug 2026 16:42:29 +0000 Subject: [PATCH 1/2] fix: give locally-scoped JSONBody[T] body types unique names TinyGo's generic-function monomorphization keys plugin.JSONBody[T] instantiations by T's bare type name rather than its full declaration site. updatePanelLayoutForView and previewQuery each declared their own `type body struct{...}` with the same name but unrelated fields (a []panelLayoutEntry slice vs a single Query string) -- TinyGo could collapse them into one shared field layout, so json.Unmarshal would silently decode one call site against the wrong struct. Renamed both to updatePanelLayoutBody / previewQueryBody. The package-level panelBody type (shared intentionally by createPanelForView and updatePanelForView, declared once, not per-handler) was already safe and is untouched. Part of a coordinated fix across all first-party plugins; see Paca-AI/paca#445 and Paca-AI/paca-plugin-github#24 for the full root-cause writeup and verification. --- backend/panels.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/panels.go b/backend/panels.go index 81d2058..fb8aa2d 100644 --- a/backend/panels.go +++ b/backend/panels.go @@ -294,10 +294,10 @@ func (p *dashboardPlugin) updatePanelLayoutForView(req *plugin.Request, res *plu return } - type body struct { + type updatePanelLayoutBody struct { Panels []panelLayoutEntry `json:"panels"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updatePanelLayoutBody](req) if err != nil { res.Error(400, "invalid request body") return @@ -390,10 +390,10 @@ func (p *dashboardPlugin) runPanelQueryForView(req *plugin.Request, res *plugin. // equivalent) — validates and runs a not-yet-saved query so the panel // editor can show a live preview before the user hits Save. func (p *dashboardPlugin) previewQuery(req *plugin.Request, res *plugin.Response, requireProjectScope bool) { - type body struct { + type previewQueryBody struct { Query string `json:"query"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[previewQueryBody](req) if err != nil { res.Error(400, "invalid request body") return From 6aa565b3e66dd3631b6a08171e458501ad34c44b Mon Sep 17 00:00:00 2001 From: pikann22 Date: Sun, 30 Aug 2026 16:50:24 +0000 Subject: [PATCH 2/2] chore: bump patch version in plugin.json --- plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.json b/plugin.json index 8aefb88..9dc6927 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.dashboard", "displayName": "Dashboard", "description": "Customizable panel-based dashboard builder (charts, tables, text) across the project dashboard page, the admin dashboard page, and a single dashboard per Integration-page view (backlog/sprint/timeline).", - "version": "0.3.2", + "version": "0.3.3", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe", "cache"], "backend": {