LocalAI/core/http/react-ui
LocalAI [bot] a39e025d64
fix(nodes): make per-node backend install async via gallery job queue (#9928)
* feat(galleryop): add TargetNodeID to ManagementOp for single-node installs

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* feat(galleryop): add NodeScopedKey helpers for per-node opcache rows

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* refactor(galleryop): use strings.Cut for NodeScopedKey parsing, reject empty nodeID

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* feat(nodes): scope DistributedBackendManager.InstallBackend to single node via TargetNodeID

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* feat(http): make /api/nodes/:id/backends/install async via gallery service job queue

The handler previously called unloader.InstallBackend synchronously and
blocked the browser for up to 3 minutes waiting on the NATS reply. It now
enqueues a TargetNodeID-scoped ManagementOp on BackendGalleryChannel and
returns HTTP 202 + jobID immediately, matching /api/backends/install/:id.

The opcache key is built via NodeScopedKey(nodeID, backend) so concurrent
installs of the same backend across different nodes do not stomp each
other. galleryService/opcache/appConfig are threaded through
RegisterNodeAdminRoutes for this.

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* refactor(http): log malformed backend_galleries override and stop test drain goroutine

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* feat(api): expose nodeID for node-scoped backend ops in /api/operations

Node-scoped backend installs land in opcache under "node:<nodeID>:<backend>"
keys. Without splitting that prefix back out, the operations panel renders
the full key as the display name and has no structured way to label which
worker an install is targeting. Detect the prefix, surface nodeID as its own
response field, and reduce the display name back to the bare backend slug.
Bare (non-scoped) ops are left untouched so legacy installs do not gain a
misleading empty nodeID.

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* feat(react-ui): poll job status for node-targeted backend installs

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* fix(react-ui): make NodeInstallPicker state updates pure and surface cancellations as errors

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* refactor(react-ui): clarify async semantics in handleInstallOnTarget

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* refactor(http): use statusUrl casing for node install response to match codebase precedent

Assisted-by: Claude:opus-4-7 [Edit] [Bash]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-05-21 22:25:53 +02:00
..
e2e fix(react-ui/chat): stop wiping selection on every /api/operations poll (#9904) (#9917) 2026-05-21 12:17:51 +02:00
public/locales feat(usage): track and visualise usage per API key (#9920) 2026-05-21 16:34:02 +02:00
scripts feat(react-ui): add multilingual (i18n) support (#9642) 2026-05-02 22:42:08 +02:00
src fix(nodes): make per-node backend install async via gallery job queue (#9928) 2026-05-21 22:25:53 +02:00
bun.lock chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
eslint.config.js feat(ui): move to React for frontend (#8772) 2026-03-05 21:47:12 +01:00
i18next-parser.config.js feat(react-ui): add multilingual (i18n) support (#9642) 2026-05-02 22:42:08 +02:00
index.html chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
package-lock.json chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates (#9728) 2026-05-12 09:54:38 +02:00
package.json chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
playwright.config.js feat(ui, gallery): Show model backends and add searchable model/backend selector (#9060) 2026-03-18 21:14:41 +01:00
vite.config.js fix(ui): fix /app redirect 2026-03-05 21:43:46 +00:00