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-29 20:07:12 +08:00
2026-07-02 09:45:01 +08:00
2026-06-29 09:45:16 +08:00
2026-06-12 14:56:44 +08:00
2026-06-30 16:28:48 +08:00
2026-06-22 11:58:29 +08:00
2026-07-02 09:45:01 +08:00
2026-07-02 13:41:24 +08:00
2026-07-02 13:41:24 +08:00
2026-06-24 16:50:40 +08:00
2026-07-01 20:10:42 +08:00
2026-07-01 20:10:42 +08:00
2026-06-30 16:28:48 +08:00
2026-07-02 09:45:01 +08:00
2026-06-29 09:45:16 +08:00
2026-06-22 11:58:29 +08:00
2026-06-22 11:58:29 +08:00
2026-06-22 18:16:15 +08:00
2026-06-22 18:16:15 +08:00
2026-06-22 18:16:52 +08:00
2026-06-18 18:07:27 +08:00
2026-07-02 09:45:01 +08:00
2026-06-29 19:04:59 +08:00
2026-07-02 10:33:27 +08:00
2026-07-02 10:33:27 +08:00
2026-07-02 12:06:29 +08:00
2026-06-09 22:48:50 +08:00
2026-06-25 14:15:29 +08:00
2026-06-09 22:48:50 +08:00
2026-06-18 18:07:27 +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 14:47:55 +08:00
2026-06-10 09:57:11 +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-18 17:57:24 +08:00
2026-06-24 19:08:56 +08:00
2026-07-02 09:45:01 +08:00
2026-06-29 09:45:16 +08:00
2026-07-02 12:35:10 +08:00
2026-06-25 13:36:49 +08:00
2026-07-02 12:35:10 +08:00
2026-06-05 11:42:23 +08:00
2026-06-25 13:36:49 +08:00
2026-06-15 11:19:56 +08:00
2026-06-24 14:52:47 +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-18 18:07:27 +08:00
2026-05-29 10:08:55 +08:00
2026-06-25 19:25:55 +08:00
2026-06-25 19:25:55 +08:00
2026-06-29 09:45:16 +08:00
2026-06-03 20:55:53 +08:00
2026-06-08 11:49:37 +08:00
2026-06-08 11:49:37 +08:00
2026-06-18 11:09:22 +08:00
2026-06-18 11:09:22 +08:00
2026-06-26 19:21:52 +08:00
2026-06-26 19:21:52 +08:00
2026-06-25 19:07:34 +08:00
2026-06-26 19:21:52 +08:00
2026-06-10 11:07:45 +08:00
2026-06-18 18:07:27 +08:00
2026-06-24 14:52:47 +08:00
2026-07-01 13:17:16 +08:00
2026-06-18 17:56:51 +08:00
2026-07-02 10:34:36 +08:00
2026-07-01 19:33:18 +08:00
2026-06-18 18:07:27 +08:00
2026-07-01 15:52:52 +08:00
2026-06-08 11:53:19 +08:00
2026-07-01 13:17:16 +08:00
2026-07-01 13:17:16 +08:00
2026-06-22 18:17:37 +08:00
2026-06-29 20:07:12 +08:00
2026-05-19 17:34:59 +08:00
2026-05-19 17:34:59 +08:00
2026-06-12 18:18:55 +08:00
2026-05-29 19:32:21 +08:00
2026-05-28 13:30:22 +08:00
2026-06-26 13:51:56 +08:00
2026-06-18 18:07:27 +08:00
2026-06-25 13:36:49 +08:00
2026-06-29 09:45:16 +08:00
2026-06-22 19:03:36 +08:00
2026-07-01 15:52:52 +08:00
2026-07-01 15:52:52 +08:00
2026-06-18 18:07:27 +08:00
2026-06-18 18:07:27 +08:00
2026-06-22 18:17:37 +08:00
2026-07-01 19:33:18 +08:00