Skip to content

Match the PR check icon to the GitHub favicon geometry - #2057

Merged
SawyerHood merged 1 commit into
mainfrom
bb/reduce-icon-size-thr_6kr9sctwhc
Aug 20, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/reduce-icon-size-thr_6kr9sctwhc

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

What was wrong

PR #1900 replaced the GitHub favicon PNGs (fetched from github.githubassets.com) with the bundled hugeicons Github outline glyph plus a separate status dot. That outline fills the whole 16px box with a stroked octocat and has a different silhouette, so the PR check icon in tab strips, the sidebar, and the thread metadata panel looked much larger than the favicon it replaced.

What changed

  • New apps/app/src/components/pull-request/GithubFaviconIcon.tsx inlines the exact path data from GitHub's favicon.svg, favicon-success.svg, favicon-failure.svg, and favicon-pending.svg (the mark with its cut-out plus the check / X / circle glyph). The mark fills with currentColor; the glyph uses fill-success / fill-destructive / fill-attention. The light and dark favicons share the same paths, so one SVG serves both themes and still makes no cross-origin request.
  • PullRequestStatusPill.tsx (PullRequestGithubCheckIcon) and ThreadMetadataContent.tsx render it in place of the hugeicons glyph.
  • No wire, CLI, or plugin API changes.

How you verified

  • Rasterized the new SVGs at 16px next to the real favicon PNGs downscaled to 16px; the pairs are indistinguishable for success, failure, and pending.
  • pnpm exec turbo run typecheck --filter=@bb/app: pass.
  • eslint + prettier on the touched files: clean.
  • vitest src/components/pull-request src/components/secondary-panel src/components/thread-list: 31 files, 229 tests pass.

Fixes: visual regression from #1900 (no issue filed).

AGENT GENERATED: by Claude Opus 5

The bundled hugeicons Github outline filled the full 16px box with a
stroked octocat plus a separate status dot, so it read much larger than
the GitHub favicon it replaced. Inline the favicon SVG paths (mark plus
status glyph) so the glyph is pixel identical to the favicon at 16px,
while keeping the no-cross-origin-request behavior.

Co-Authored-By: Claude <[email protected]>
@bb-slop-cop

bb-slop-cop Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

I am the SlopCop. I started the review. I will check security, code quality, performance, architecture, and the user flow.

@bb-slop-cop bb-slop-cop 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.

🚨 SLOP COP 🚨 · review

Plain-English summary: This PR replaces a large generic GitHub icon and status dot with a small local SVG that matches GitHub's favicon.

I found no blocking issues.

  • Security: The component uses fixed local paths and classes. It adds no scripts, external references, dependencies, or data exposure.
  • Code quality: The shared pull-request component fits both current call sites. No stale favicon request or duplicate asset remains.
  • Architecture: ThreadMetadataContent repeats the status rule from getPullRequestGithubCheckStatus. A later cleanup can call the helper directly.
  • Performance: The change removes DOM elements and adds about 1.1 KB after gzip. This cost is not material.
  • Browser test: The component story showed all 18 pull-request states in dark and light themes.
  • Browser test: Every icon measured 16 by 16 pixels. The status colors worked, and the browser showed no errors.
  • Source check: The inlined path data matched GitHub's current favicon SVG files.
  • Tests: The app typecheck passed. The isolated FilePreview rerun passed all 19 tests.
  • Tests: The first concurrent run passed 227 tests. Two unrelated FilePreview tests failed, then passed in the isolated rerun.
  • CI: All required GitHub checks passed. The iOS flow and one compatibility job had expected skip results.

This looks safe to merge. I left no inline comments because I found no concrete defect in the changed lines.

@SawyerHood
SawyerHood merged commit fe128ca into main Aug 20, 2026
22 of 23 checks passed
@SawyerHood
SawyerHood deleted the bb/reduce-icon-size-thr_6kr9sctwhc branch August 20, 2026 18:41
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