From efe3f05754c6325b2bc8d1d382d89552c04ff5e3 Mon Sep 17 00:00:00 2001 From: PostHog Code Date: Mon, 20 Apr 2026 10:54:28 +0000 Subject: [PATCH] fix: use radio inputs for single-choice plan answers The ActionSelector rendered checkboxes for every option when a submit button was shown, even for single-select questions. Thread multiSelect through to OptionRow so single-choice renders a Radio and multi-choice renders a Checkbox. Generated-By: PostHog Code Task-Id: 9f37eb73-be5d-4881-bebb-e3edda480a58 --- .../action-selector/ActionSelector.tsx | 2 ++ .../components/action-selector/OptionRow.tsx | 29 +++++++++++++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/apps/code/src/renderer/components/action-selector/ActionSelector.tsx b/apps/code/src/renderer/components/action-selector/ActionSelector.tsx index a2b1fe3f3..7dd084672 100644 --- a/apps/code/src/renderer/components/action-selector/ActionSelector.tsx +++ b/apps/code/src/renderer/components/action-selector/ActionSelector.tsx @@ -260,6 +260,7 @@ export function ActionSelector({ isHovered={isHovered} isChecked={isChecked} showCheckbox={showSubmitButton} + multiSelect={multiSelect} customInput={customInput} customInputPlaceholder={customInputPlaceholder} isEditing={showInlineEdit && isSelected} @@ -294,6 +295,7 @@ export function ActionSelector({ isHovered={isHovered} isChecked={false} showCheckbox={false} + multiSelect={multiSelect} customInput="" customInputPlaceholder="" isEditing={false} diff --git a/apps/code/src/renderer/components/action-selector/OptionRow.tsx b/apps/code/src/renderer/components/action-selector/OptionRow.tsx index d2ab70741..a84612d47 100644 --- a/apps/code/src/renderer/components/action-selector/OptionRow.tsx +++ b/apps/code/src/renderer/components/action-selector/OptionRow.tsx @@ -1,4 +1,4 @@ -import { Box, Checkbox, Flex, Text } from "@radix-ui/themes"; +import { Box, Checkbox, Flex, Radio, Text } from "@radix-ui/themes"; import { compactHomePath } from "@utils/path"; import { isCancelOption, isOtherOption, isSubmitOption } from "./constants"; import { InlineEditableText } from "./InlineEditableText"; @@ -25,6 +25,7 @@ interface OptionRowProps { isHovered: boolean; isChecked: boolean; showCheckbox: boolean; + multiSelect: boolean; customInput: string; customInputPlaceholder: string; isEditing: boolean; @@ -46,6 +47,7 @@ export function OptionRow({ isHovered, isChecked, showCheckbox, + multiSelect, customInput, customInputPlaceholder, isEditing, @@ -195,14 +197,23 @@ export function OptionRow({ > {index + 1}. - {showCheckbox && ( - - )} + {showCheckbox && + (multiSelect ? ( + + ) : ( + + ))} {renderLabel()}