From ca8a98c6c21e6c4b0a7edaf1dd39d3e899a4c9b0 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Thu, 14 May 2026 18:33:07 +0200 Subject: [PATCH] feat(history): add record numbering and column names to Change History MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Show total record count and filtered count in subtitle - Add #N global number to each history entry row - Add # column index inside each change detail table - Column header already shown via headers[i] — now labeled "Column" Co-Authored-By: claude-flow --- src/components/HistoryView.tsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/HistoryView.tsx b/src/components/HistoryView.tsx index 77a8039..025a331 100644 --- a/src/components/HistoryView.tsx +++ b/src/components/HistoryView.tsx @@ -112,7 +112,11 @@ export function HistoryView({ headers, data, onRevert, onEdit }: HistoryViewProp Change History -

Review and revert any changes made to products.

+

+ {history.length > 0 ? ( + <>{history.length} total records{filteredHistory.length !== history.length && <> — showing {filteredHistory.length}} + ) : 'Review and revert any changes made to products.'} +

@@ -161,22 +165,27 @@ export function HistoryView({ headers, data, onRevert, onEdit }: HistoryViewProp
) : (
- {filteredHistory.map((entry) => { + {filteredHistory.map((entry, filteredIdx) => { const isExpanded = expandedId === entry.id; const changes = getChangedFields(entry.old_data, entry.new_data); - + const globalNumber = history.indexOf(entry) + 1; + return (
{/* Summary Row */} -
setExpandedId(isExpanded ? null : entry.id)} > {isExpanded ? : } - + +
+ #{globalNumber} +
+
@@ -236,7 +245,8 @@ export function HistoryView({ headers, data, onRevert, onEdit }: HistoryViewProp - + + @@ -244,6 +254,7 @@ export function HistoryView({ headers, data, onRevert, onEdit }: HistoryViewProp {changes.map((change, idx) => ( +
Field#Column Original Value New Value
{idx + 1} {change.header}