feat(v0.3): H3 — remote approve/reject (no typing)
- types/protocol: ClientMessage approve/reject; ServerMessage status.pending
- server: POST /hook/permission HELD until the client decides; approve/reject
ws messages resolve it with {hookSpecificOutput.decision.behavior allow|deny};
5-min timeout + release-on-disconnect fall back to Claude's own prompt
- manager.handleHookEvent threads pending flag
- setup-hooks: PermissionRequest uses the held curl (writes decision to stdout);
status events stay fire-and-forget
- FE: terminal-session approve()/reject() + pending state; tabs approval banner
(Approve/Reject) for the active tab's held request
- Tests: protocol approve/reject; integration ⑧ held→approve→allow. 207 green.
- Browser-verified: banner 'Claude wants to use Bash' → Approve → resolves allow.
This commit is contained in:
@@ -214,6 +214,43 @@ html, body {
|
||||
box-shadow: inset 0 -2px 0 #d29922;
|
||||
}
|
||||
|
||||
/* Approve/reject banner (H3) — sits just above the key bar. */
|
||||
#approvalbar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: var(--keybar-h);
|
||||
z-index: 1050;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
background: #3a2a10;
|
||||
border-top: 1px solid #d29922;
|
||||
color: #ffcf8f;
|
||||
font-size: 14px;
|
||||
}
|
||||
.approval-label {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
#approvalbar button {
|
||||
flex: none;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 7px 16px;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
}
|
||||
.approval-yes {
|
||||
background: #2ea043;
|
||||
color: #fff;
|
||||
}
|
||||
.approval-no {
|
||||
background: #c93c37;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Drag-to-reorder feedback. */
|
||||
.tab.dragging {
|
||||
opacity: 0.4;
|
||||
|
||||
Reference in New Issue
Block a user