Skip to content

feat: show addon icon from manifest#22

Merged
jmaxdev merged 4 commits intoTrixtyAI:mainfrom
matiaspalmac:feat/addon-icon
Apr 19, 2026
Merged

feat: show addon icon from manifest#22
jmaxdev merged 4 commits intoTrixtyAI:mainfrom
matiaspalmac:feat/addon-icon

Conversation

@matiaspalmac
Copy link
Copy Markdown
Contributor

Changes

Adds support for an icon field in the addon manifest so marketplace entries can display their own logo instead of the generic Package fallback.

  • apps/desktop/src/context/ExtensionContext.tsx: adds optional icon?: string to ExtensionManifest.
  • apps/desktop/src/components/MarketplaceView.tsx: adds a small resolveIconUrl() helper that accepts either an absolute URL or a path relative to the addon's repo (resolved against raw.githubusercontent.com using the same owner/branch/path logic as repo_to_raw_base on the Rust side). Adds an AddonIcon component that renders the image and falls back to the existing Package icon when there's no icon or when the image fails to load. Both usages (grid card and details view header) now go through it, with overflow-hidden on the wrappers so the image respects the rounded corners.

Addons can now declare any of:

{ "icon": "assets/logo.png" }
{ "icon": "https://example.com/logo.svg" }

Entries without an icon keep the current visual unchanged.

Issues

Copilot AI review requested due to automatic review settings April 19, 2026 02:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for showing an addon-provided icon from the addon manifest in the marketplace UI, falling back to the existing generic Package icon when not available or when loading fails.

Changes:

  • Extends ExtensionManifest with an optional icon?: string field.
  • Introduces resolveIconUrl() + AddonIcon in MarketplaceView to render either a manifest-provided icon (absolute URL or repo-relative path) or a Package fallback.
  • Updates both the marketplace grid cards and the details header to use AddonIcon with overflow-hidden wrappers for proper rounding.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
apps/desktop/src/context/ExtensionContext.tsx Adds icon?: string to the manifest type so addon metadata can include an icon path/URL.
apps/desktop/src/components/MarketplaceView.tsx Resolves icon URLs (absolute or GitHub-raw relative) and renders them with graceful fallback in grid + details views.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/desktop/src/components/MarketplaceView.tsx Outdated
Comment thread apps/desktop/src/components/MarketplaceView.tsx Outdated
Comment thread apps/desktop/src/components/MarketplaceView.tsx
Comment thread apps/desktop/src/components/MarketplaceView.tsx
@jmaxdev jmaxdev merged commit 50923f8 into TrixtyAI:main Apr 19, 2026
4 checks passed
@jmaxdev
Copy link
Copy Markdown
Collaborator

jmaxdev commented Apr 19, 2026

done

@matiaspalmac matiaspalmac deleted the feat/addon-icon branch April 19, 2026 02:44
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.

Feat: Show Addon icon

3 participants