Skip to content

KIT-48: copy skills.sh search result links#246

Open
AkaraChen wants to merge 4 commits into
mainfrom
agent/daniel/3e401d53
Open

KIT-48: copy skills.sh search result links#246
AkaraChen wants to merge 4 commits into
mainfrom
agent/daniel/3e401d53

Conversation

@AkaraChen

@AkaraChen AkaraChen commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • make the skills.sh search result source value hover-underlined and clickable
  • show a tooltip containing the derived skills.sh URL and copy hint
  • copy the derived URL with Tauri clipboard feedback toasts

Verification

  • bunx prettier --write src/pages/skills-sh/search.tsx src/lib/locales/en.ts src/lib/locales/zh-Hans.ts src/lib/locales/zh-Hant.ts
  • bun run typecheck
  • bun run build

Closes KIT-48

Summary by CodeRabbit

  • New Features
    • Users can now copy individual Skills.sh links directly from the search results table with a single click
    • Added localization support in English, Simplified Chinese, and Traditional Chinese with copy success and failure feedback messages

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@AkaraChen, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 15 minutes and 36 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 14a9fc67-a1a3-439b-a59c-46b47b3b2aac

📥 Commits

Reviewing files that changed from the base of the PR and between 7def193 and a2dce53.

📒 Files selected for processing (4)
  • crates/desktop/src/lib/locales/en.ts
  • crates/desktop/src/lib/locales/zh-Hans.ts
  • crates/desktop/src/lib/locales/zh-Hant.ts
  • crates/desktop/src/pages/skills-sh/search.tsx
📝 Walkthrough

Walkthrough

The PR adds clipboard copy functionality for per-skill Skills.sh URLs in the search page. A buildSkillsShUrl helper constructs the URL from skill metadata, and a handleCopySkillsShUrl callback writes it to the clipboard via Tauri and shows a localized toast. The source column cell is replaced with a tooltip-wrapped button. Four new locale keys are added across English, Simplified Chinese, and Traditional Chinese.

Changes

Skills.sh URL Clipboard Copy

Layer / File(s) Summary
URL builder, copy handler, and imports
crates/desktop/src/pages/skills-sh/search.tsx
Adds SKILLS_SH_BASE_URL constant, buildSkillsShUrl(skill) that derives a URL from skill.source with a GitHub path special-case, and handleCopySkillsShUrl that copies the URL via Tauri writeText and fires a localized success or danger toast. Imports are updated to include toast, writeText, and relevant UI components.
Table cell UI and locale strings
crates/desktop/src/pages/skills-sh/search.tsx, crates/desktop/src/lib/locales/en.ts, crates/desktop/src/lib/locales/zh-Hans.ts, crates/desktop/src/lib/locales/zh-Hant.ts
The source column cell in itemContent changes from static text to a tooltip-wrapped clickable element that triggers handleCopySkillsShUrl. The tooltip shows the generated URL and a localized hint. All three locale files add copySkillsShLink, copySkillsShLinkHint, skillsShLinkCopied, and skillsShLinkCopyFailed keys.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, a URL to share,
A clipboard waits with bunny flair!
Click the source, the link flies free,
Toast pops up for you to see.
In English, 中文, 繁體 too —
Skills.sh copied, through and through! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'KIT-48: copy skills.sh search result links' clearly and specifically describes the main change—adding copy functionality to search result links—matching the primary objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/daniel/3e401d53

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/desktop/src/pages/skills-sh/search.tsx`:
- Around line 127-133: The toast.danger call in the error handler is showing the
raw error.message to users when the error is an Error instance, but user-facing
messages should always be localized. Keep the raw error details in the
console.error log for debugging purposes, but change the toast.danger call to
always use the localized string t("skillsShLinkCopyFailed") instead of
conditionally displaying error.message. Remove the ternary operator and pass
only the localized translation string to ensure users see a consistent,
localized error message regardless of the actual error type.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 70ba38bc-a00c-4b14-9ecc-f2e06eaaf4e0

📥 Commits

Reviewing files that changed from the base of the PR and between c301225 and 7def193.

📒 Files selected for processing (4)
  • crates/desktop/src/lib/locales/en.ts
  • crates/desktop/src/lib/locales/zh-Hans.ts
  • crates/desktop/src/lib/locales/zh-Hant.ts
  • crates/desktop/src/pages/skills-sh/search.tsx

Comment thread crates/desktop/src/pages/skills-sh/search.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7def19397c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +52 to +53
const pathParts =
sourceParts[0] === "github" ? sourceParts.slice(1) : sourceParts;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prefix site sources in copied skills.sh URLs

When a search result comes from a site/domain source such as open.feishu.cn, skills.sh detail pages live under /site/<source>/<skill> (for example https://www.skills.sh/site/open.feishu.cn/lark-approval), but this branch leaves every non-github source unprefixed. Copying those results therefore produces links like https://www.skills.sh/open.feishu.cn/lark-approval, which are not the valid skills.sh detail URLs for site-backed skills.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 285cbcabca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return sourceParts;
}

return ["site", ...sourceParts];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve GitHub shorthand paths

For GitHub-backed search results whose source is the normal skills.sh shorthand like vercel-labs/skills, this fallback treats the source as a site source because it does not start with github or site. Copying a result such as find-skills would produce https://www.skills.sh/site/vercel-labs/skills/find-skills, while skills.sh serves those GitHub results at /vercel-labs/skills/find-skills; only domain sources such as open.feishu.cn should receive the site/ prefix.

Useful? React with 👍 / 👎.

Comment on lines +67 to +70
const skillSegment = skill.slug || skill.name;
const urlSegments = [...pathParts, skillSegment]
.filter(Boolean)
.map((part) => encodeURIComponent(part));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid appending full IDs as leaf slugs

When the skills.sh search API omits skillId, this app maps the API id into skill.slug (see crates/skills-sh/src/types.rs), and those IDs are already full skills.sh paths such as vercel-labs/skills/find-skills or site/open.feishu.cn/lark-approval. Appending that full path as the final segment and then encodeURIComponent-ing it copies URLs with duplicated/escaped paths like /site/open.feishu.cn/site%2Fopen.feishu.cn%2Flark-approval; use the full slug path directly or extract only the final segment before appending.

Useful? React with 👍 / 👎.

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