From 893a395529010701bfd81cdeed60d6ae69e06cf6 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 17 Sep 2026 22:22:46 -0400 Subject: [PATCH] Give the operation badge its own column, and drop seq "referenceYTD Sales" ran together because the badge shared the note column, and that column had lost width to label and counts-toward. The badge is a fixed-width token, so it gets a column of its own and stops competing with free text. seq goes with it. The label carries the sort order now -- it is typed with its own "01 - " prefix -- so a separate ordinal column is one more thing to keep in agreement with it for no gain. saveSeq and its state go too. Co-Authored-By: Claude Opus 5 (1M context) --- ui/src/views/Baseline.jsx | 40 +++++++++------------------------------ 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/ui/src/views/Baseline.jsx b/ui/src/views/Baseline.jsx index d193697..6df4e77 100644 --- a/ui/src/views/Baseline.jsx +++ b/ui/src/views/Baseline.jsx @@ -141,7 +141,6 @@ export default function Baseline({ sources = [], sourceId, versions = [], versio // are carried into the pivot as a "01 · " prefix, because Perspective orders // column groups by the value string and no sort setting can express an // arbitrary order. - const [seqs, setSeqs] = useState({}) const [bucketOrder, setBucketOrder] = useState([]) // Label and bucket are presentation, not definition: they change what the pivot @@ -180,22 +179,6 @@ export default function Baseline({ sources = [], sourceId, versions = [], versio } } - async function saveSeq(entry, value) { - const raw = String(value).trim() - const next = raw === '' ? null : parseInt(raw) - if (raw !== '' && !Number.isFinite(next)) { flash('Sequence must be a number', 'error'); return } - if (next === (entry.seq ?? null)) return - try { - const res = await fetch(`/api/log/${entry.id}`, { - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ seq: next }), - }) - if (!res.ok) { const d = await res.json(); flash(d.error, 'error'); return } - loadLog() - flash('Order saved') - } catch (err) { flash(err.message, 'error') } - } async function saveBucketOrder(next) { setBucketOrder(next) @@ -486,8 +469,8 @@ export default function Baseline({ sources = [], sourceId, versions = [], versio # - seq - label + kind + label note counts toward rows @@ -525,15 +508,13 @@ export default function Baseline({ sources = [], sourceId, versions = [], versio > {isOpen ? '▾' : '▸'} {log.length - i} - e.stopPropagation()}> - setSeqs(v => ({ ...v, [entry.id]: e.target.value }))} - onBlur={e => saveSeq(entry, e.target.value)} - placeholder="—" - className="w-10 text-right border border-transparent hover:border-gray-200 - focus:border-blue-400 rounded px-1 py-0.5 text-xs - focus:outline-none bg-transparent tabular-nums" /> + {/* The operation badge gets its own column. Sharing one with + the note put "reference" hard against "YTD Sales" as soon + as the note column lost width to label and bucket. */} + + + {entry.operation} + e.stopPropagation()}> - - {entry.operation} - {entry.note || } e.stopPropagation()}>