Hz_
d0d0339428
fix(go): agent settings update clearing DSL ( #16495 )
...
### Summary
This PR fixes a Go backend bug where updating agent settings, such as
description, could clear the agent DSL.
Root cause:
PUT /api/v1/agents/:canvas_id only bound the dsl field in Go. When the
frontend submitted settings without dsl, the service still updated the
canvas with an empty DSL value.
Changes:
- Treat agent updates as partial patches.
- Preserve existing DSL when dsl is not present in the request.
- Update only specified user_canvas fields instead of saving the full
row.
- Add a regression test for settings updates preserving DSL.
Test:
`go test ./internal/service ./internal/handler`
Co-authored-by: Zhichang Yu <yuzhichang@gmail.com >
2026-07-02 13:41:24 +08:00
..
2026-06-12 22:58:28 +08:00
2026-06-12 22:58:28 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-07-02 13:41:24 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-07-02 13:41:24 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-06-30 16:28:48 +08:00
2026-06-30 16:28:48 +08:00
2026-06-30 16:28:48 +08:00
2026-06-29 09:45:16 +08:00
2026-07-02 13:41:24 +08:00
2026-06-24 16:50:40 +08:00
2026-06-29 09:45:16 +08:00
2026-06-30 16:28:48 +08:00
2026-06-30 16:28:48 +08:00
2026-06-30 16:28:48 +08:00
2026-06-22 18:16:15 +08:00
2026-06-22 18:16:15 +08:00
2026-07-01 13:17:16 +08:00
2026-07-02 10:33:27 +08:00
2026-07-02 10:33:27 +08:00
2026-07-01 13:17:16 +08:00
2026-07-01 15:52:52 +08:00
2026-07-02 12:07:19 +08:00
2026-07-02 12:07:19 +08:00
2026-03-27 19:25:18 +08:00
2026-06-30 18:10:36 +08:00
2026-06-30 18:10:36 +08:00
2026-06-24 14:42:10 +08:00
2026-06-24 17:05:58 +08:00
2026-06-24 17:05:58 +08:00
2026-06-25 13:32:22 +08:00
2026-06-25 13:32:22 +08:00
2026-06-29 09:45:16 +08:00
2026-06-10 11:07:45 +08:00
2026-07-02 12:35:10 +08:00
2026-07-02 12:35:10 +08:00
2026-06-12 16:09:10 +08:00
2026-06-12 16:09:10 +08:00
2026-06-29 09:45:16 +08:00
2026-06-29 09:45:16 +08:00
2026-06-12 16:09:10 +08:00
2026-06-12 16:09:10 +08:00
2026-06-25 19:25:55 +08:00
2026-06-25 19:25:55 +08:00
2026-06-03 17:35:36 +08:00
2026-07-02 09:45:01 +08:00
2026-06-18 11:09:22 +08:00
2026-06-29 09:45:16 +08:00
2026-06-10 21:27:35 +08:00
2026-06-26 19:21:52 +08:00
2026-07-01 13:17:16 +08:00
2026-06-26 15:36:01 +08:00
2026-06-29 09:45:16 +08:00
2026-06-18 18:07:27 +08:00
2026-06-18 18:07:27 +08:00
2026-06-08 11:53:19 +08:00
2026-06-08 11:53:19 +08:00
2026-06-18 17:56:51 +08:00
2026-06-29 17:03:26 +08:00
2026-07-01 13:17:16 +08:00
2026-06-22 18:17:37 +08:00
2026-07-01 13:17:16 +08:00
2026-07-01 13:17:16 +08:00
2026-06-12 18:18:55 +08:00
2026-05-29 19:32:21 +08:00
2026-06-12 20:49:34 +08:00
2026-06-12 20:49:34 +08:00
2026-06-26 13:51:56 +08:00
2026-06-29 09:45:16 +08:00
2026-06-15 14:44:16 +08:00