Draft fields in a panel block; approval card on panel so its buttons show

This commit is contained in:
Callum Alpass committed 2026-11-03 00:32:21 +11:00
1 parent f54ea6ad42
commit 67c8a79275
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
import { ClickRow } from "./Button.tsx";
import { BAR } from "./edges.ts";
import { colors } from "./theme.ts";
export interface DraftLine {
@@ -22,7 +23,7 @@ export function DraftView(props: { readonly lines: readonly DraftLine[] }) {
<box flexGrow={1} />
<text fg={colors.faint}>esc cancel</text>
</box>
<box flexDirection="column" marginTop={1}>
<box flexDirection="column" marginTop={1} border={["left"]} customBorderChars={BAR} borderColor={colors.border} backgroundColor={colors.panel} paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={1}>
{props.lines.map((line) => (
<ClickRow key={line.key} flexDirection="row" height={1} onPress={line.onPick}>
<text fg={colors.muted} flexShrink={0}>{line.label.padEnd(labelWidth)}</text>
+1 -1
View File
@@ -300,7 +300,7 @@ export function childThreadOf(entry: WorkLogEntry): ThreadId | null {
function EventRow({ item, pending, onRespond }: { readonly onRespond: (decision: ProviderApprovalDecision) => void; readonly item: MessagesTimelineRow extends infer R ? (R extends { kind: "event"; projectedItem: { item: infer I } } ? I : never) : never; readonly pending: boolean }) {
if (item.type === "approval_request" && pending) {
return (
<box marginTop={1} border={["left"]} customBorderChars={BAR} borderColor={colors.warn} backgroundColor={colors.element} flexDirection="column" paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={2}>
<box marginTop={1} border={["left"]} customBorderChars={BAR} borderColor={colors.warn} backgroundColor={colors.panel} flexDirection="column" paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={2}>
<text fg={colors.warn}>
<strong>{approvalTitle(item.requestKind)}</strong>
</text>