Merge branch 'main' into web-settings

This commit is contained in:
2026-10-19 11:31:45 +01:00
9 changed files with 2450 additions and 39 deletions
+156
View File
@@ -1557,6 +1557,162 @@ code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-
.chat-running-tool-elapsed { font-size: 11px; }
.chat-running-tool-long { color: var(--bad); }
/* C10: the permission/approval card — the transcript's last item. A pending card
wears an amber hairline border, echoing ChatApprovalCard.kt's 50%-alpha amber
border; the amber RISK REVIEW box is the app's 12%-alpha amber panel. */
.chat-approval {
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 10px;
}
/* Background tasks (C11): running shells only, three visible rows then scroll. */
.chat-bg-tasks { display: grid; gap: 6px; }
.chat-bg-tasks-head { display: flex; align-items: baseline; gap: 8px; }
.chat-bg-tasks-title { font-size: 13px; font-weight: 600; }
.chat-bg-tasks-count { font-size: 12px; }
.chat-bg-tasks-list {
display: grid;
gap: 4px;
/* Exactly BACKGROUND_TASK_VISIBLE_ROWS (3) rows of 40px + their 2 gaps of 4px
(the Android derivation `(minTouch + SPACING_XS) * 3`); past that it scrolls. */
max-height: 128px;
overflow-y: auto;
padding-right: 2px;
}
.chat-bg-task {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
min-height: 40px;
padding: 4px 10px;
text-align: left;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
color: var(--text);
font-size: 12px;
cursor: pointer;
}
.chat-bg-task:hover { background: var(--surface-2); }
.chat-bg-task.selected { border-color: var(--accent); }
.chat-bg-task:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chat-bg-task-glyph {
flex: 0 0 auto;
width: 0;
height: 0;
border-left: 7px solid var(--accent);
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
.chat-bg-task-status { flex: 0 0 auto; color: var(--accent); }
.chat-bg-task-command {
flex: 1 1 auto;
min-width: 0;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-bg-task-details { flex: 0 0 auto; font-size: 11px; }
.chat-bg-task-detail {
display: grid;
gap: 4px;
margin-top: 4px;
padding: 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 10px;
}
.chat-approval-pending { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.chat-approval-head { display: flex; gap: 10px; align-items: center; }
.chat-approval-shield { flex: 0 0 auto; width: 16px; height: 16px; color: var(--warn); }
.chat-approval-titles { display: grid; gap: 2px; min-width: 0; }
.chat-approval-headline { font-weight: 600; }
.chat-approval-status { font-size: 12px; }
/* The resources box is a padded frame around a padding-free clamp block. The
clamp must sit on an element with no bottom padding: `overflow:hidden` clips at
the padding box, so clamping the padded element itself still paints the top of
the seventh line into that 8px strip. The inner block clips at its own content
edge, so no seventh glyph is visible. */
.chat-approval-resources {
padding: 8px 10px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 8px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
line-height: 18px;
}
.chat-approval-resources-text {
margin: 0;
font: inherit;
white-space: pre-wrap;
overflow-wrap: anywhere;
/* The six-visible-line cap (ChatApprovalCard.kt maxLines = 6, Ellipsis): -webkit
-line-clamp counts *rendered* lines, so a long resource that wraps is elided
on the sixth line instead of spilling past it, exactly like the app. */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 6;
overflow: hidden;
}
.chat-approval-risk {
display: flex;
flex-direction: column;
gap: 4px;
padding: 8px 10px;
border-radius: 8px;
background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.chat-approval-risk-head { display: flex; gap: 4px; align-items: center; }
.chat-approval-risk-shield { flex: 0 0 auto; width: 12px; height: 12px; color: var(--warn); }
.chat-approval-risk-label { color: var(--warn); font-size: 11px; letter-spacing: 0.06em; }
.chat-approval-risk-text { font-size: 12px; }
.chat-approval-controls { display: flex; gap: 10px; }
.chat-approval-control { padding: 6px 12px; }
/* The app renders Allow once as a filled Button and the other two as
TextButtons (ChatApprovalCard.kt:98-100); the browser matches that hierarchy
with the filled accent treatment on the primary control. */
.chat-approval-control.primary {
background: var(--accent);
border-color: var(--accent);
color: var(--bg);
font-weight: 600;
}
.chat-approval-control.primary:hover {
background: color-mix(in srgb, var(--accent) 88%, white);
border-color: color-mix(in srgb, var(--accent) 88%, white);
}
.chat-approval-jump { white-space: nowrap; font-size: 12px; border-color: var(--warn); color: var(--warn); }
.chat-bg-task-label { font-size: 11px; }
.chat-bg-task-command-full { font-size: 12px; overflow-wrap: anywhere; }
.chat-bg-task-id { font-size: 12px; }
.chat-bg-task-status-line { font-size: 12px; }
.chat-bg-task-output {
margin: 0;
max-height: 220px;
overflow: auto;
padding: 8px;
font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
white-space: pre-wrap;
overflow-wrap: anywhere;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 8px;
}
.chat-bg-task-note { font-size: 11px; }
.chat-bg-task-spinner { width: 12px; height: 12px; border-width: 2px; }
.chat-bg-task-error-row { display: flex; align-items: center; gap: 8px; }
.chat-bg-task-error { font-size: 12px; color: var(--bad); }
.chat-bg-task-retry,
.chat-bg-task-refresh { align-self: flex-start; padding: 2px 10px; font-size: 12px; }
.chat-tool-panel {
position: fixed;
z-index: 40;