feat: show github stars on addon cards and details view#34
Merged
jmaxdev merged 2 commits intoTrixtyAI:mainfrom Apr 19, 2026
Merged
feat: show github stars on addon cards and details view#34jmaxdev merged 2 commits intoTrixtyAI:mainfrom
jmaxdev merged 2 commits intoTrixtyAI:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds GitHub star counts to marketplace addons by resolving stargazers_count at catalog load time via a new Tauri (Rust) command and rendering the count in both the card grid and details header.
Changes:
- Backend: introduce
fetch_extension_starsTauri command that queries the GitHub repos API and returnsOption<u32>for graceful UI degradation. - Frontend: enrich
MarketplaceEntrywithstarsand fetch manifest + stars concurrently per entry usingPromise.allSettled. - UI: conditionally render star counts in marketplace cards and the details view header when available.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/desktop/src-tauri/src/extensions.rs | Adds fetch_extension_stars command that parses GitHub repo URLs and calls the GitHub API. |
| apps/desktop/src-tauri/src/lib.rs | Registers the new fetch_extension_stars command in the Tauri invoke handler. |
| apps/desktop/src/api/tauri.ts | Extends TauriInvokeMap with the fetch_extension_stars signature. |
| apps/desktop/src/context/ExtensionContext.tsx | Adds stars to MarketplaceEntry and enriches catalog entries by fetching manifest + stars concurrently. |
| apps/desktop/src/components/MarketplaceView.tsx | Displays stars (when present) on addon cards and in the details header. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b1462c3 to
e495523
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Implements #14 — resolves the live GitHub
stargazers_countfor each marketplace entry at catalog load time and surfaces it in both the card grid and the details view.Backend (Rust):
apps/desktop/src-tauri/src/extensions.rs: addsfetch_extension_stars(repo_url) -> Result<Option<u32>, String>. Parsesowner/repoout of GitHub HTTPS URLs, callshttps://api.github.com/repos/{owner}/{repo}with a requiredUser-Agent, and extractsstargazers_count. Any failure (non-GitHub URL, network error, 403 rate-limit, 404, parse error) silently returnsOk(None)so the UI degrades gracefully with no console noise.apps/desktop/src-tauri/src/lib.rs: registers the new command ininvoke_handler.Frontend:
apps/desktop/src/api/tauri.ts: adds thefetch_extension_starssignature toTauriInvokeMap.apps/desktop/src/context/ExtensionContext.tsx: addsstars?: numbertoMarketplaceEntry;refreshCatalognow fetches manifest and stars concurrently per entry usingPromise.allSettledso a stars failure doesn't drop the manifest (and vice versa).apps/desktop/src/components/MarketplaceView.tsx:{t('marketplace.github_stars')}placeholder label with the actual count (entry.stars.toLocaleString()), rendered only when stars were resolved.<Star size={10}> {count}next to the version pill, same conditional render.Not in scope (by design):
Issues