Repository navigation
Match the PR check icon to the GitHub favicon geometry - #2057
Merged
Merged
Conversation
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]>
Contributor
|
🚨 SLOP COP 🚨 · I am the SlopCop. I started the review. I will check security, code quality, performance, architecture, and the user flow. |
Contributor
There was a problem hiding this comment.
🚨 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:
ThreadMetadataContentrepeats the status rule fromgetPullRequestGithubCheckStatus. 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.
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.
What was wrong
PR #1900 replaced the GitHub favicon PNGs (fetched from github.githubassets.com) with the bundled hugeicons
Githuboutline 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
apps/app/src/components/pull-request/GithubFaviconIcon.tsxinlines the exact path data from GitHub'sfavicon.svg,favicon-success.svg,favicon-failure.svg, andfavicon-pending.svg(the mark with its cut-out plus the check / X / circle glyph). The mark fills withcurrentColor; the glyph usesfill-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) andThreadMetadataContent.tsxrender it in place of the hugeicons glyph.How you verified
pnpm exec turbo run typecheck --filter=@bb/app: pass.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).