paseo-plugin-genui 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/OVERVIEW.md +5 -3
  2. package/README.md +15 -7
  3. package/assets/screenshot-chat.png +0 -0
  4. package/assets/screenshot-gallery.png +0 -0
  5. package/assets/screenshot-map.png +0 -0
  6. package/assets/screenshot-playground.png +0 -0
  7. package/client/components/content.tsx +41 -21
  8. package/client/components/data.tsx +18 -7
  9. package/client/components/dev.tsx +38 -26
  10. package/client/components/diagram.tsx +1 -1
  11. package/client/components/feedback.tsx +333 -0
  12. package/client/components/inputs.tsx +54 -47
  13. package/client/components/layout.tsx +3 -1
  14. package/client/components/media.tsx +2 -2
  15. package/client/components/project.tsx +7 -2
  16. package/client/components/widgets.tsx +35 -24
  17. package/client/gallery.tsx +7 -5
  18. package/client/live-ui.tsx +26 -2
  19. package/client/markdown.tsx +1 -5
  20. package/client/node-renderer.tsx +6 -1
  21. package/client/queue-pill.tsx +123 -0
  22. package/client/render.tsx +2 -0
  23. package/client/reply-queue.ts +82 -0
  24. package/client/runtime.ts +7 -0
  25. package/gallery/Other.ui +11 -0
  26. package/gallery/Plan.ui +1 -1
  27. package/index.client.tsx +6 -1
  28. package/index.server.ts +10 -0
  29. package/package.json +2 -2
  30. package/paseo-plugin.json +2 -1
  31. package/server/render-tool.ts +34 -0
  32. package/shared/core/catalog.ts +23 -5
  33. package/shared/core/evaluate.ts +2 -0
  34. package/shared/core/markdown.ts +2 -0
  35. package/shared/core/types.ts +2 -1
  36. package/shared/diagram/markdown.test.ts +13 -0
  37. package/shared/diagram/markdown.ts +15 -1
  38. package/shared/fallback.ts +1 -1
  39. package/shared/hermes-syntax.test.ts +1 -1
  40. package/shared/instructions.ts +3 -1
  41. package/shared/logic/reply.test.ts +29 -0
  42. package/shared/logic/reply.ts +33 -0
  43. package/shared/logic/values.ts +1 -0
package/OVERVIEW.md CHANGED
@@ -4,15 +4,17 @@ Instead of replying only with plain Markdown tables or pasted command output, ag
4
4
 
5
5
  ## Setup
6
6
 
7
- Requires Paseo 0.11.2 or later on both the daemon and the app. Git and the GitHub CLI (`gh`) on the daemon host are optional and used only when a block includes `Changes()`, `Commits()`, or `PullRequest()`.
7
+ Requires Paseo 0.14.0 or later on both the daemon and the app. Git and the GitHub CLI (`gh`) on the daemon host are optional and used only when a block includes `Changes()`, `Commits()`, or `PullRequest()`.
8
8
 
9
- When automatic instructions are enabled, new agents receive the Generative UI component reference in their system prompt when created. For an existing agent, run `/genui` in the composer to send it the component reference, or `/genui-demo` to append an interactive sample block to the timeline. Open the **Gen-UI Gallery** from the sidebar or workspace panel to browse all 86 components across 10 groups with 170+ live examples and an interactive spec playground.
9
+ When automatic instructions are enabled, new agents receive the Generative UI component reference in their system prompt when created. For an existing agent, run `/genui` in the composer to send it the component reference, or `/genui-demo` to append an interactive sample block to the timeline. Open the **Gen-UI Gallery** from the sidebar or workspace panel to browse all 88 components across 10 groups with 170+ live examples and an interactive spec playground.
10
10
 
11
11
  ## Capabilities and data access
12
12
 
