Skip to content

fix(web): show pending review toast for non-admin skill publish#86

Merged
dongmucat merged 1 commit intomainfrom
fix/publish-toast-pending-review
Mar 18, 2026
Merged

fix(web): show pending review toast for non-admin skill publish#86
dongmucat merged 1 commit intomainfrom
fix/publish-toast-pending-review

Conversation

@yun-zhi-ztl
Copy link
Collaborator

Problem

When a non-admin user uploads a skill, the toast always shows "Published Successfully". This is misleading because non-admin users' skills require admin review before being published.

Root Cause

The frontend publish handler did not check the status field in the backend response. The backend correctly returns PENDING_REVIEW for non-admin users and PUBLISHED for admins, but the toast always displayed the same message.

Fix

Check result.status after publish and show the appropriate toast:

  • PUBLISHED: "Published Successfully" / "发布成功"
  • PENDING_REVIEW: "Submitted for Review" / "已提交审核"

Files Changed

  • web/src/pages/dashboard/publish.tsx — branch toast by status
  • web/src/i18n/locales/en.json — add published/pending review i18n keys
  • web/src/i18n/locales/zh.json — add published/pending review i18n keys

Non-admin users now see "Submitted for Review" instead of "Published
Successfully" after uploading a skill, based on the status returned
by the backend.
@dongmucat dongmucat merged commit 3075b34 into main Mar 18, 2026
2 checks passed
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.

2 participants