Skip to content

fix(admin): resolve custom provider routes under subpath and load catalog on onboarding - #227

Open
elf-mouse wants to merge 1 commit into
yc-software:mainfrom
elf-mouse:fix/admin-subpath-custom-providers
Open

fix(admin): resolve custom provider routes under subpath and load catalog on onboarding#227
elf-mouse wants to merge 1 commit into
yc-software:mainfrom
elf-mouse:fix/admin-subpath-custom-providers

Conversation

@elf-mouse

@elf-mouse elf-mouse commented Aug 5, 2026

Copy link
Copy Markdown

This commit fixes routing, dependency wiring, and frontend catalog rendering issues for Custom Providers in the Admin plugin:

  1. plugins/admin/src/index.ts:

    • Strip ADMIN_BASE_PATH (e.g. /admin) at request entry so /admin/api/custom-providers routes correctly without throwing 404 not_found.
  2. src/index.ts:

    • Pass customProviders and refreshCustomProviders into createServer() options so ctx.deps.customProviders is properly initialized in Core handlers.
  3. plugins/admin/public/index.html:

    • Invoke await loadCustomProviders() inside loadOnboarding() to automatically populate saved custom providers on page refresh and menu navigation.
    • Improve status error reporting to display saved.data?.error when message is omitted.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…alog on onboarding

This commit fixes routing, dependency wiring, and frontend catalog rendering issues for Custom Providers in the Admin plugin:

1. `plugins/admin/src/index.ts`:
   - Strip `ADMIN_BASE_PATH` (e.g. `/admin`) at request entry so `/admin/api/custom-providers` routes correctly without throwing 404 `not_found`.

2. `src/index.ts`:
   - Pass `customProviders` and `refreshCustomProviders` into `createServer()` options so `ctx.deps.customProviders` is properly initialized in Core handlers.

3. `plugins/admin/public/index.html`:
   - Invoke `await loadCustomProviders()` inside `loadOnboarding()` to automatically populate saved custom providers on page refresh and menu navigation.
   - Improve status error reporting to display `saved.data?.error` when `message` is omitted.
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