Skip to content

fix: show pending skill page to owners instead of "Skill not found"#136

Merged
steipete merged 8 commits intomainfrom
fix/owner-sees-pending-skill
Feb 5, 2026
Merged

fix: show pending skill page to owners instead of "Skill not found"#136
steipete merged 8 commits intomainfrom
fix/owner-sees-pending-skill

Conversation

@orlyjamie
Copy link
Contributor

@orlyjamie orlyjamie commented Feb 5, 2026

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

Test plan

  • Upload a new skill
  • Verify owner sees pending banner on skill page
  • Verify non-owners still see "Skill not found" for pending skills
  • Verify banner disappears after scan completes"

Greptile Overview

Greptile Summary

This PR updates the getBySlug Convex query to allow skill owners to view their own skills while they’re hidden for pending.scan, returning an extra pendingReview flag. The frontend SkillDetailPage consumes 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: getBySlug now conditionally returns skill data even when toPublicSkill would normally hide it, but only for the owner, so non-owners still get the existing “not found” behavior.

Confidence Score: 4/5

  • Mostly safe to merge, but fix the owner/pending skill badge source to avoid inconsistent UI state.
  • Changes are small and localized (one query, one UI banner, and CSS). The main issue found is a concrete data inconsistency: pending-owner responses use skill.badges instead of the computed badge map already fetched in the query, which can lead to incorrect badges being shown for pending skills.
  • convex/skills.ts

Context used:

  • Context from dashboard - AGENTS.md (source)

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
@vercel
Copy link
Contributor

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clawhub Ready Ready Preview, Comment Feb 5, 2026 7:27am

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 516 to 528
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,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@orlyjamie
Copy link
Contributor Author

Here are the states that will be visible.

  1. Pending Scan (owner view) - Gold banner, spinner showing "Scanning...", download button visible
image
  1. Malware Blocked (owner view) - Red banner with owner context, VT results showing "3/72 engines", no download button
image
  1. Malware Blocked (public view) - Red banner anyone can see (transparency signal), VT results, no download button
image
  1. Removed by Moderator (owner only) - Red banner, no download button, others see "not found"
image
  1. Clean/Active (normal view) - No banner, VT showing "Undetected" in green, download button available
image

@swairshah
Copy link

Thank you!

@steipete steipete merged commit ba6a99a into main Feb 5, 2026
2 of 3 checks passed
@steipete
Copy link
Collaborator

steipete commented Feb 5, 2026

Landed via temp rebase onto main.

Thanks @orlyjamie!

@swairshah
Copy link

Seems like this still doesn't fix the skill disappearing issue. Or is the CI/CD taking longer than 8 mins?

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.

3 participants