From f19a662bd3ec63c76783da0a2399e54ee3ee715c Mon Sep 17 00:00:00 2001 From: Benjamin Hardy Date: Thu, 9 Jul 2026 13:19:16 +0200 Subject: [PATCH] Improved naming scheme for backup snapshot names --- frontend/src/components/HistoryPanel.tsx | 30 +++++++++++++++---- frontend/src/components/PathMappingDialog.tsx | 2 +- frontend/src/components/Sidebar.tsx | 5 ++-- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/HistoryPanel.tsx b/frontend/src/components/HistoryPanel.tsx index 85ad1f2..f312c2b 100644 --- a/frontend/src/components/HistoryPanel.tsx +++ b/frontend/src/components/HistoryPanel.tsx @@ -21,6 +21,17 @@ function formatWhen(iso: string): string { }) } +// Backend joins the summary's parts with "; " (e.g. "Added 6 hotcues; edited +// beatgrid on 3 tracks"). Split them back out so each renders as its own chip +// that wraps โ€” far more scannable than one truncated run-on line. +function summaryChips(summary: string): string[] { + return summary + .split('; ') + .map((p) => p.trim()) + .filter(Boolean) + .map((p) => p.charAt(0).toUpperCase() + p.slice(1)) +} + /** * Version history browser for the current collection. Every save is a commit in * a purely-local git repo (see backend history.py); this lists them newest-first @@ -96,18 +107,25 @@ export function HistoryPanel({ onClose, onNotify, onError }: Props) { return (
  • -
    - {e.summary} +
    {isCurrent && ( - + current )} + {summaryChips(e.summary).map((chip, ci) => ( + + {chip} + + ))}
    -
    +
    {formatWhen(e.timestamp)} ยท {e.id.slice(0, 8)}
    @@ -132,7 +150,7 @@ export function HistoryPanel({ onClose, onNotify, onError }: Props) { onClick={() => setConfirmingId(e.id)} disabled={isCurrent} title={isCurrent ? 'This is the current version' : 'Restore this version'} - className="shrink-0 rounded-md border border-line px-2.5 py-1 text-xs text-muted opacity-0 transition-opacity hover:bg-ink-800 hover:text-text group-hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-0" + className="mt-0.5 shrink-0 rounded-md border border-line px-2.5 py-1 text-xs text-muted opacity-0 transition-opacity hover:bg-ink-800 hover:text-text group-hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-0" > Restore diff --git a/frontend/src/components/PathMappingDialog.tsx b/frontend/src/components/PathMappingDialog.tsx index 3785031..1f2664f 100644 --- a/frontend/src/components/PathMappingDialog.tsx +++ b/frontend/src/components/PathMappingDialog.tsx @@ -281,7 +281,7 @@ function FolderBrowser({ {data?.path ?? 'โ€ฆ'}
    -
    +
    {data?.dirs.length ? ( data.dirs.map((d) => (