From b2db7afabe9a12a4749c23f70b2ea204311a560d Mon Sep 17 00:00:00 2001 From: ELITA Date: Sun, 31 May 2026 21:02:47 +0530 Subject: [PATCH 1/4] perf: memoize IssueCard to avoid unnecessary rerenders --- package-lock.json | 4 +++ src/panel/components/IssueCard.tsx | 49 +++++++++++++++--------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5534842..f38abcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,10 @@ "vite": "^5.0.12", "vitest": "^4.0.18", "wrangler": "^4.67.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hoainho" } }, "node_modules/@acemir/cssom": { diff --git a/src/panel/components/IssueCard.tsx b/src/panel/components/IssueCard.tsx index b050d60..40c4fa4 100644 --- a/src/panel/components/IssueCard.tsx +++ b/src/panel/components/IssueCard.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import React, { useState } from 'react'; import type { Issue } from '@/types'; interface IssueCardProps { @@ -79,13 +79,14 @@ const ISSUE_INFO: Record

{info.title}

- {severity.label} @@ -160,7 +161,7 @@ export function IssueCard({ issue }: IssueCardProps) { {location?.closureInfo && (
- Closure Timeline: + 🔍 Closure Timeline:
Created @@ -176,7 +177,7 @@ export function IssueCard({ issue }: IssueCardProps) {
- +
Function: @@ -219,7 +220,7 @@ export function IssueCard({ issue }: IssueCardProps) { )}
- Suggestion: + 💡 Suggestion:

{issue.suggestion}

@@ -232,20 +233,18 @@ export function IssueCard({ issue }: IssueCardProps) {
)} -
- {info.learnUrl && ( - - Learn more - - )} -
+ {info.learnUrl && ( + + 📚 Learn more + + )}
)}
); -} +}); \ No newline at end of file From df0c6ebb7dbe780ae8de934b98cd4b0da697b2d3 Mon Sep 17 00:00:00 2001 From: ELITA Date: Sun, 31 May 2026 23:18:07 +0530 Subject: [PATCH 2/4] revised perf: memoize IssueCard to avoid unnecessary rerenders --- package-lock.json | 4 ---- src/panel/components/IssueCard.tsx | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index f38abcf..5534842 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,10 +28,6 @@ "vite": "^5.0.12", "vitest": "^4.0.18", "wrangler": "^4.67.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/hoainho" } }, "node_modules/@acemir/cssom": { diff --git a/src/panel/components/IssueCard.tsx b/src/panel/components/IssueCard.tsx index 40c4fa4..0150f16 100644 --- a/src/panel/components/IssueCard.tsx +++ b/src/panel/components/IssueCard.tsx @@ -79,9 +79,8 @@ const ISSUE_INFO: Record Date: Mon, 1 Jun 2026 18:01:55 +0530 Subject: [PATCH 3/4] fix(ui): restore action badge icons and issue-actions wrapper --- src/panel/components/IssueCard.tsx | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/panel/components/IssueCard.tsx b/src/panel/components/IssueCard.tsx index 0150f16..3da4474 100644 --- a/src/panel/components/IssueCard.tsx +++ b/src/panel/components/IssueCard.tsx @@ -160,7 +160,7 @@ export const IssueCard = React.memo(function IssueCard({ issue }: IssueCardProps {location?.closureInfo && (
- 🔍 Closure Timeline: + Closure Timeline:
Created @@ -219,7 +219,7 @@ export const IssueCard = React.memo(function IssueCard({ issue }: IssueCardProps )}
- 💡 Suggestion: + Suggestion:

{issue.suggestion}

@@ -232,18 +232,20 @@ export const IssueCard = React.memo(function IssueCard({ issue }: IssueCardProps
)} - {info.learnUrl && ( - - 📚 Learn more - - )} +
+ {info.learnUrl && ( + + Learn more + + )} +
)}
); -}); \ No newline at end of file +}); From 24773520d2046369be8b8005dd183f6cec297805 Mon Sep 17 00:00:00 2001 From: ELITA Date: Tue, 2 Jun 2026 13:24:20 +0530 Subject: [PATCH 4/4] revert: remove ISSUE_INFO entries that lack corresponding detectors --- src/panel/components/IssueCard.tsx | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/panel/components/IssueCard.tsx b/src/panel/components/IssueCard.tsx index 3da4474..ba6cd21 100644 --- a/src/panel/components/IssueCard.tsx +++ b/src/panel/components/IssueCard.tsx @@ -12,11 +12,7 @@ const SEVERITY_CONFIG = { }; const ISSUE_INFO: Record = { - DIRECT_STATE_MUTATION: { - title: 'Direct State Mutation', - why: 'React cannot detect direct state mutations and will not re-render the component.', - learnUrl: 'https://react.dev/learn/updating-objects-in-state', - }, + MISSING_KEY: { title: 'Missing Key in List', why: 'Keys help React identify which items have changed, are added, or removed.', @@ -27,11 +23,7 @@ const ISSUE_INFO: Record