13
- - **86 components in 10 groups**: Layout, Content, Data, Media, Inputs, Widgets, Project, Dev, Manage, and Evidence.
13
+ - **88 components in 10 groups**: Layout, Content, Data, Media, Inputs, Widgets, Project, Dev, Manage, and Evidence.
14
14
  - **Confined file reading**: `Load(path)`, `Snippet(path, from, to)`, and `Image(path)` read JSON, CSV, TSV, logs, test reports (Vitest, Jest, JUnit), coverage (`lcov`, Istanbul, `coverage.py`, Go), lint and typecheck findings (ESLint, SARIF, `tsc`, Ruff), HAR traces, and benchmarks. Reads are strictly confined to the agent's workspace directory, its per-agent thread storage directory (`/tmp/opencode/genui-storage/<agentId>`), `/tmp`, and any extra folders added in settings.
15
15
  - **Live workspace and git state**: `Changes()`, `Commits()`, `PullRequest()`, `Threads()`, and `Environments()` read the workspace's git diff, commits, pull request status, subagents, and worktrees on the daemon host.
16
+ - **Replies the user builds**: Agents can let you answer a card in your own words before anything is sent. A `Queue` button adds its text to your reply instead of sending it, `comments: true` adds a Comment action to each item of a Plan, Steps, List, Table, Findings, Decision or OptionCards, `editable: true` lets you rewrite an item's text, and `Other()` opens a free-form box. The queued parts from every card in the chat show in a composer pill, where you can remove them, send them, or clear them; the next Send sends them together with its own text as one message. The queue is kept in the app's local storage per chat. A message you type in Paseo's composer does not include the queue.
17
+ - **Checked UI with the `render_ui` tool**: The plugin gives each agent a `render_ui` tool through Paseo's agent tools. The agent passes a `ui` spec; the daemon checks it (compile, file loads, render) and adds it to the chat only when it renders, otherwise it returns the errors so the agent fixes them in the same turn. The plugin approves `render_ui` permission prompts on its own, because the tool only reads files the plugin can already read and adds UI to the chat. Agents whose provider cannot reach Paseo's agent tools write `ui` blocks in their reply instead.
16
18
  - **Repair of broken blocks**: When an agent's turn ends, the daemon checks each `ui` block in its reply. If a block fails to compile, load a file, or render, the plugin sends the agent one follow-up message that starts with `[genui]` and lists the errors, and the agent replies with corrected blocks. It sends at most one such message per user message and skips subagents. The follow-up shows in the chat as a user message. Turning off automatic agent instructions in settings also turns this off.
17
19
  - **Sandboxed mini-apps**: `app` blocks run self-contained HTML and JavaScript inside a sandboxed iframe (`sandbox="allow-scripts"`) with a network-blocking Content Security Policy on desktop and web clients.
18
20
  - **Settings and web lookups**: Under **Settings -> Plugins -> Generative UI**, you can toggle automatic agent instructions for new sessions and toggle server-side web lookups, and add extra folders (for example `~/dev/scratch`) that file reads may use. When web lookups are on, the daemon fetches photo searches from Wikimedia Commons (`commons.wikimedia.org` / `upload.wikimedia.org`), geocoding from Photon (`photon.komoot.io`), map tiles from OpenStreetMap (`tile.openstreetmap.org`), and HTTPS images through an address-checked proxy that rejects loopback, private, and link-local IP addresses. No cookies, credentials, or conversation text beyond the specific search query or place name are sent. Turning web lookups off disables all external network requests.
package/README.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  **Agents answer with charts, diagrams, maps, plans, and forms rendered inline in the Paseo chat timeline.**
4
4
 
5
- ![Inline Map, Calendar, and Budget UI in Paseo chat](assets/screenshot-chat.png)
5
+ ![A Kyoto route on a Map with metrics and reply buttons in Paseo chat](assets/screenshot-map.png)
6
6
 
7
- ![Gen-UI Gallery with 86 components and 173 live examples](assets/screenshot-gallery.png)
7
+ ![A Plan with a comment, a queued choice and the reply pill in Paseo chat](assets/screenshot-chat.png)
8
+
9
+ ![Gen-UI Gallery with 88 components and 176 live examples](assets/screenshot-gallery.png)
8
10
 
9
11
  ![Interactive Playground in Paseo](assets/screenshot-playground.png)
10
12
 
@@ -22,11 +24,13 @@ Or from npm:
22
24
  paseo plugin add npm:paseo-plugin-genui
