From 9e3357a014676ed83747e753655bf7b343c1a842 Mon Sep 17 00:00:00 2001 From: Atai Barkai Date: Sat, 5 Dec 2026 08:27:37 -0800 Subject: [PATCH 1/5] Quieter cards a Bot draws: one surface, no badges that repeat what shows - A decision card (askApproval, askChoice, and OpenBot's own approval cards) draws its answers as rows with no line between them, no tint on the picked one and no line above the button: the radio's dot says which is picked. Keys 1-9, Enter and the arrows are unchanged. - An approval's facts are plain label/value rows, as a record's are, through a shared Facts component; a form's sent answers too. - askForm's choice field is the app's Select, not the browser's own; the value, its check and what is sent to the Bot are unchanged. - showTable drops its "3 rows" badge and showChecklist its "2 of 3": both only counted what is drawn right under them. Co-Authored-By: Claude Opus 5.5 --- .../components/decisions/decision-card.tsx | 36 ++++---- app/src/components/gallery/cards.tsx | 35 +++----- app/src/components/gallery/decisions.tsx | 23 ++--- app/src/components/gallery/facts.tsx | 47 +++++++++++ app/src/components/gallery/form.tsx | 84 +++++++++++++------ app/src/components/gallery/table.tsx | 21 ++--- app/tests/gallery-components.test.tsx | 7 +- 7 files changed, 154 insertions(+), 99 deletions(-) create mode 100644 app/src/components/gallery/facts.tsx diff --git a/app/src/components/decisions/decision-card.tsx b/app/src/components/decisions/decision-card.tsx index 51fb4d1855..0c6b90db9d 100644 --- a/app/src/components/decisions/decision-card.tsx +++ b/app/src/components/decisions/decision-card.tsx @@ -43,6 +43,11 @@ const COLLAPSE_SECONDS = 0.22; * and is named for it, so it always says what pressing it will do. Where the Bot can take words * instead of a choice, the last row is a field for them. * + * ONE SURFACE. The card is the only box: no line between the rows, none above the button, no fill + * behind the picked row. A radio's filled dot is what says which one is picked, as in any radio + * group, and the rows are set apart by their own space. Lines and a tint on every row made a card + * of two answers read as a table of three. + * * THE KEYBOARD. 1 to 9 pick a row and Enter sends it, as in T3 Code, but only on the newest card * that is waiting (`useNewestDecision`), so two cards never both take a key, and never while the * person is typing somewhere (TanStack's single-key hotkeys skip inputs and contenteditable, so @@ -179,17 +184,14 @@ export function DecisionCard({ style={{ overflow: "hidden" }} transition={fold} > - {children ?
{children}
: null} + {children ?
{children}
: null} {/* * Native radios, one group per card, styled as rows: the browser gives them the radio * group's keys (Tab to the picked row, Up and Down to move) and screen readers name * them as choices. */} {/* A fieldset is as wide as its longest word unless told otherwise, which clipped a long link. */} -
+
{/* * ONLY A CLICK OR A KEY PICKS, AND ONLY THE PICKED ROW LOOKS PICKED. A row under the * pointer used to take a tint all but the picked row's, so moving the pointer across @@ -198,10 +200,7 @@ export function DecisionCard({ */} {options.map((option, index) => (