Skip to content

In-place provider editor + in-UI copy dialogs - #2

Merged
e3ndr merged 6 commits into
mainfrom
ash/provider-editor-ui
Aug 30, 2026
Merged

e3ndr merged 6 commits into
mainfrom
ash/provider-editor-ui

Conversation

@e3ndr

@e3ndr e3ndr commented Aug 30, 2026

Copy link
Copy Markdown
Owner

In-place provider editor + in-UI copy dialogs (work order: ash/provider-editor-ui)

What

  • Backend (RouteProviders): PATCH /api/providers/:id = remove the existing reference + re-insert the updated provider (no provider code touched for edits; Providers.create re-sanitizes the config via serializeConfig). 404 on unknown id, 400 on invalid JSON/type. The list API (GET /api/providers) now also returns url + apiKey (only when present) so the editor can prefill.
  • UI (Svelte 5):
    • New minimal modal system: Modal.svelte (backdrop click + Escape close, a11y roles) and CopyModal.svelte (read-only field + Copy via navigator.clipboard with a legacy fallback for non-secure http contexts).
    • InferenceProviderEditor.svelte: prefilled in-place editor (type / pool / url / api key). The id field is read-only — model aliases and in-flight state reference it.
    • InferenceProviderCard gains an Edit button; the page holds editingProvider state and re-renders the provider list after save.
    • Both window.prompt() copy dialogs (API key create, model alias copy) are now in-UI CopyModals.

Verification

  • mvn package green (Svelte build included); svelte-check 0 errors / 0 warnings.
  • Dev loop: jar (fresh build) + dummy OLLAMA provider pointed at a mock backend + vite dev + chromium — full flows exercised: editor prefill, edit + save round-trip (card re-render), both copy modals incl. the clipboard "Copied" toggle. Screenshot composite DM'd.

Branch base: main @ bb2bf8a. (Concurrency fields are on ash/pool-concurrency / PR #1 — not on this branch by design.)

~Ash

@e3ndr
e3ndr merged commit e5c6d32 into main Aug 30, 2026
2 checks passed
@e3ndr
e3ndr deleted the ash/provider-editor-ui branch August 30, 2026 04:11
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