Problem
When a skill had an earlier REJECTED version and a later PUBLISHED version, the my-skills list showed both "已发布" and "已拒绝" badges because ownerPreviewVersion pointed to the stale rejected version.
Example
- v1.0.0 REJECTED on 2026-03-15
- v2.0.0 PUBLISHED on 2026-03-16
The UI incorrectly showed both badges, confusing the owner.
Solution
Changed SkillLifecycleProjectionService to filter out non-published versions older than the published one. Only versions newer than the published version are surfaced as the owner preview, treating older rejected attempts as settled history.
Changes
- Refactored
projectForViewer and projectForOwnerSummary to use new buildProjection helper
- Replaced
resolveOwnerPendingPreview and resolveNewestNonPublishedVersion with resolveNewerNonPublishedVersion that filters by recency
- Added test case covering the stale rejected scenario
Origin
Synced from SAAS commit c9eefa93fix(domain): hide stale rejected preview when newer version published
Problem
When a skill had an earlier REJECTED version and a later PUBLISHED version, the my-skills list showed both "已发布" and "已拒绝" badges because
ownerPreviewVersionpointed to the stale rejected version.Example
The UI incorrectly showed both badges, confusing the owner.
Solution
Changed
SkillLifecycleProjectionServiceto filter out non-published versions older than the published one. Only versions newer than the published version are surfaced as the owner preview, treating older rejected attempts as settled history.Changes
projectForViewerandprojectForOwnerSummaryto use newbuildProjectionhelperresolveOwnerPendingPreviewandresolveNewestNonPublishedVersionwithresolveNewerNonPublishedVersionthat filters by recencyOrigin
Synced from SAAS commit c9eefa93fix(domain): hide stale rejected preview when newer version published