Skip to content

fix(repo-icon): round project image icons on desktop to match mobile - #37383

Merged
nwparker merged 2 commits into
stablyai:mainfrom
tianlrz:tianlrz/desktop-repo-icon-rounded
Nov 2, 2026
Merged

nwparker merged 2 commits into
stablyai:mainfrom
tianlrz:tianlrz/desktop-repo-icon-rounded

Conversation

@tianlrz

@tianlrz tianlrz commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Project pictures have rounded corners on the phone but square corners on desktop. Desktop now rounds them the same way.

What Changed

Before: desktop draws project image icons with square corners.
After: they use a 4px radius, matching mobile.

The radius is on the image in RepoIconGlyph, so every desktop surface using it picks it up. Emoji and lucide icons are unchanged. iconClassName can still override it.

Why

rounded-[4px] matches mobile's radii.mark and is already used in the sidebar. The rounded-sm token is 6px here, which makes a 14px icon nearly circular. Because the image uses object-contain, a non-square image isn't cropped, so its visible corners may stay square.

Linked Issue

Fixes #37382

Visual Proof

Before and after at sidebar (14px) and settings (20px) icon sizes, 3× zoom. This is a Chromium render of the same CSS on a standalone page, not a screenshot of the running app:

Project icon before and after rounding

Testing

  • No test added (one-class CSS change; covered by visual proof).
  • oxlint (design-system config) and oxfmt pass on the changed files.
  • tsc on the web project reports no errors in these files. It reports 4 in src/main/telemetry/client.ts, which this change doesn't touch.

Not run: the running desktop app, or the full pnpm lint, pnpm typecheck, pnpm test and pnpm build.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below (not needed: CSS-only)

AI Disclosure

Made with Claude Opus 5.5.

Review

Agent skill upstream boundary

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

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

CSS only, so it behaves the same across platforms and remote hosts. Mobile is unchanged.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Mobile rounds project image icons with a 4px radius, but desktop draws them
with square corners, so the same avatar looks different across clients and
sits awkwardly beside the rounded sidebar controls.

Apply the same 4px radius to the image in RepoIconGlyph so every desktop
surface picks it up. Emoji and lucide icons are unchanged.

Covered by a repo-icon test that failed before the change.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

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: b8e332a4-4df8-405b-bf7c-33383fda04ee
Commits

Reviewing files that changed from the base of the PR and between 4343dc2 and 9670489.

Files selected for processing: 2
  • src/renderer/src/components/repo/repo-icon.test.tsx
  • src/renderer/src/components/repo/repo-icon.tsx

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

Walkthrough

Desktop image-based repository icons now use a 4px corner radius. A test verifies that the rendered image icon class includes rounded-[4px].

Severity of issue fixed: Low

Merge Risk: Minimal · up to 96704

This change is limited to rounding desktop repository image icons, with no identified merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed 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%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: rounding desktop project image icons to match mobile.
Linked Issues check Passed Issue #37382 requires desktop project image icons to use the same 4px radius as mobile. RepoIconGlyph now adds rounded-[4px] to the image class while retaining size-full and object-contain. Th…
Out of Scope Changes check Passed The pull request changes only RepoIconGlyph image styling and adds a focused test for the requested radius. These changes directly support issue #37382. No unrelated product behavior is changed.
Description check Passed The description follows the required template and clearly explains the user-visible change, implementation, rationale, linked issue, visual proof, testing status, risk, AI disclosure, and scope. It no…
Full details: Linked Issues check

Explanation

Issue #37382 requires desktop project image icons to use the same 4px radius as mobile. RepoIconGlyph now adds rounded-[4px] to the image class while retaining size-full and object-contain. The new test verifies the image class. The change does not alter emoji or lucide icon paths.

Full details: Description check

Explanation

The description follows the required template and clearly explains the user-visible change, implementation, rationale, linked issue, visual proof, testing status, risk, AI disclosure, and scope. It notes that full validation and manual app testing were not run, but this limitation is clearly disclosed and does not make the description incomplete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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

@nwparker
nwparker merged commit ab0e81d into stablyai:main Nov 2, 2026
2 checks passed
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]: Desktop project image icons have square corners while mobile rounds them

2 participants