transcript changes
This commit is contained in:
@@ -1017,6 +1017,16 @@ struct RowView: View {
|
||||
case .note(let note):
|
||||
NoteView(note: note, cancelVisible: row.id == model.builder.lastMergeAfterReview)
|
||||
|
||||
case .review(let note, let blocks):
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
NoteView(note: note, cancelVisible: false)
|
||||
MarkdownView(blocks: blocks, ctx: md)
|
||||
.padding(.leading, 10)
|
||||
.overlay(alignment: .leading) {
|
||||
Rectangle().fill(Palette.border).frame(width: 1)
|
||||
}
|
||||
}
|
||||
|
||||
case .handoff:
|
||||
DetailsBox(boxed: false) {
|
||||
NoteView(note: row.summary ?? Note(parts: []), cancelVisible: false)
|
||||
@@ -1068,7 +1078,7 @@ private struct QuestionBubble: View {
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(open ? Palette.warnTint : Palette.surface, in: RoundedRectangle(cornerRadius: 10))
|
||||
.background(open ? Palette.warnTint : Palette.warnFaint, in: RoundedRectangle(cornerRadius: 10))
|
||||
.overlay(RoundedRectangle(cornerRadius: 10).stroke(hover ? Palette.accent : open ? Palette.warn.opacity(0.55) : Palette.border))
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
|
||||
@@ -14,6 +14,7 @@ enum Palette {
|
||||
static let dangerTint = dynamic(0xfdecea, 0x3a1f1d)
|
||||
static let warn = dynamic(0x855600, 0xf2c66d)
|
||||
static let warnTint = dynamic(0xfdf3dc, 0x352a14)
|
||||
static let warnFaint = dynamic(0xfcf8ec, 0x221f19)
|
||||
static let ok = dynamic(0x1a7f37, 0x7fd88f)
|
||||
static let okTint = dynamic(0xe5f4e9, 0x1b3322)
|
||||
static let task0 = dynamic(0xa4273f, 0xfe9fa6)
|
||||
|
||||
@@ -50,6 +50,7 @@ enum RowKind {
|
||||
case orphan(String)
|
||||
case turnEnd(error: String?)
|
||||
case note(Note)
|
||||
case review(note: Note, md: [MDBlock])
|
||||
case handoff
|
||||
case snapshot(Snapshot)
|
||||
case question
|
||||
@@ -703,7 +704,11 @@ final class TranscriptBuilder {
|
||||
case "review.finished":
|
||||
let r = try! decodePayload(ev.payload, as: Review.self)
|
||||
let outcome = r.state == .failed ? "failed: \(r.error)" : r.state == .skipped ? "skipped: no changes" : reviewCounts(r)
|
||||
return note([.text("review of snapshot #\(r.snapshotN): \(outcome)")], r.state == .failed ? .error : .plain)
|
||||
let parts: [NotePart] = [.text("review of snapshot #\(r.snapshotN): \(outcome)")]
|
||||
if findings(r).isEmpty {
|
||||
return note(parts, r.state == .failed ? .error : .plain)
|
||||
}
|
||||
return Row(.review(note: Note(parts: parts, when: when), md: parseMarkdown(str(r.result?.value ?? [:], "summary") ?? "")), taskId: taskId)
|
||||
|
||||
case "task.merge_queued":
|
||||
return note([.text("\(ev.actor) asked to merge; held until the merge in progress in this project is done")])
|
||||
|
||||
Reference in New Issue
Block a user