fix(cuesheet): hide seconds option should not affect duration column

The "hide seconds" toggle in the Cuesheet table settings was also
stripping seconds from the Duration column. It should only apply to
the Start/End time tags, so the Duration column now always displays
its full precision (including seconds).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SoUSFVFdmMQN5Ro86pRvBQ
This commit is contained in:
Claude
2026-09-05 16:19:56 +00:00
parent 977b01a072
commit 36b05f499e
2 changed files with 3 additions and 4 deletions
@@ -105,10 +105,9 @@ function MakeDuration({ getValue, row, table, column }: CuesheetCellContext) {
return null; return null;
} }
const { hideTableSeconds } = table.options.meta.options;
const event = row.original; const event = row.original;
if (!isOntimeEvent(event)) { if (!isOntimeEvent(event)) {
return <MutedText numeric>{formatDuration(getValue() as number, hideTableSeconds)}</MutedText>; return <MutedText numeric>{formatDuration(getValue() as number, false)}</MutedText>;
} }
const { handleUpdateTimer } = table.options.meta; const { handleUpdateTimer } = table.options.meta;
@@ -117,7 +116,7 @@ function MakeDuration({ getValue, row, table, column }: CuesheetCellContext) {
const duration = getValue() as number; const duration = getValue() as number;
const isDurationLocked = event.timeStrategy === TimeStrategy.LockDuration; const isDurationLocked = event.timeStrategy === TimeStrategy.LockDuration;
const formattedDuration = formatDuration(duration, hideTableSeconds); const formattedDuration = formatDuration(duration, false);
const canWrite = column.columnDef.meta?.canWrite; const canWrite = column.columnDef.meta?.canWrite;
if (!canWrite) { if (!canWrite) {
@@ -140,7 +140,7 @@ function ViewSettings({ optionsStore }: ViewSettingsProps) {
defaultChecked={optionsStore.hideTableSeconds} defaultChecked={optionsStore.hideTableSeconds}
onCheckedChange={(checked) => optionsStore.setOption('hideTableSeconds', checked)} onCheckedChange={(checked) => optionsStore.setOption('hideTableSeconds', checked)}
/> />
Hide seconds in table Hide seconds in time tags
</Editor.Label> </Editor.Label>
<Editor.Label className={style.option}> <Editor.Label className={style.option}>
<Checkbox <Checkbox