fix: show pending skill page to owners instead of "Skill not found"#136
fix: show pending skill page to owners instead of "Skill not found"#136
Conversation
When a skill owner uploads a skill that's pending VirusTotal scan, they now see their skill page with a pending banner instead of "Skill not found". The banner explains the scan is in progress. Changes: - Modified getBySlug query to return skill data for owners even when moderationStatus is 'hidden' with reason 'pending.scan' - Added pendingReview flag to query response - Added pending banner component to SkillDetailPage - Added CSS for pending banner using existing ClawHub gold theme
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const skillData = publicSkill ?? { | ||
| _id: skill._id, | ||
| _creationTime: skill._creationTime, | ||
| slug: skill.slug, | ||
| displayName: skill.displayName, | ||
| summary: skill.summary, | ||
| ownerUserId: skill.ownerUserId, | ||
| canonicalSkillId: skill.canonicalSkillId, | ||
| forkOf: skill.forkOf, | ||
| latestVersionId: skill.latestVersionId, | ||
| tags: skill.tags, | ||
| badges: skill.badges, | ||
| stats: skill.stats, |
There was a problem hiding this comment.
Incorrect badges source
In the owner/pending fallback (skillData = publicSkill ?? { ... }), badges is set to skill.badges (convex/skills.ts:527), but this query already computed the up-to-date badge map via getSkillBadgeMap (convex/skills.ts:500) and uses it for toPublicSkill({ ...skill, badges }) (convex/skills.ts:510). When publicSkill is null (pending hidden skill), the owner will get the legacy/stale skill.badges instead of the computed badge map, which can make the UI render wrong badges for pending skills. Use the computed badges variable in the fallback object.
Prompt To Fix With AI
This is a comment left during a code review.
Path: convex/skills.ts
Line: 516:528
Comment:
**Incorrect badges source**
In the owner/pending fallback (`skillData = publicSkill ?? { ... }`), `badges` is set to `skill.badges` (`convex/skills.ts:527`), but this query already computed the up-to-date badge map via `getSkillBadgeMap` (`convex/skills.ts:500`) and uses it for `toPublicSkill({ ...skill, badges })` (`convex/skills.ts:510`). When `publicSkill` is null (pending hidden skill), the owner will get the legacy/stale `skill.badges` instead of the computed badge map, which can make the UI render wrong badges for pending skills. Use the computed `badges` variable in the fallback object.
How can I resolve this? If you propose a fix, please make it concise.Extended the list query to include pending skills when the requester is viewing their own dashboard. Added "Scanning" badge with gold theme to indicate skills pending VirusTotal review.
- Owners see their blocked/removed skills with explanatory banners - Red banner for malware-blocked and removed skills - Gold banner for pending scan - Download button hidden for blocked/removed skills - Added security disclaimer: "Like a lobster shell, security has layers" - Fixed badges bug (use computed badges, not stale skill.badges)
Blocked skills are now visible to everyone via direct URL: - Shows red banner with "security issue detected" - Displays VT scan results - No download button - Still hidden from listings/search Sends a strong transparency signal about security enforcement.
|
Thank you! |
|
Landed via temp rebase onto main. Thanks @orlyjamie! |
|
Seems like this still doesn't fix the skill disappearing issue. Or is the CI/CD taking longer than 8 mins? |





When a skill owner uploads a skill that's pending VirusTotal scan, they now see their skill page with a pending banner instead of "Skill not found". The banner explains the scan is in progress.
Changes:
Test plan
Greptile Overview
Greptile Summary
This PR updates the
getBySlugConvex query to allow skill owners to view their own skills while they’re hidden forpending.scan, returning an extrapendingReviewflag. The frontendSkillDetailPageconsumes that flag to display a “Security scan in progress” banner, and new CSS styles the banner using the existing gold theme tokens.Key interaction change:
getBySlugnow conditionally returns skill data even whentoPublicSkillwould normally hide it, but only for the owner, so non-owners still get the existing “not found” behavior.Confidence Score: 4/5
skill.badgesinstead of the computed badge map already fetched in the query, which can lead to incorrect badges being shown for pending skills.Context used:
dashboard- AGENTS.md (source)