Skip to content

Support common project icon image formats - #34338

Open
gentslava wants to merge 23 commits into
stablyai:mainfrom
gentslava:gentslava/project-icon-image-formats
Open

gentslava wants to merge 23 commits into
stablyai:mainfrom
gentslava:gentslava/project-icon-image-formats

Conversation

@gentslava

@gentslava gentslava commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Import common image formats as project icons, resize admitted images to the stored PNG budget and ignore stale uploads.

What Changed

Accepts PNG, JPEG, SVG, WebP, GIF, BMP, ICO and AVIF through the existing decoder, retaining alpha and avoiding upscaling. Keeps the 10 MB source-byte and 32-megapixel decoded limits, localized typed picker failures, and cancellation when Reset or another selection wins. AVIF now lives in upstream's canonical media format catalog; the image catalog remains a reexport.

Why

Project icons should accept common source formats without weakening decoded-image safety limits or allowing a late conversion to undo the user's newer choice.

Linked Issue

Fixes #34326.

Visual Proof

Earlier captures below retain their original source and capture context; this update does not claim a fresh rendered run.

The following retains the earlier capture context and artifacts. This base refresh does not claim new rendered or physical-device acceptance.

Same real component, synthetic data, fixed 400px fixture width. Captures were made on the integration checkout; the panel and converter match this standalone delta. Full light/dark comparison and the separate header follow-up: gentslava#1 (comment).

Before:

PNG-only image upload

After:

Common image format upload

Testing

Current head: c2d180516515ab23baa42662fae29d09fe604db1. Ordinary forward merge of upstream main 7bf0377072f9b2e9ace445a2acad951990de1d3a. Updated affected imports to their current owners.

All five desktop/runtime TypeScript projects pass with the supported tsrs compiler. The complete affected source test files pass 31 tests.

Normal commit hooks pass. Final changed-path gate: all non-unit checks passed; broad related-unit selection exceeded the one-minute limit and remains incomplete locally. No new installed-app/device, live-provider, SSH, Windows or Linux acceptance is claimed for this maintenance refresh.

Risk

Level: Medium

Decoding or stale completion could reject an icon or replace a newer choice. Existing byte/pixel budgets, request fences and reset cancellation remain intact. Reverting restores earlier accepted inputs; already stored PNG icons remain valid.

AI Disclosure

Implemented and checked with OpenAI Codex assistance. The contributor owns the change and validation claims.

Review

Paginated formal/inline/top-level review audit found no unresolved threads. Existing upload/reset, pixel-budget contract and localized native-picker corrections are preserved. This is not current-head automated approval or physical picker acceptance.

Agent skill upstream boundary

  • This change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments or documentation.

Notes

This PR contains only its atomic feature. Cross-platform, remote, mobile and folder-workspace impact were considered; live acceptance remains as stated above.

Checklist

  • Focused on one feature
  • Explained the change, reason, risk and back-out behavior
  • Self-reviewed correctness, security, performance and compatibility
  • Fresh current-head before/after interaction recording
  • Full pnpm lint, pnpm typecheck, pnpm test, pnpm build and upstream CI green

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The repository icon picker now accepts PNG, JPEG, SVG, WebP, GIF, BMP, ICO, and AVIF files up to 10 MiB. The renderer converts uploads to PNG with a maximum edge of 128 pixels and checks the existing upload-size limit before applying the icon. Upload handling ignores stale or cancelled requests and results after unmount. Tests cover picker validation, cancellation, conversion dimensions, upload state, and size limits. Upload labels and format descriptions are updated across seven locales.

Severity of issue fixed: Medium

Merge Risk: Minimal · previous review eeb86

