The safety layer: two presses for anything you cannot take back

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 00:39:07 -04:00
parent 8b1205e4b8
commit 88371d19f0
17 changed files with 447 additions and 36 deletions
@@ -251,11 +251,16 @@ SettingsPage {
width: parent.width
label: String(jobRow.modelData.name ?? "Untitled")
detail: String(jobRow.modelData.printer ?? "") + " · "
// Armed, the row makes the Hold/Cancel distinction the service
// was built around: holding keeps the job, cancelling throws it
// away and the document has to be sent from the app again.
detail: cancelJob.armed
? "The job is thrown away — printing it means sending it from the app again. Hold keeps it in the queue instead."
: String(jobRow.modelData.printer ?? "") + " · "
+ String(jobRow.modelData.state ?? "")
+ (Number(jobRow.modelData.pages ?? 0) > 0
? " · " + jobRow.modelData.pages + " pages" : "")
controlWidth: 175
controlWidth: 265
divider: jobRow.index < Printers.jobs.length - 1
Row {
@@ -275,11 +280,18 @@ SettingsPage {
: Printers.hold(Number(jobRow.modelData.id))
}
SettingsButton {
ConfirmAction {
id: cancelJob
anchors.verticalCenter: parent.verticalCenter
text: "Cancel"
actionId: "cancel-job:" + String(jobRow.modelData.id ?? "")
armText: "Cancel…"
confirmText: "Cancel it"
// Not "Keep": the job is not being kept in a drawer, it
// carries on out of the printer.
cancelText: "Keep printing"
enabled: !Printers.busy
onClicked: Printers.cancel(Number(jobRow.modelData.id))
onConfirmed: Printers.cancel(Number(jobRow.modelData.id))
}
}
}