Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/platformIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const PLATFORM_TO_ICON = {
"apple-tv": "apple-tv",
"apple-watch": "apple-watch",
arm: "arm",
bazzite: "bazzite",
bun: "bun",
capacitor: "capacitor",
chrome: "chrome",
Expand Down Expand Up @@ -227,6 +228,7 @@ export const PLATFORM_TO_ICON = {
safari: "safari",
samsung: "samsung",
scala: "scala",
steamos: "steamos",
stride3d: "stride3d",
supabase: "supabase",
sql: "sql",
Comment on lines 228 to 234
Copy link

Choose a reason for hiding this comment

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

Bug: steamos and vercel icons lack svg_80x80 versions, causing module resolution failure when PlatformIcon is rendered with format="lg".
Severity: CRITICAL | Confidence: 0.95

🔍 Detailed Analysis

When the PlatformIcon component is rendered with format="lg" for steamos or vercel icons, the dynamic require() call attempts to load svg_80x80/steamos.svg or svg_80x80/vercel.svg. These SVG files are not present in the codebase, leading to a module resolution failure during either build time or runtime. This will result in an application crash.

💡 Suggested Fix

Add the svg_80x80/steamos.svg and svg_80x80/vercel.svg files to the project to ensure all icon formats are available as expected by the PlatformIcon component.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/platformIcon.tsx#L228-L234

Potential issue: When the `PlatformIcon` component is rendered with `format="lg"` for
`steamos` or `vercel` icons, the dynamic `require()` call attempts to load
`svg_80x80/steamos.svg` or `svg_80x80/vercel.svg`. These SVG files are not present in
the codebase, leading to a module resolution failure during either build time or
runtime. This will result in an application crash.

Did we get this right? 👍 / 👎 to inform future reviews.

Expand All @@ -241,6 +243,7 @@ export const PLATFORM_TO_ICON = {
unreal: "unreal",
unrealengine: "unreal",
uwp: "windows",
vercel: "vercel",
visualbasic: "visual-basic",
vscode: "vscode",
windows: "windows",
Expand Down
8 changes: 8 additions & 0 deletions svg/bazzite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions svg/steamos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions svg/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions svg_80x80/bazzite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions svg_80x80/steamos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions svg_80x80/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading