Skip to content

Fix/provider deleted display#5

Merged
mikewoo merged 16 commits into
mainfrom
fix/provider-deleted-display-id
May 25, 2026
Merged

Fix/provider deleted display#5
mikewoo merged 16 commits into
mainfrom
fix/provider-deleted-display-id

Conversation

@mikewoo

@mikewoo mikewoo commented May 25, 2026

Copy link
Copy Markdown
Owner

Change Type

  • Bug fix (fix)
  • New feature (feat)
  • Documentation (docs)
  • Refactoring (refactor)
  • Other

Description

Fix: when a Provider is soft-deleted or disabled, the Agent edit page and Workflow LLM node edit page displayed the raw numeric providerId instead of the provider name.

Backend changes:

  • Added PROVIDER_IN_USE / PROVIDER_IN_USE_BY_WORKFLOW error codes; delete now checks for Agent and Workflow LLM node references before allowing deletion
  • Agent list/detail endpoints batch-resolve provider names via selectBatchIds, injecting defaultProviderName, defaultProviderType, and defaultProviderAvailable fields
  • Workflow LLM node detail endpoint injects providerAvailable and providerName into config JSON

Frontend changes:

  • AgentList: provider dropdown shows "Name(不可用)" as a disabled red option for unavailable providers; model input fills "model(不可用)" in red text
  • WorkflowEdit: same red fallback for unavailable providers and models
  • "(不可用)" / "(Unavailable)" suffix auto-stripped before form submission
  • Non-scoped CSS ensures reliable penetration of Element Plus 2.14 component styles

Testing

  • mvn test passes locally
  • Core functionality manually verified
  • New features have test coverage

Checklist

  • Database indexes: new queries have index coverage
  • Workspace isolation: Service layer queries filter by workspace_id
  • Error handling: uses ErrorCode enum
  • Log format: pure JSON format, UTC timezone
  • Config security: no hardcoded passwords / API keys
  • XSS protection: v-html uses DOMPurify.sanitize

Related Issue

Closes #2

Screenshots (if applicable)

mikewoo and others added 15 commits May 25, 2026 08:43
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
JSON_EXTRACT is MySQL-specific and not available in H2. Skip the workflow
reference check when running on databases that don't support it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Previously only handled soft-deleted providers. Now also covers
disabled providers (enabled=0) filtered out by the dropdown query.
Uses providerName from config if available, falls back to i18n key.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…dels

- Show "Name(不可用)" as disabled red option in provider dropdown
- Show "model(不可用)" in red in model field when provider unavailable
- Strip "(不可用)" suffix before API submission
- Apply same fix to AgentList and WorkflowEdit views
- Use non-scoped CSS to reliably penetrate Element Plus components
- Refine Chinese labels for provider/model form fields
- Add GitHub issue #2 for provider deleted display bug

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mikewoo mikewoo self-assigned this May 25, 2026
…on CI

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mikewoo mikewoo merged commit fd25bed into main May 25, 2026
2 of 3 checks passed
@mikewoo mikewoo deleted the fix/provider-deleted-display-id branch May 25, 2026 03:41
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] Deleted Provider Shows ID Instead of Name in Agent and Workflow Edit Pages

1 participant