23
25
  ```
24
26
 
25
- Requires Paseo 0.11.2 or later.
27
+ Requires Paseo 0.14.0 or later.
26
28
 
27
29
  ## What an answer looks like
28
30
 
29
- The agent writes a ```ui block in its reply:
31
+ The agent passes a UI spec to its `render_ui` tool. The plugin checks the spec first and adds the card to the chat only when it renders; otherwise the tool returns the errors and the agent fixes them in the same turn. Agents without the tool write the same spec as a ```ui block in their reply, and the plugin asks them once to fix a block that fails.
32
+
33
+ A spec looks like this:
30
34
 
31
35
  ~~~
32
36
  ```ui
@@ -43,7 +47,11 @@ Card("Estimate", [
43
47
 
44
48
  Paseo renders a card with a plan switch, a seat slider, and a live total. Moving the slider recomputes the total in place without another model call. Clicking the button sends your choice back to the agent.
45
49
 
46
- ## Components (86 across 10 groups)
50
+ ## Replies you build
51
+
52
+ Cards can collect a reply before anything is sent. A button with `Queue(text)` adds its text to your reply instead of sending it. `comments: true` adds a Comment action to each item of a Plan, Steps, List, Table, Findings, Decision or OptionCards, and `editable: true` lets you rewrite an item's text. `Other()` opens a box for anything the agent did not offer. A pill in the composer shows what is queued; the next Send, or Send now in the pill, sends it all as one message.
53
+
54
+ ## Components (88 across 10 groups)
47
55
 
48
56
  | Group | Components |
49
57
  | --- | --- |
@@ -51,7 +59,7 @@ Paseo renders a card with a plan switch, a seat slider, and a live total. Moving
51
59
  | **Content** | `Text` · `Callout` · `Draft` · `Metric` · `Badge` · `Icon` · `KeyValue` · `Image` · `File` · `Entity` · `Sources` · `List` |
52
60
  | **Data** | `Table` · `Chart` (bar, line, area, pie, scatter, radar, funnel, heatmap) · `Sparkline` · `Progress` · `Gauge` · `SegmentedBar` · `Steps` · `Timeline` · `Calendar` · `CalendarHeatmap` · `Tree` · `Code` · `Snippet` · `Diff` · `Diagram` |
53
61
  | **Media** | `ImageSearch` · `Gallery` · `Map` · `Hotspots` |
54
- | **Inputs** | `Slider` · `Stepper` · `Toggle` · `Choice` · `Radio` · `Select` · `Checklist` · `ListEditor` · `Input` · `TextArea` · `DateInput` · `Rating` · `OptionCards` · `Swatches` · `EditableTable` · `Button` · `Form` · `FollowUps` |
62
+ | **Inputs** | `Slider` · `Stepper` · `Toggle` · `Choice` · `Radio` · `Select` · `Checklist` · `ListEditor` · `Input` · `TextArea` · `DateInput` · `Rating` · `OptionCards` · `Swatches` · `EditableTable` · `Button` · `Form` · `FollowUps` · `Other` |
55
63
  | **Widgets** | `Timer` · `Quiz` · `Flashcards` · `Walkthrough` |
56
64
  | **Project** | `Changes` · `Commits` · `PullRequest` · `Threads` · `Tests` · `Json` |
57
65
  | **Dev** | `Logs` · `StackTrace` · `Findings` · `Coverage` · `Dependencies` · `Pipeline` · `Benchmark` · `Waterfall` · `Treemap` |
@@ -62,7 +70,7 @@ Paseo renders a card with a plan switch, a seat slider, and a live total. Moving
62
70
 
63
71
  - `/genui [prompt]` — Teach an existing agent the Generative UI component language.
64
72
  - `/genui-demo [ComponentName]` — Insert a live interactive Gen-UI block into the current chat (e.g. `/genui-demo Decision` or `/genui-demo Map`).
65
- - `/genui-gallery` — Open the **Gen-UI Gallery** screen (173 examples across all 86 components, plus a live spec Playground).
73
+ - `/genui-gallery` — Open the **Gen-UI Gallery** screen (176 examples across all 88 components, plus a live spec Playground).
66
74
 
67
75
  ## Develop
68
76
 
Binary file
Binary file
Binary file
Binary file
@@ -10,7 +10,8 @@ import { entityKind, imageRef, inlineFacts, sourceLinks } from "../../shared/log
10
10
  import { finiteNumber, isNode, list, optionalText, text, tone, type Props } from "../../shared/logic/values";
11
11
  import { InlineMarkdown, MarkdownText } from "../markdown";
12
12
  import { ErrorLine, RenderNode } from "../node-renderer";
13
- import { InTableContext, toneColor, toneMutedColor, useUiRuntime, type ImageUrl } from "../runtime";
13
+ import { InTableContext, propsKey, toneColor, toneMutedColor, useUiRuntime, type ImageUrl } from "../runtime";
14
+ import { useItemFeedback } from "./feedback";
14
15
 
15
16
  export function Text({ props }: { props: Props }) {
16
17
  const { theme, compact } = useUiRuntime();
@@ -25,32 +26,39 @@ export function Callout({ props }: { props: Props }) {
25
26
  const body = text(props.text);
26
27
  const title = optionalText(props.title);
27
28
  const t = tone(props.tone);
28
- const borderColor = t === "neutral" ? theme.colors.border : toneColor(theme, t);
29
29
 
30
30
  return (
31
31
  <View
32
32
  style={{
33
33
  borderRadius: 8,
34
34
  borderWidth: StyleSheet.hairlineWidth,
35
- borderColor,
36
- borderLeftWidth: 3,
37
- borderLeftColor: borderColor,
35
+ borderColor: theme.colors.border,
38
36
  backgroundColor: theme.colors.surface2,
39
37
  paddingHorizontal: 12,
40
38
  paddingVertical: 10,
41
- gap: 4,
39
+ flexDirection: "row",
40
+ gap: 8,
42
41
  }}
43
42
  >
44
- {title ? (
45
- <RNText style={{ color: toneColor(theme, t), fontSize: 13, fontWeight: "600" }}>
46
- {title}
47
- </RNText>
48
- ) : null}
49
- <MarkdownText text={body} theme={theme} compact={compact} />
43
+ {t === "neutral" ? null : (
44
+ <View style={{ paddingTop: 2 }}>
45
+ <PaseoIcon name={CALLOUT_ICONS[t]} size={14} color={toneColor(theme, t)} />
46
+ </View>
47
+ )}
48
+ <View style={{ flex: 1, gap: 4 }}>
49
+ {title ? (
50
+ <RNText style={{ color: theme.colors.foreground, fontSize: 13, fontWeight: "600" }}>
51
+ {title}
52
+ </RNText>
53
+ ) : null}
54
+ <MarkdownText text={body} theme={theme} compact={compact} />
55
+ </View>
50
56
  </View>
51
57
  );
52
58
  }
53
59
 
60
+ const CALLOUT_ICONS = { good: "CircleCheck", warn: "AlertTriangle", bad: "CircleX", info: "Info" } as const;
61
+
54
62
  export function Draft({ props }: { props: Props }) {
55
63
  const { theme, compact } = useUiRuntime();
56
64
  const toast = useToast();
@@ -496,6 +504,10 @@ export function Sources({ props }: { props: Props }) {
496
504
  export function List({ props }: { props: Props }) {
497
505
  const { theme, run } = useUiRuntime();
498
506
  const rows = parseListRows(props.items);
507
+ const feedback = useItemFeedback(`list:${propsKey(props.items)}`, {
508
+ comments: props.comments === true,
509
+ editable: props.editable === true,
510
+ });
499
511
 
500
512
  return (
501
513
  <View
@@ -509,6 +521,9 @@ export function List({ props }: { props: Props }) {
509
521
  {rows.map((item, idx) => {
510
522
  const iconName = item.icon ? resolveIconName(item.icon) ?? item.icon : null;
511
523
  const t = item.tone ?? "neutral";
524
+ const original = { title: item.title, detail: item.detail ?? "" };
525
+ const shown = feedback.fields(idx, original);
526
+ const controls = feedback.controls(idx, `"${item.title}"`, original);
512
527
  const rowContent = (
513
528
  <View
514
529
  style={{
@@ -528,11 +543,11 @@ export function List({ props }: { props: Props }) {
528
543
  ) : null}
529
544
  <View style={{ flex: 1, gap: 2 }}>
530
545
  <RNText style={{ color: theme.colors.foreground, fontSize: 13, fontWeight: "500" }}>
531
- {item.title}
546
+ {shown.title}
532
547
  </RNText>
533
- {item.detail ? (
548
+ {shown.detail ? (
534
549
  <RNText style={{ color: theme.colors.foregroundMuted, fontSize: 12 }}>
535
- <InlineMarkdown text={item.detail} theme={theme} />
550
+ <InlineMarkdown text={shown.detail} theme={theme} />
536
551
  </RNText>
537
552
  ) : null}
538
553
  </View>
@@ -548,12 +563,17 @@ export function List({ props }: { props: Props }) {
548
563
  ) : null}
549
564
  </View>
550
565
  );
551
- return item.actions.length > 0 ? (
552
- <Pressable key={idx} accessibilityRole="button" onPress={() => void run(item.actions)}>
553
- {rowContent}
554
- </Pressable>
555
- ) : (
556
- <View key={idx}>{rowContent}</View>
566
+ return (
567
+ <View key={idx}>
568
+ {item.actions.length > 0 ? (
569
+ <Pressable accessibilityRole="button" onPress={() => void run(item.actions)}>
570
+ {rowContent}
571
+ </Pressable>
572
+ ) : (
573
+ rowContent
574
+ )}
575
+ {controls ? <View style={{ paddingHorizontal: 12, paddingBottom: 9 }}>{controls}</View> : null}
576
+ </View>
557
577
  );
558
578
  })}
559
579
  </View>
@@ -30,6 +30,8 @@ import {
30
30
  } from "../../shared/logic/values";
31
31
  import { ErrorLine, RenderNode } from "../node-renderer";
32
32
  import { InTableContext, propsKey, toneColor, usePersistedState, useUiRuntime } from "../runtime";
33
+ import { hasOwnNumber } from "../../shared/logic/reply";
34
+ import { useItemFeedback } from "./feedback";
33
35
 
34
36
  export function Table({ props }: { props: Props }) {
35
37
  const { theme, compact } = useUiRuntime();
@@ -38,6 +40,7 @@ export function Table({ props }: { props: Props }) {
38
40
  return rec ? text(rec.label ?? rec.key) : text(col);
39
41
  });
40
42
  const rows = list(props.rows);
43
+ const feedback = useItemFeedback(`table:${propsKey(props.rows)}`, { comments: props.comments === true, editable: false });
41
44
 
42
45
  return (
43
46
  <InTableContext.Provider value={true}>
@@ -77,16 +80,17 @@ export function Table({ props }: { props: Props }) {
77
80
  : rec
78
81
  ? columns.map((c) => rec[c] ?? null)
79
82
  : [row];
83
+ const first = isNode(cells[0]) ? "" : text(cells[0]);
84
+ const controls = feedback.controls(rIdx, `row ${rIdx + 1}${first ? ` (${first})` : ""}`, {});
80
85
  return (
81
86
  <View
82
87
  key={rIdx}
83
88
  style={{
84
- flexDirection: "row",
85
- alignItems: "center",
86
89
  borderTopWidth: rIdx === 0 ? 0 : StyleSheet.hairlineWidth,
87
90
  borderTopColor: theme.colors.border,
88
91
  }}
89
92
  >
93
+ <View style={{ flexDirection: "row", alignItems: "center" }}>
90
94
  {columns.map((_, cIdx) => {
91
95
  const cell = cells[cIdx];
92
96
  return (
@@ -105,6 +109,8 @@ export function Table({ props }: { props: Props }) {
105
109
  );
106
110
  })}
107
111
  </View>
112
+ {controls ? <View style={{ paddingHorizontal: 10, paddingBottom: 8 }}>{controls}</View> : null}
113
+ </View>
108
114
  );
109
115
  })}
110
116
  </View>
@@ -238,7 +244,7 @@ export function Chart({ props }: { props: Props }) {
238
244
  borderRadius: 4,
239
245
  backgroundColor: theme.colors.surface2,
240
246
  borderWidth: StyleSheet.hairlineWidth,
241
- borderColor: v > 0 ? theme.colors.accent : theme.colors.border,
247
+ borderColor: theme.colors.border,
242
248
  alignItems: "center",
243
249
  justifyContent: "center",
244
250
  opacity: v > 0 ? intensity : 0.4,
@@ -487,13 +493,17 @@ export function SegmentedBar({ props }: { props: Props }) {
487
493
  export function Steps({ props }: { props: Props }) {
488
494
  const { theme } = useUiRuntime();
489
495
  const items = list(props.items);
496
+ const feedback = useItemFeedback(`steps:${propsKey(props.items)}`, {
497
+ comments: props.comments === true,
498
+ editable: props.editable === true,
499
+ });
490
500
 
491
501
  return (
492
502
  <View style={{ gap: 8 }}>
493
503
  {items.map((item, idx) => {
494
504
  const obj = asRecord(item) ?? { title: text(item) };
495
- const title = text(obj.title ?? obj.label);
496
- const detail = optionalText(obj.detail);
505
+ const original = { title: text(obj.title ?? obj.label), detail: optionalText(obj.detail) ?? "" };
506
+ const { title, detail } = feedback.fields(idx, original);
497
507
  const status = text(obj.status);
498
508
  const color =
499
509
  status === "done"
@@ -529,6 +539,7 @@ export function Steps({ props }: { props: Props }) {
529
539
  <InlineMarkdown text={detail} theme={theme} />
530
540
  </Text>
531
541
  ) : null}
542
+ {feedback.controls(idx, hasOwnNumber(original.title) ? `step "${original.title}"` : `step ${idx + 1} (${original.title})`, original)}
532
543
  </View>
533
544
  </View>
534
545
  );
@@ -636,8 +647,8 @@ export function Calendar({ props }: { props: Props }) {
636
647
  borderRadius: 6,
637
648
  padding: 4,
638
649
  backgroundColor: day === null ? "transparent" : theme.colors.surface1,
639
- borderWidth: dayEvents.length > 0 ? 1 : StyleSheet.hairlineWidth,
640
- borderColor: dayEvents.length > 0 ? theme.colors.accent : theme.colors.border,
650
+ borderWidth: StyleSheet.hairlineWidth,
651
+ borderColor: theme.colors.border,
641
652
  gap: 2,
642
653
  }}
643
654
  >
@@ -37,6 +37,7 @@ import {
37
37
  import { finiteNumber, optionalText, text, type Props } from "../../shared/logic/values";
38
38
  import { ErrorLine } from "../node-renderer";
39
39
  import { propsKey, toneColor, usePersistedState, useUiRuntime } from "../runtime";
40
+ import { useItemFeedback } from "./feedback";
40
41
 
41
42
  export function Logs({ props }: { props: Props }) {
42
43
  const { theme } = useUiRuntime();
@@ -242,6 +243,10 @@ export function Findings({ props }: { props: Props }) {
242
243
  const { theme, run, openFile } = useUiRuntime();
243
244
  const parsed = useMemo(() => readFindings(props.items), [props.items]);
244
245
  const title = optionalText(props.title);
246
+ const feedback = useItemFeedback(`findings:${propsKey(props.items)}`, {
247
+ comments: props.comments === true,
248
+ editable: props.editable === true,
249
+ });
245
250
  if (!parsed.ok) return <ErrorLine message={parsed.error} />;
246
251
  const { report } = parsed;
247
252
 
@@ -272,6 +277,8 @@ export function Findings({ props }: { props: Props }) {
272
277
  </View>
273
278
  {report.findings.map((item, idx) => {
274
279
  const loc = findingLocation(item);
280
+ const original = { title: item.title, detail: item.detail ?? "" };
281
+ const shown = feedback.fields(idx, original);
275
282
  const sevColor =
276
283
  item.severity === "critical" || item.severity === "high"
277
284
  ? theme.colors.statusDanger
@@ -292,7 +299,7 @@ export function Findings({ props }: { props: Props }) {
292
299
  >
293
300
  <View style={{ flexDirection: "row", justifyContent: "space-between", alignItems: "center", gap: 8 }}>
294
301
  <Text style={{ color: theme.colors.foreground, fontSize: 13, fontWeight: "600", flex: 1 }}>
295
- {item.title}
302
+ {shown.title}
296
303
  </Text>
297
304
  <Text style={{ color: sevColor, fontSize: 11, fontWeight: "700", textTransform: "uppercase" }}>
298
305
  {severityLabel(item.severity, report.scale)}
@@ -309,26 +316,31 @@ export function Findings({ props }: { props: Props }) {
309
316
  </Text>
310
317
  </Pressable>
311
318
  ) : null}
312
- {item.detail ? (
313
- <Text style={{ color: theme.colors.foregroundMuted, fontSize: 12 }}><InlineMarkdown text={item.detail} theme={theme} /></Text>
319
+ {shown.detail ? (
320
+ <Text style={{ color: theme.colors.foregroundMuted, fontSize: 12 }}><InlineMarkdown text={shown.detail} theme={theme} /></Text>
314
321
  ) : null}
315
- <Pressable
316
- onPress={() => {
317
- const msg = fixThisMessage(item);
318
- void run([{ kind: "action", type: "send", text: msg }]);
319
- }}
320
- style={{
321
- alignSelf: "flex-start",
322
- paddingHorizontal: 8,
323
- paddingVertical: 4,
324
- borderRadius: 6,
325
- backgroundColor: theme.colors.surface1,
326
- }}
327
- >
328
- <Text style={{ color: theme.colors.foreground, fontSize: 11.5, fontWeight: "500" }}>
329
- Fix this
330
- </Text>
331
- </Pressable>
322
+ {feedback.controls(
323
+ idx,
324
+ `finding "${item.title}"`,
325
+ original,
326
+ <Pressable
327
+ onPress={() => {
328
+ const msg = fixThisMessage(item);
329
+ void run([{ kind: "action", type: "send", text: msg }]);
330
+ }}
331
+ style={{
332
+ alignSelf: "flex-start",
333
+ paddingHorizontal: 8,
334
+ paddingVertical: 4,
335
+ borderRadius: 6,
336
+ backgroundColor: theme.colors.surface1,
337
+ }}
338
+ >
339
+ <Text style={{ color: theme.colors.foreground, fontSize: 11.5, fontWeight: "500" }}>
340
+ Fix this
341
+ </Text>
342
+ </Pressable>,
343
+ )}
332
344
  </View>
333
345
  );
334
346
  })}
@@ -853,12 +865,12 @@ export function Tests({ props }: { props: Props }) {
853
865
  }}
854
866
  >
855
867
  <View style={{ flexDirection: "row", justifyContent: "space-between", gap: 8 }}>
856
- <Text style={{ color: theme.colors.foreground, fontSize: 12.5, flex: 1 }}>
857
- <Text style={{ color, fontWeight: "700" }}>
858
- {tc.status === "passed" ? "✓ " : tc.status === "failed" ? "✗ " : "○ "}
859
- </Text>
860
- {tc.name}
861
- </Text>
868
+ <View style={{ flexDirection: "row", gap: 6, flex: 1 }}>
869
+ <View style={{ paddingTop: 1 }}>
870
+ <Icon name={tc.status === "passed" ? "CircleCheck" : tc.status === "failed" ? "CircleX" : "Circle"} size={13} color={color} />
871
+ </View>
872
+ <Text style={{ color: theme.colors.foreground, fontSize: 12.5, flex: 1 }}>{tc.name}</Text>
873
+ </View>
862
874
  {tc.ms !== null ? (
863
875
  <Text style={{ color: theme.colors.foregroundMuted, fontSize: 11.5 }}>
864
876
  {formatDuration(tc.ms)}
@@ -205,7 +205,7 @@ export function Diagram({ props }: { props: Props }) {
205
205
  style={{
206
206
  borderRadius: 8,
207
207
  borderWidth: StyleSheet.hairlineWidth,
208
- borderColor: theme.colors.accent,
208
+ borderColor: theme.colors.border,
209
209
  backgroundColor: theme.colors.surface2,
210
210
  padding: 10,
211
211
  gap: 6,