Implement the following plan: Plan: Group Action Summary by Evaluator Type Context The…
- User
Implement the following plan:
Plan: Group Action Summary by Evaluator Type
Context
The Action Summary section in the RemediateTab currently renders a flat list of all remediation actions. Each action redundantly shows its evaluator name prefix (e.g., "outdated-documentation: Outdated Documentation") inline, making the list hard to scan when multiple actions come from the same evaluator. The user wants actions grouped by evaluator type with bullet point lists.
Changes
Single file to modify:
frontend/src/components/RemediateTab.tsx—ActionSummarySectioncomponent (lines 1022-1106)1. Add helper function (before the component, ~line 1022)
Extract display name from
issueTitle:typescriptfunction getGroupDisplayName(issueTitle: string): string { const colonIndex = issueTitle.indexOf(": "); return colonIndex >= 0 ? issueTitle.slice(colonIndex + 2) : issueTitle; }The
issueTitleformat is always"evaluatorSlug: Category Name"(set insrc/shared/remediation/engine.ts:104).2. Add grouping logic inside the component (after
allActionsdefinition)Group actions by
issueTitleusing aMap(preserves insertion order):typescriptconst groupedActions = useMemo(() => { const groups = new Map<string, RemediationAction[]>(); for (const action of allActions) { const key = action.issueTitle ?? "Other"; const existing = groups.get(key); if (existing) existing.push(action); else groups.set(key, [action]); } return groups; }, [summary.errorFixActions, summary.suggestionEnrichActions]);3. Replace flat list with grouped rendering
Before (flat):
code Assistant
Let me start by reading the current
RemediateTab.tsxfile to understand the existing code structure.- User
[Request interrupted by user]
- User
continue
Assistant
Let me check the imports and types used in the file.
Assistant
Good,
useMemois already imported. Now let me implement the changes.Assistant
Now let me run the tests, lint, and typecheck.
Assistant
All 1216 tests pass. Now let me run lint and typecheck.
Assistant
Biome wants
allActionsas the dependency since it's the actual variable used inside the memo. I need to either useallActionsas the dependency (but it's recreated each render) or inline the array construction inside the memo. Let me inline it to avoid the intermediate variable.Assistant
All checks pass. Let me also run the tests once more to confirm everything is clean.
Assistant
All 1216 tests pass, lint is clean, and typecheck passes.
Here's a summary of the changes made to
frontend/src/components/RemediateTab.tsx:-
Added
getGroupDisplayName()helper (line ~1029) — strips the"evaluatorSlug: "prefix fromissueTitleto get a clean display name like "Outdated Documentation" instead of "outdated-documentation: Outdated Documentation". -
Replaced flat action list with grouped rendering in
ActionSummarySection:- Actions are grouped by
issueTitleusing aMapinsideuseMemo(preserves insertion order) - Each group has a header row showing the category name (left) and action count badge (right)
- Actions within each group are indented with
pl-4 border-l border-slate-700/50for visual hierarchy - The redundant evaluator prefix is removed from individual action rows — the group header provides that context
- Same status icons (green checkmark / slate minus) and file badges are preserved
- Actions are grouped by
-