Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/giskard-server/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3638,7 +3638,7 @@ fn thread_activity_from_event(
server_request_id: request.id.to_string(),
};
activity.active_turn = true;
activity.summary = Some(format!("{} request", request.method));
activity.summary = Some("Waiting for your input".to_string());
}
AgentEvent::ServerRequestResolved { .. } => {
activity.summary = Some("Request resolved".into());
Expand Down
2 changes: 1 addition & 1 deletion crates/giskard-server/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,7 @@ async fn send_activity_bootstrap(
server_request_id: request.id.to_string(),
},
active_turn: true,
summary: Some(format!("{} request", request.method)),
summary: Some("Waiting for your input".to_string()),
});
}
}
Expand Down
18 changes: 10 additions & 8 deletions crates/giskard-server/static/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@
.thread-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thread.has-activity .thread-title { color:var(--fg); }
.thread.activity-running .thread-status { color:#d29922; }
.thread.activity-approval .thread-status { color:#f0d98c; }
/* "Waiting on you" — an approval or a server request; to the reader they are one state. */
.thread.activity-waiting .thread-status { color:#f0d98c; }
.thread.activity-error .thread-status { color:#f85149; }
/* Hoisted from a hidden sub-agent: same urgency colour, outlined so the row still reads as
"something under here" rather than "this thread". */
Expand Down Expand Up @@ -204,9 +205,9 @@
.subagents-btn { display:flex; align-items:center; gap:6px; }
.subagents-btn.state-idle { color:var(--muted); }
.subagents-btn.state-running { color:#f0d98c; border-color:#d29922; background:rgba(210,153,34,.08); }
/* A sub-agent blocked on an approval is waiting on the user, not on the model — it gets the
accent treatment so it separates from the merely-running state at a glance. */
.subagents-btn.state-approval { color:#ffd97d; border-color:#e3b341; background:rgba(227,179,65,.18); }
/* A sub-agent waiting on the user — for an approval or an answer — is not waiting on the model,
so it gets the accent treatment to separate it from merely-running at a glance. */
.subagents-btn.state-waiting { color:#ffd97d; border-color:#e3b341; background:rgba(227,179,65,.18); }
.subagents-popover {
position:absolute; left:0; top:34px; z-index:35; width:min(460px, calc(100vw - 24px));
max-height:70vh; overflow:auto; padding:10px; border:1px solid var(--border);
Expand All @@ -225,9 +226,9 @@
.subagent-card-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.subagent-card-state { font-size:11px; color:var(--muted); }
.subagent-card-state.running { color:#f0d98c; }
.subagent-card-state.approval { color:#ffd97d; font-weight:600; }
.subagent-card.needs-approval { border-color:#e3b341; background:rgba(227,179,65,.12); }
.subagents-summary.needs-approval { color:#ffd97d; }
.subagent-card-state.waiting { color:#ffd97d; font-weight:600; }
.subagent-card.waiting { border-color:#e3b341; background:rgba(227,179,65,.12); }
.subagents-summary.waiting { color:#ffd97d; }
.subagent-card-meta { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.usage-wrap { position:relative; margin-left:auto; }
.usage-btn { display:flex; align-items:center; gap:6px; }
Expand Down Expand Up @@ -341,7 +342,8 @@
.plan-card-body[hidden] { display:none; }
.plan-card-body .plan-explanation { margin-bottom:8px; }
.msg.approval { background:#241d10; border:1px solid #d29922; max-width:100%; }
.msg.approval-target { outline:2px solid #f0d98c; outline-offset:3px; }
/* Focus highlight for a notification click — lands on an approval or a server-request card. */
.msg.waiting-target { outline:2px solid #f0d98c; outline-offset:3px; }
.msg.approval.resolved.decision-accept,
.msg.approval.resolved.decision-session { background:#172217; border-color:#3fb950; }
.msg.approval.resolved.decision-decline { background:#2b1618; border-color:#f85149; }
Expand Down
375 changes: 210 additions & 165 deletions crates/giskard-server/static/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/giskard-server/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1>Giskard</h1>
<img class="sidebar-logo" src="/favicon.svg" width="24" height="24" alt="" aria-hidden="true" />
<b class="sidebar-title">Projects</b>
<button id="notifyTopBtn" class="notify-permission-btn" type="button"
title="Enable approval notifications" aria-label="Enable approval notifications">!</button>
title="Enable notifications when the agent needs you" aria-label="Enable notifications when the agent needs you">!</button>
<button id="newProj" title="New project">+</button>
</div>
<div id="projects"></div>
Expand All @@ -47,7 +47,7 @@ <h1>Giskard</h1>
<div class="settings-field">
<label for="notifyBtn">Notifications</label>
<button id="notifyBtn" class="notify-permission-btn" type="button"
title="Enable browser notifications for approval requests">Enable approval notifications</button>
title="Enable browser notifications when the agent needs an approval or an answer">Enable notifications</button>
</div>
<div class="settings-field">
<label for="browserDiagnosticsBtn">Diagnostics</label>
Expand Down
5 changes: 3 additions & 2 deletions crates/giskard-server/static/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
// constructor — notifications must be shown through `ServiceWorkerRegistration.showNotification()`,
// and their clicks are delivered here rather than to an `onclick` handler on the page. This worker
// activates immediately, then on a notification click focuses an existing Giskard tab (opening one
// if none is around) and forwards the notification's `data` so the page can jump to the relevant
// approval.
// if none is around) and forwards the notification's `data` so the page can jump to whatever the
// agent is waiting on — an approval or a server request. The payload is opaque here: the page sets
// it and the page reads it back, so this worker never needs to know which kind it is.

self.addEventListener("install", () => self.skipWaiting());

Expand Down
Loading
Loading