No error is a dead end: crash, click, and your agent is already looking

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 12:50:09 -04:00
parent ada0faf1d1
commit cc7d91d09c
43 changed files with 4648 additions and 327 deletions
@@ -90,17 +90,43 @@ Rectangle {
return false;
}
// Everything except the buttons: clicking the body runs the notification's
// default action, which is what GNOME does.
// A command the notification carried as data, in the `panama-exec` hint.
// Panama's escalation ladder rides this: a crash watcher that has already
// exited, or an install that failed in a terminal, still gets a clickable
// "diagnose this with your agent" -- the command IS the notification, so
// nothing has to stay alive to service an action and the click survives a
// shell restart. Read once at delivery; see services/Notifs.qml for why
// that is safe and what it deliberately does not promise.
readonly property string execCommand: Notifs.execCommand(root.notification)
readonly property bool bodyActivates: root.defaultAction !== null || root.execCommand !== ""
// Clicking the body runs the notification's default action, which is what
// GNOME does. The sender's own action wins when a notification carries
// both: an application that registered one is asking for ITS handler, and
// the hint exists for senders that cannot stay alive to serve one.
//
// The command runs through `sh -c` because it arrives as a single string
// rather than an argv -- that is the shape the hint can carry. It runs
// detached, so a notification click never blocks or outlives the shell.
function activateBody(): void {
if (root.defaultAction) {
root.defaultAction.invoke();
return;
}
if (root.execCommand === "")
return;
Quickshell.execDetached(["sh", "-c", root.execCommand]);
root.dismissed();
}
// Everything except the buttons.
MouseArea {
id: hover
anchors.fill: parent
hoverEnabled: true
cursorShape: root.defaultAction ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: {
if (root.defaultAction)
root.defaultAction.invoke();
}
cursorShape: root.bodyActivates ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: root.activateBody()
}
IconImage {