From 3e37b60505ba71037fc3ec1ad27ae38138564f3a Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Sat, 21 Nov 2026 09:33:05 +0800 Subject: [PATCH] refactor(settings): remove the unused RadioRow control (#4931) The settings pages that used RadioRow now lay out their radio groups themselves, so it had no callers left and knip failed on main. Removes it with its RadioChoice type. --- .../settings/pages/workflowControls.tsx | 39 ++----------------- 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/src/features/settings/pages/workflowControls.tsx b/src/features/settings/pages/workflowControls.tsx index a918cf188..c47bec5d4 100644 --- a/src/features/settings/pages/workflowControls.tsx +++ b/src/features/settings/pages/workflowControls.tsx @@ -1,12 +1,12 @@ /** * Form pieces of the Version Control / Build, Execution, Deployment / Tools - * pages: bound checkboxes, "[x] Limit … to: [N] unit" rows, radio rows, + * pages: bound checkboxes, "[x] Limit … to: [N] unit" rows, * two-column grids, string lists and editable two-column tables. */ -import { useId, useState, type KeyboardEvent, type ReactNode } from "react"; +import { useState, type KeyboardEvent, type ReactNode } from "react"; import clsx from "clsx"; import { Checkbox, IconButton, Input } from "@/ui"; -import { NumberInput, Row, SearchLabel, Toggle } from "../components/Form"; +import { NumberInput, SearchLabel, Toggle } from "../components/Form"; import { useLabelMatch, useSetting } from "../components/context"; import { selectPage } from "../model/staging"; import styles from "./Workflow.module.css"; @@ -89,39 +89,6 @@ export function ToggleNumber({ ); } -export interface RadioChoice { - value: V; - label: string; -} - -/** `Label: (•) A ( ) B ( ) C` bound to a key. */ -export function RadioRow({ - k, - label, - choices, - hint, -}: { - k: string; - label: string; - choices: readonly RadioChoice[]; - hint?: ReactNode; -}) { - const [value, set] = useSetting(k); - const name = useId(); - return ( - -
- {choices.map((c) => ( - - ))} -
-
- ); -} - /** Link-style button that jumps to another settings page. */ export function PageLink({ page, children }: { page: string; children: ReactNode }) { return (