Confirmation is currently a per-page convention, which is why gaps keep appearing (see the missing-confirmation issue). With 34 pages this will keep drifting.
Current state
- 13 pages use the shared partial:
/var/www/reviewos-reviewos/releases/74d992a/resources/views/layouts/app.stx:2950:322: include error: Error loading include file .../partials/op-confirm: ENOENT: no such file or directory, open '/var/www/reviewos-reviewos/releases/74d992a/resources/components/.../partials/op-confirm.stx' [1m[31m╭──────────────────────────────────────────────────────────────╮[0m [1m[31m│[0m [1m[41m ERROR [0m [31mInclude Error[0m [1m[31m│[0m [1m[31m╰──────────────────────────────────────────────────────────────╯[0m [36m[1mFile:[0m [2mapp.stx[0m [90m(line 2950, col 322)[0m [33m[1mMessage:[0m Error loading include file .../partials/op-confirm: ENOENT: no such file or directory, open '/var/www/reviewos-reviewos/releases/74d992a/resources/components/.../partials/op-confirm.stx' [34m[1mContext:[0m [2m 2948: 2949: > 2950:—2951: 2952: [0mConfirmation is currently a per-page convention, which is why gaps keep appearing (see the missing-confirmation issue). With 34 pages this will keep drifting.
Current state
- 13 pages use the shared partial:
/var/www/reviewos-reviewos/releases/74d992a/resources/views/layouts/app.stx:2950:1530: include error: Error loading include file .../partials/op-confirm: ENOENT: no such file or directory, open '/var/www/reviewos-reviewos/releases/74d992a/resources/components/.../partials/op-confirm.stx' [1m[31m╭──────────────────────────────────────────────────────────────╮[0m [1m[31m│[0m [1m[41m ERROR [0m [31mInclude Error[0m [1m[31m│[0m [1m[31m╰──────────────────────────────────────────────────────────────╯[0m [36m[1mFile:[0m [2mapp.stx[0m [90m(line 2950, col 1530)[0m [33m[1mMessage:[0m Error loading include file .../partials/op-confirm: ENOENT: no such file or directory, open '/var/www/reviewos-reviewos/releases/74d992a/resources/components/.../partials/op-confirm.stx' [34m[1mContext:[0m [2m 2948: 2949: > 2950:—2951: 2952: [0mConfirmation is currently a per-page convention, which is why gaps keep appearing (see the missing-confirmation issue). With 34 pages this will keep drifting.
Current state
- 13 pages use the shared partial:
/var/www/reviewos-reviewos/releases/74d992a/resources/views/layouts/app.stx:2966:46: include error: Error loading include file .../partials/op-confirm: ENOENT: no such file or directory, open '/var/www/reviewos-reviewos/releases/74d992a/resources/components/.../partials/op-confirm.stx' [1m[31m╭──────────────────────────────────────────────────────────────╮[0m [1m[31m│[0m [1m[41m ERROR [0m [31mInclude Error[0m [1m[31m│[0m [1m[31m╰──────────────────────────────────────────────────────────────╯[0m [36m[1mFile:[0m [2mapp.stx[0m [90m(line 2966, col 46)[0m [33m[1mMessage:[0m Error loading include file .../partials/op-confirm: ENOENT: no such file or directory, open '/var/www/reviewos-reviewos/releases/74d992a/resources/components/.../partials/op-confirm.stx' [34m[1mContext:[0m [2m 2964: 2965: > 2966: 2967: 2968: [0m—serverless.stx:131,serverless/{functions,deployments,queues,scheduler,assets,data},server/{sites,backups,actions,services,workers,deployments}. - 4 pages hand-roll an equivalent bar:
server/firewall.stx:123-128,server/team.stx,serverless/secrets.stx:104-109,serverless/alarms.stx:118-123. - The
askOp/cancelOp/runOp/confirmTok/confirmVerb/canRunblock is copy-pasted nearly verbatim in 11 files.
Divergences between the two
- Button label: the partial says "Run"; hand-rolled ones say "Remove"/"Delete".
server/firewall.stx:126says "Run" while its trigger says "Remove". - The partial's confirm button is a plain
btn; hand-rolled usebtn danger— so the shared bar renders a non-danger button even forbackup:restore. - All four hand-rolled bars omit the
<pre class="action-output">, discarding stdout/stderr from the API. type="button"is missing on the confirm/cancel buttons in the partial and all four copies.
Suggested direction
Extract a
useOpConfirm(endpoint)composable so a destructive call can't be made without routing through it, and make the partial's label/severity configurable so the hand-rolled copies can be deleted. Ideally forgetting the confirm becomes impossible rather than merely discouraged.Related cleanup: four different feedback mechanisms coexist (
opOutput/opShown,message/messageKind,msg/msgOk,output/outputShown) — worth unifying on oneuseMessage().serverless.stx:131,serverless/{functions,deployments,queues,scheduler,assets,data},server/{sites,backups,actions,services,workers,deployments}. - 13 pages use the shared partial:
- 4 pages hand-roll an equivalent bar:
server/firewall.stx:123-128,server/team.stx,serverless/secrets.stx:104-109,serverless/alarms.stx:118-123. - The
askOp/cancelOp/runOp/confirmTok/confirmVerb/canRunblock is copy-pasted nearly verbatim in 11 files.
Divergences between the two
- Button label: the partial says "Run"; hand-rolled ones say "Remove"/"Delete".
server/firewall.stx:126says "Run" while its trigger says "Remove". - The partial's confirm button is a plain
btn; hand-rolled usebtn danger— so the shared bar renders a non-danger button even forbackup:restore. - All four hand-rolled bars omit the
<pre class="action-output">, discarding stdout/stderr from the API. type="button"is missing on the confirm/cancel buttons in the partial and all four copies.
Suggested direction
Extract a
useOpConfirm(endpoint)composable so a destructive call can't be made without routing through it, and make the partial's label/severity configurable so the hand-rolled copies can be deleted. Ideally forgetting the confirm becomes impossible rather than merely discouraged.Related cleanup: four different feedback mechanisms coexist (
opOutput/opShown,message/messageKind,msg/msgOk,output/outputShown) — worth unifying on oneuseMessage().serverless.stx:131,serverless/{functions,deployments,queues,scheduler,assets,data},server/{sites,backups,actions,services,workers,deployments}. - 13 pages use the shared partial:
- 4 pages hand-roll an equivalent bar:
server/firewall.stx:123-128,server/team.stx,serverless/secrets.stx:104-109,serverless/alarms.stx:118-123. - The
askOp/cancelOp/runOp/confirmTok/confirmVerb/canRunblock is copy-pasted nearly verbatim in 11 files.
Divergences between the two
- Button label: the partial says "Run"; hand-rolled ones say "Remove"/"Delete".
server/firewall.stx:126says "Run" while its trigger says "Remove". - The partial's confirm button is a plain
btn; hand-rolled usebtn danger— so the shared bar renders a non-danger button even forbackup:restore. - All four hand-rolled bars omit the
<pre class="action-output">, discarding stdout/stderr from the API. type="button"is missing on the confirm/cancel buttons in the partial and all four copies.
Suggested direction
Extract a useOpConfirm(endpoint) composable so a destructive call can't be made without routing through it, and make the partial's label/severity configurable so the hand-rolled copies can be deleted. Ideally forgetting the confirm becomes impossible rather than merely discouraged.
Related cleanup: four different feedback mechanisms coexist (opOutput/opShown, message/messageKind, msg/msgOk, output/outputShown) — worth unifying on one useMessage().