From 2419571c39a28957d45750fcc57f518c8bd8cbfe Mon Sep 17 00:00:00 2001 From: Artjoms Stukans Date: Sun, 27 Sep 2026 18:36:18 +0200 Subject: [PATCH 1/2] Fit the LLM dialogs to the window and line up their price fields The Add model dialog was taller than a laptop window: it ran off screen and its Cancel and Add buttons were only partly visible. The price inputs also sat at different heights, because a label that wraps for its "optional" marker is taller than one that does not. - The model and provider dialogs are capped at the window height. Their fields scroll inside, and the buttons stay pinned at the bottom. - Each price field spans three rows of a CSS subgrid (label, input, check box), so the two labels of a row share one height and both inputs sit on one line. - A contract test holds both rules and the markup that uses them. --- .../src/components/SettingsLlmModelForm.tsx | 2 +- .../components/SettingsLlmModelRateFields.tsx | 6 ++-- .../src/components/SettingsLlmProviders.tsx | 2 +- spire-ui/src/index.css | 17 ++++++++++ spire-ui/src/llmDialogs.contract.test.ts | 32 +++++++++++++++++++ 5 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 spire-ui/src/llmDialogs.contract.test.ts diff --git a/spire-ui/src/components/SettingsLlmModelForm.tsx b/spire-ui/src/components/SettingsLlmModelForm.tsx index e4222bda..3d0e9ead 100644 --- a/spire-ui/src/components/SettingsLlmModelForm.tsx +++ b/spire-ui/src/components/SettingsLlmModelForm.tsx @@ -131,7 +131,7 @@ export default function SettingsLlmModelForm({ initial, onClose, onSaved }: Sett return (
-
e.stopPropagation()} role="dialog" aria-modal="true"> +
e.stopPropagation()} role="dialog" aria-modal="true">

{editing ? 'Edit model' : 'Add model'}

diff --git a/spire-ui/src/components/SettingsLlmModelRateFields.tsx b/spire-ui/src/components/SettingsLlmModelRateFields.tsx index 73ad4589..cba2c376 100644 --- a/spire-ui/src/components/SettingsLlmModelRateFields.tsx +++ b/spire-ui/src/components/SettingsLlmModelRateFields.tsx @@ -89,9 +89,9 @@ interface RateFieldProps { function RateField({ type, value, onChange, notBilled, onNotBilled }: RateFieldProps) { const optional = !MANDATORY_RATE_TYPES.includes(type); return ( -
+