From 83a0e68d0c1a318e105256050fd518b87c4fe227 Mon Sep 17 00:00:00 2001 From: pikann22 Date: Sun, 30 Aug 2026 16:43:36 +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. createTimeLog, updateTimeLog, and updateTimeLogGlobal each declared their own `type body struct{...}` sharing the same name -- createTimeLog's shape differed from the other two, risking TinyGo collapsing all three into one shared field layout under the wrong struct for at least one call site. Renamed all three to createTimeLogBody / updateTimeLogBody / updateTimeLogGlobalBody so every JSONBody[T] argument is unique within the package -- including the two that happened to share an identical shape already, since that safety was coincidental and fragile to a future edit. 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/timelogs.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/timelogs.go b/backend/timelogs.go index 3908b58..e8166b8 100644 --- a/backend/timelogs.go +++ b/backend/timelogs.go @@ -222,13 +222,13 @@ func (p *timeLoggingPlugin) createTimeLog(req *plugin.Request, res *plugin.Respo return } - type body struct { + type createTimeLogBody struct { SpentDate string `json:"spent_date"` MinutesSpent int `json:"minutes_spent"` Note string `json:"note"` MemberID *string `json:"member_id"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[createTimeLogBody](req) if err != nil { res.Error(400, "invalid request body") return @@ -328,12 +328,12 @@ func (p *timeLoggingPlugin) updateTimeLog(req *plugin.Request, res *plugin.Respo return } - type body struct { + type updateTimeLogBody struct { SpentDate *string `json:"spent_date"` MinutesSpent *int `json:"minutes_spent"` Note *string `json:"note"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateTimeLogBody](req) if err != nil { res.Error(400, "invalid request body") return @@ -486,12 +486,12 @@ func (p *timeLoggingPlugin) updateTimeLogGlobal(req *plugin.Request, res *plugin return } - type body struct { + type updateTimeLogGlobalBody struct { SpentDate *string `json:"spent_date"` MinutesSpent *int `json:"minutes_spent"` Note *string `json:"note"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateTimeLogGlobalBody](req) if err != nil { res.Error(400, "invalid request body") return From c928d5e1744ffc53c46541408834fc4b0bbfad19 Mon Sep 17 00:00:00 2001 From: pikann22 Date: Sun, 30 Aug 2026 16:50:41 +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 ee7b254..6602ed2 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.time-logging", "displayName": "Time Logging", "description": "Lets project members manually log time spent on tasks (date, duration, note) and view per-member totals for a project.", - "version": "0.2.2", + "version": "0.2.3", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe"], "customPermissions": [