Skip to content

fix(webui): show credential schema load errors#1858

Open
Premsenareddy wants to merge 2 commits into
agentscope-ai:mainfrom
Premsenareddy:codex/webui-credential-schema-error
Open

fix(webui): show credential schema load errors#1858
Premsenareddy wants to merge 2 commits into
agentscope-ai:mainfrom
Premsenareddy:codex/webui-credential-schema-error

Conversation

@Premsenareddy

Copy link
Copy Markdown
Contributor

Summary

  • show inline errors when credential provider schema loading fails in create/edit credential dialogs
  • add a credential page provider-load error state instead of silently showing no providers
  • keep the sidebar in a loading state while provider schemas are still loading

Fixes #1840

Tests

  • corepack pnpm exec prettier --check frontend/src/components/dialog/CreateCredentialDialog.tsx frontend/src/components/dialog/EditCredentialDialog.tsx frontend/src/pages/credential/index.tsx frontend/src/i18n/locales/en.json frontend/src/i18n/locales/zh.json
  • corepack pnpm --filter frontend build
  • corepack pnpm --filter frontend lint

@YingchaoX

Copy link
Copy Markdown
Contributor

Thanks for working on this.

I tested the credential page locally and found a related failure mode that this PR makes more visible but does not fully prevent: if the setup page stores the server URL as localhost:8000 instead of http://localhost:8000, the API client throws before the request is sent:

TypeError: Failed to construct 'URL': Invalid URL

This still results from the same credential schema loading path, but the root cause is that the setup flow accepts or preserves a browser-unusable server URL.

Would you be open to including a small normalization step in this PR, for example converting localhost:8000 / 127.0.0.1:8000 to http://localhost:8000 before saving server_url?

@Premsenareddy

Premsenareddy commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for testing that path. I added the normalization in the follow-up commit:

  • localhost:8000 / 127.0.0.1:8000 are normalized to http://... before saving from setup.
  • the setup input now allows schemeless local URLs to reach submit instead of relying on native type=url validation.
  • API base URL reads also normalize existing stored values, so a previously saved schemeless URL can recover without throwing before the request is sent.

Local checks passed: prettier check, frontend build, and frontend lint.

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.

[Bug]: (web-ui): show an error when credential provider schemas fail to load

2 participants