Skip to content

feat(lora): hide denied LoRAs from the Library tile#121

Open
gioelecerati wants to merge 1 commit into
mainfrom
gio/feat/lora-visibility-filter
Open

feat(lora): hide denied LoRAs from the Library tile#121
gioelecerati wants to merge 1 commit into
mainfrom
gio/feat/lora-visibility-filter

Conversation

@gioelecerati
Copy link
Copy Markdown
Collaborator

The pod image holds every LoRA and /api/loras lists them all, so the Library tile shows everything. This adds a client-side filter that honors an admin-maintained global denylist.

Changes

  • listLoras.ts — new listHiddenLoras(): fetches the app-origin /api/loras/hidden (a Vercel route backed by the orchestrator — the denylist is global, not per-pod). Fail-open: any error yields an empty set, so a broken visibility service never blanks the Library.
  • LibraryTile.tsx — fetches the hidden set alongside the catalog; drops hidden LoRAs from the rendered catalog before the scale-compat filter (so the "N hidden" footer keeps counting scale mismatches only). Also force-disables any hidden LoRA the session currently has enabled — hiding is both a Library removal and a kill for in-flight use. The force-disable effect is keyed on the enabled set too, so a hidden LoRA the seed auto-enables is caught on the next tick.

Companion

The orchestrator endpoints, Vercel routes (/api/loras/hidden etc.) and the admin "LoRA visibility" panel ship in demon-public-demo (PR: gio/feat/admin-lora-visibility). This DEMON PR must merge + sync-ui before the filter is live.

🤖 Generated with Claude Code

The pod image holds every LoRA and /api/loras lists them all. This adds
a client-side filter so an admin-maintained denylist (served globally by
the webapp at /api/loras/hidden, backed by the orchestrator) is honored.

- listLoras.ts: new listHiddenLoras() — fetches the app-origin
  /api/loras/hidden route (NOT the pod; the denylist is global, not
  per-pod). Fail-open: any error yields an empty set so a broken
  visibility service never blanks the Library.
- LibraryTile.tsx: fetch the hidden set alongside the catalog; drop
  hidden LoRAs from the rendered catalog before the scale-compat filter
  (so the "N hidden" footer still counts scale mismatches only). Also
  force-disable any hidden LoRA the session currently has enabled —
  hiding is both a Library removal and a kill for in-flight use. The
  force-disable effect is keyed on the enabled set too, so a hidden
  LoRA that the seed auto-enables is caught on the next tick.

Companion to the orchestrator + admin-UI changes in demon-public-demo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gioelecerati gioelecerati changed the title feat(lora): hide admin-denied LoRAs from the Library tile feat(lora): hide denied LoRAs from the Library tile May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant