picoclaw/web/backend
SiYue-ZO ef002d9a5d fix: ensure dm_scope and dimensions stay in sync across all config paths
The reviewer identified two bugs in the original PR:

1. PATCH /api/config leaves session.dimensions stale: LoadConfig()
   derives dimensions from the old dm_scope, and the merge carries
   those stale dimensions forward. ApplyDmScope() then exits early
   because dimensions is already populated, causing a mismatch between
   dm_scope (new) and dimensions (old).

2. Legacy/default configs omit dm_scope in GET response: configs with
   explicit dimensions but no dm_scope (including DefaultConfig) return
   no dm_scope field, causing the frontend to fall back to its default
   ('per-channel-peer'), which may not match the actual dimensions.

Fix:
- Add DeriveDmScope() to reverse-map known dimensions arrays to
  dm_scope when dm_scope is empty.
- Call it in LoadConfig(), PUT handler, PATCH handler, and
  ResetToDefaults() for consistent normalization.
- In PATCH handler, clear stale dimensions from the merge result when
  the patch contains session.dm_scope but not session.dimensions,
  allowing ApplyDmScope() to re-derive from the new scope.
- Add comprehensive unit tests for DeriveDmScope() and scope
  transition scenarios.
2026-06-11 16:12:48 +08:00
..
api fix: ensure dm_scope and dimensions stay in sync across all config paths 2026-06-11 16:12:48 +08:00
dashboardauth fix(launcher): fall back to token auth on unsupported platforms (#2466) 2026-04-10 11:12:54 +08:00
dist feat(web): add agent management UI and improve launcher integration (#1358) 2026-03-11 18:37:00 +08:00
launcherconfig refactor(web): switch dashboard auth from tokens to passwords (#2608) 2026-04-21 18:04:15 +08:00
middleware refactor(web): switch dashboard auth from tokens to passwords (#2608) 2026-04-21 18:04:15 +08:00
model feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
utils fix(launcher): refine console host display 2026-04-14 14:04:37 +08:00
winres feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
.gitignore feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
app_runtime.go fix(web): address latest Copilot review points 2026-04-14 23:39:59 +08:00
embed.go feat(web): implement macOS app feature and file logger (#1723) 2026-03-18 14:43:58 +08:00
embed_test.go feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
i18n.go feat(launcher): standard HTTP login/setup/logout flow for dashboard, frontend and backend impl. and fix windows pid lock for ws (#2339) 2026-04-08 21:43:51 +08:00
icon.ico feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
icon.png add systray ui for all platform (#1649) 2026-03-17 14:12:32 +08:00
main.go Keep launcher locale changes from mutating shared web-search routing (#2573) 2026-04-24 13:45:25 +08:00
main_test.go refactor(web): switch dashboard auth from tokens to passwords (#2608) 2026-04-21 18:04:15 +08:00
systray.go build: address PR review — fix Android launcher flags, systray tag, rename target 2026-04-12 18:50:52 +08:00
systray_icon_nonwindows.go refactor(web): clean up systray platform build files 2026-03-25 11:44:57 +08:00
systray_icon_windows.go refactor(web): clean up systray platform build files 2026-03-25 11:44:57 +08:00
systray_stub_nocgo.go build: add Android arm64 cross-compile support 2026-04-12 17:41:10 +08:00