Image uploads now disclose their size limits and report oversized files in the selected language. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Issue [#34326] requires direct selection of PNG, JPEG, SVG, WebP, GIF, BMP, ICO, and AVIF files, conversion to an icon, PNG storage, and preservation of the existing icon contract. `shell:pickRepoIcon…
Out of Scope Changes check Passed The changed files support [#34326]. The IPC picker, renderer conversion, upload-state guards, localized messages, fixture, and tests implement or validate the custom project-icon upload flow. The conv…
Title check Passed The title clearly and concisely describes the main change: support for common project icon image formats.
Description check Passed The description covers most template sections with substance: ELI5, What Changed (accepted formats, 10 MB and 32-megapixel limits, cancellation, localization), Why, a linked issue (Fixes #34326), Visu…
Full details: Linked Issues check

Explanation

Issue [#34326] requires direct selection of PNG, JPEG, SVG, WebP, GIF, BMP, ICO, and AVIF files, conversion to an icon, PNG storage, and preservation of the existing icon contract. shell:pickRepoIconImage lists all required extensions and enforces the source limit. RepositoryIconTabs converts the selected image with maxEdge: 128 and sends a PNG data URL through the existing icon setter. The converter preserves aspect ratio and does not upscale. Focused tests cover conversion, limits, stale uploads, and duplicate activation. Existing favicon, GitHub avatar, Lucide, and emoji paths remain separate.

Full details: Out of Scope Changes check

Explanation

The changed files support [#34326]. The IPC picker, renderer conversion, upload-state guards, localized messages, fixture, and tests implement or validate the custom project-icon upload flow. The converter keeps its existing full-resolution PNG behavior when no maxEdge is provided. The changes do not expand Lucide search, GitHub avatar handling, or favicon lookup.

Full details: Description check

Explanation

The description covers most template sections with substance: ELI5, What Changed (accepted formats, 10 MB and 32-megapixel limits, cancellation, localization), Why, a linked issue (Fixes #34326), Visual Proof with before/after images, Testing, Risk with level and back-out, and the upstream-boundary checkbox. Gaps: the Testing section lists checks that were run, but the 'manually tested' and 'tests added' checkboxes are unchecked and no concrete reviewer test steps are given. The Visual Proof 'After' capture is described as predating the current head and is not a fresh run. The Review section states no current-head automated approval. The Checklist leaves the fresh before/after recording and full lint/typecheck/test/build gates unchecked. The Testing section also does not name the platforms actually tested. The description is detailed and mostly complete, so it passes, but these items should be tightened.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 471694ce-2b30-466b-a563-988fddbf8a71
Commits

Reviewing files that changed from the base of the PR and between 6b0f2a8 and eeb863f.

Files selected for processing: 2

  • src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.tsx
  • src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.upload.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d137f12f-7bf0-4907-820d-66d316b1e686
Commits

Reviewing files that changed from the base of the PR and between 72a4fd1 and 3749acd.

Files selected for processing: 15
  • src/main/ipc/shell-repo-icon-image.test.ts
  • src/main/ipc/shell.ts
  • src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.fixture.tsx
  • src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.tsx
  • src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.upload.test.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/image-blob-png.test.ts
  • src/renderer/src/lib/image-blob-png.ts
  • src/shared/repo-icon.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

gentslava added a commit to gentslava/orca that referenced this pull request Oct 27, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Translate the native picker size error. · RepositoryIconTabs.tsx:98-104

src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.tsx:98-104
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the native picker size error.

When the selected file exceeds MAX_REPO_ICON_SOURCE_BYTES, shell:pickRepoIconImage throws Repo icon image must be 10MB or smaller.. This branch translates only CLIPBOARD_IMAGE_TOO_LARGE_ERROR, so non-English users see the upload-limit error in English. Map the IPC size error to RepositoryIconPicker.imageTooLarge, or add a dedicated localized key. (raw.githubusercontent.com)


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eb50846d-8f26-4ccf-98d2-b8b6049d506e
Commits

Reviewing files that changed from the base of the PR and between d9e93d3 and 6b0f2a8.

Files selected for processing: 8
  • src/renderer/src/components/settings/repository/identity/RepositoryIconTabs.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
Files skipped from review as they are similar to previous changes: 7
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/ja.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@gentslava
gentslava force-pushed the gentslava/project-icon-image-formats branch from eeb863f to 464e017 Compare October 28, 2026 07:22
@gentslava
gentslava force-pushed the gentslava/project-icon-image-formats branch from 464e017 to d8569cc Compare October 28, 2026 09:27
@gentslava gentslava changed the title fix(settings): support common project icon image formats Support common project icon image formats Oct 28, 2026
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the earlier Reset issue is fixed, and no new actionable issues were found.

Summary

Project icons now accept common image formats and convert them to scaled PNGs.

  • Project icon uploads accept common image formats and save them as small PNGs.
  • Image readers that use the shared list now recognize AVIF files.

Reviews (2) · Last reviewed commit: "fix: cancel pending project icon upload ..." · Reviewed by Greptile

gentslava added a commit to gentslava/orca that referenced this pull request Oct 30, 2026
gentslava pushed a commit to gentslava/orca that referenced this pull request Oct 31, 2026
gentslava pushed a commit to gentslava/orca that referenced this pull request Oct 31, 2026
gentslava pushed a commit to gentslava/orca that referenced this pull request Oct 31, 2026
@gentslava
gentslava requested a review from Jinwoo-H as a code owner November 7, 2026 13:47

This branch has not been deployed

No deployments
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.

[Bug]: Project icon upload only accepts PNG images

1 participant