Skip to content

feat: show GitHub stars in extension markets - #27

Merged
FlashingChen merged 2 commits into
mainfrom
skills
Aug 21, 2026
Merged

FlashingChen merged 2 commits into
mainfrom
skills

Conversation

@FlashingChen

Copy link
Copy Markdown
Owner

Summary

  • Display GitHub star counts on plugin and GitHub-backed Skill market cards.
  • Keep GitHub stars separate from generic popularity metrics.
  • Migrate schema v1 cached star metadata and centralize market link validation.
  • Add regression coverage for legacy cache migration.

Closes #24

Tests

  • npm test (94/94 passing)

@FlashingChen

Copy link
Copy Markdown
Owner Author

Review note(P2)

src/core/market.ts:846-847 的旧缓存迁移可能把缺失的 GitHub stars 误显示为 0。

旧版映射使用 Number(plugin?.stars ?? 0) / Number(skill?.stars ?? 0),因此旧缓存中的 popularity: 0 可能只是“上游没有提供 stars”的默认值。当前迁移会将它转换成 githubStars: 0,而渲染层会显示 GitHub ★ 0,造成数据误导。

建议迁移时仅转换 popularity > 0,或保留“缺失”和“真实 0 星”的区别,并补充该场景的回归测试。除此之外未发现阻塞问题,本地 94/94 测试及 CI Verify + smoke 均通过。

@FlashingChen

Copy link
Copy Markdown
Owner Author

已按 P2 建议修复(ee53091):

  • 旧缓存仅将 popularity > 0 迁移为 githubStars
  • popularity: 0 保留为未知/缺失,不再误显示 GitHub ★ 0
  • 增加 0 星/缺失场景回归测试。

npm test:94/94 通过。

@FlashingChen
FlashingChen merged commit 24eb14e into main Aug 21, 2026
1 check 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.

[反馈][匿名][建议] skills模块和插件模块优化

1 participant