fix: Archive button for archive-only deletes, single delete doc, inert Multiple triggers label in View

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Diego Imbert
2026-09-30 20:19:05 +02:00
co-authored by Claude Opus 5.5
parent ccfb259080
commit 8f6118c0e1
3 changed files with 11 additions and 2 deletions
@@ -468,6 +468,12 @@
fix={data.foldedFixes[0]}
label={`${data.foldedFixes.length} error${data.foldedFixes.length === 1 ? '' : 's'} · Fix`}
/>
{:else if upstream && coTriggers.length > 1 && !coTriggers.some((t) => t.onOpen)}
<!-- Several triggers, none editable here (View mode): a plain label. -->
<span
class="truncate rounded-md border px-1.5 py-1 text-3xs leading-none font-normal border-gray-300 dark:border-gray-600 text-secondary"
>Multiple triggers</span
>
{:else if upstream && coTriggers.length > 1}
<!-- Several triggers start what builds this asset: one chip, a menu to pick
the one to edit. -->
@@ -19,7 +19,6 @@ export type ViewEdge = {
export const noAssetNodeId = (runnableId: string) => `no-asset:${runnableId}`
export const isNoAssetNode = (id: string) => id.startsWith('no-asset:')
/** The script and trigger an assets-only asset's delete removes. */
/** What an assets-only delete removes: the script, its trigger, or both. */
export type AssetUpstreamDelete = {
script?: { path: string; unsaved: boolean }
@@ -3531,7 +3531,11 @@
: assetDeleteTarget?.script
? `${canHardDeleteScripts ? 'Delete' : 'Archive'} script?`
: 'Delete trigger?'}
confirmationText="Delete"
confirmationText={assetDeleteTarget?.script && !canHardDeleteScripts
? assetDeleteTarget.trigger
? 'Archive and delete'
: 'Archive'
: 'Delete'}
onConfirmed={confirmAssetUpstreamDelete}
onCanceled={() => {
if (!assetDeleteLoading) assetDeleteTarget = undefined