From 7b54af90f79a6858f75ff86d42a2f083d4edfa2a Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 22 Sep 2026 12:22:13 -0700 Subject: [PATCH] refactor(web): add font="mono" to Input (#13027) Co-authored-by: Claude Fable 5 --- .../src/components/device/DeviceToolsPanel.tsx | 11 +++++++---- .../components/settings/CustomModelEditor.tsx | 6 ++++-- .../settings/KeybindingsSettings.tsx | 18 ++++++++---------- .../settings/ProviderAccentColorPicker.tsx | 3 ++- .../settings/ProviderInstanceCard.tsx | 6 ++++-- .../components/settings/ThemeColorPicker.tsx | 3 ++- apps/web/src/components/ui/input.tsx | 4 ++++ .../components/usage/UsagePriceOverrides.tsx | 2 +- scripts/lint-restyle-ceiling.ts | 2 +- 9 files changed, 33 insertions(+), 22 deletions(-) diff --git a/apps/web/src/components/device/DeviceToolsPanel.tsx b/apps/web/src/components/device/DeviceToolsPanel.tsx index 79f84529aebb4e399c19a37fce2c0798637de9ca..39b8123cd03b9ae8e3c67ec435006c4eae151fe5 100644 --- a/apps/web/src/components/device/DeviceToolsPanel.tsx +++ b/apps/web/src/components/device/DeviceToolsPanel.tsx @@ -493,7 +493,8 @@ function SubmitRow(props: { > updateChoice(descriptor.key, choice.key, { id: event.target.value })} placeholder="value" - className="w-28 font-mono" + font="mono" + className="w-28" spellCheck={false} aria-label="Choice value" /> @@ -230,7 +231,8 @@ export function CustomModelEditor({ value={descriptor.id} onChange={(event) => updateDescriptor(descriptor.key, { id: event.target.value })} placeholder="optionId" - className="w-36 font-mono" + font="mono" + className="w-36" spellCheck={false} aria-label="Option id" /> diff --git a/apps/web/src/components/settings/KeybindingsSettings.tsx b/apps/web/src/components/settings/KeybindingsSettings.tsx index 4a22680b63f4e8d87481d8dc2005bc05b64e27d4..8371d0d9cdffebc31c20214a6e2b689b49973b0b 100644 --- a/apps/web/src/components/settings/KeybindingsSettings.tsx +++ b/apps/web/src/components/settings/KeybindingsSettings.tsx @@ -320,7 +320,7 @@ function WhenVariableSelect({ return ( onChange(role, event.currentTarget.value)} diff --git a/apps/web/src/components/ui/input.tsx b/apps/web/src/components/ui/input.tsx index cae3dfe628527958057845ea7a55029acee902cb..a5810308b6e8de261645a79292688e592157bca6 100644 --- a/apps/web/src/components/ui/input.tsx +++ b/apps/web/src/components/ui/input.tsx @@ -7,6 +7,8 @@ import { cn } from "~/lib/utils"; type InputProps = Omit, "size"> & { size?: "sm" | "compact" | "default" | "lg" | number; + /** Monospace with tabular digits, for paths, commands, colors and numbers. */ + font?: "default" | "mono"; unstyled?: boolean; nativeInput?: boolean; }; @@ -14,6 +16,7 @@ type InputProps = Omit editCell(row, field.key, event.target.value) } diff --git a/scripts/lint-restyle-ceiling.ts b/scripts/lint-restyle-ceiling.ts index 53e91c6307303ac36c356bd165e120fbc5bb38af..349949848cb096c02fca5dddd48ff23fb8ccfde2 100644 --- a/scripts/lint-restyle-ceiling.ts +++ b/scripts/lint-restyle-ceiling.ts @@ -8,7 +8,7 @@ import * as NodeURL from "node:url"; // components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the // count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you // migrate a file, and delete this script when the rule becomes an error. -export const RESTYLE_CEILING = 1060; +export const RESTYLE_CEILING = 1043; const RULE = "shadcn(no-restyle)"; -- 2.54.0