Skip to content

Refactor synced repo URL handling in skill cards#84

Open
dirtybits wants to merge 1 commit into
mainfrom
chore/synced-repo-url-memoization
Open

Refactor synced repo URL handling in skill cards#84
dirtybits wants to merge 1 commit into
mainfrom
chore/synced-repo-url-memoization

Conversation

@dirtybits

@dirtybits dirtybits commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cache sanitized synced GitHub repo URLs in SkillPreviewCard and SkillDetailClient instead of recomputing them during render.
  • Keep the synced badge behavior unchanged while removing duplicate sanitization calls and redundant truthy checks.

Verification

  • npm exec --workspace @agentvouch/web -- vitest run __tests__/components/skill-preview-card-source.test.ts __tests__/lib/mirror-connectedRepos.test.ts
  • git diff --check

Notes

  • npm exec --workspace @agentvouch/web -- tsc --noEmit still fails in this worktree on an existing unrelated module-resolution error for @vercel/speed-insights/next in app/layout.tsx. The change itself is lint-clean and the targeted tests passed.

Note

Low Risk
Display-only refactor with no API or data changes; synced badge rules stay tied to sanitizeSyncedRepoUrl and mirror exclusion.

Overview
Skill detail and preview cards now derive a single syncedRepoUrl (sanitized GitHub HTTPS URL for non-mirror skills) instead of a boolean plus repeated sanitizeSyncedRepoUrl calls in JSX.

The Synced GitHub badge still appears only when that value is truthy; mirror skills still skip sync provenance. User-visible behavior is unchanged—this is a small render-path cleanup in SkillDetailClient and SkillPreviewCard.

Reviewed by Cursor Bugbot for commit b8e522c. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_187c949c-e4a7-4781-a925-52fba22705d9)

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.

1 participant