fix: pool profiles never auto-switch on connect; seed empty profile from current pool

Connecting a Pool Profile no longer overwrites the pool's pool_id. The pool is
switched only when the user actively selects a profile in the dropdown; picking
an empty profile while a pool with images is connected offers to copy those
images into it (new seed_profile op + /grid_pool/profiles/seed route), so the
current pool is never silently lost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 20:14:44 +02:00
parent 0215bcb8f3
commit 10c2ea6d60
4 changed files with 117 additions and 37 deletions
+7
View File
@@ -47,6 +47,13 @@ async def _duplicate(request):
return web.json_response(e)
@routes.post("/grid_pool/profiles/seed")
async def _seed(request):
body = await request.json()
n = profiles.seed_profile(_base(), body["from"], body["id"])
return web.json_response({"copied": n})
@routes.get("/grid_pool/profiles/export")
async def _export(request):
pid = request.query["id"]