Skip to content

Lay out the model dialog in two panes with narrow price inputs - #181

Merged
artyomsv merged 1 commit into
masterfrom
feat/llm-model-dialog-panes
Sep 27, 2026
Merged

artyomsv merged 1 commit into
masterfrom
feat/llm-model-dialog-panes

Conversation

@artyomsv

Copy link
Copy Markdown
Owner

Why

Operator feedback (2026-09-27) on the Add model dialog after #180: still too long, and the price inputs are far wider than a rate needs. Of three mockups (A price table, B two panes, C price strip), the operator chose B.

What changed

  • SettingsLlmModelForm: .modal.tall.model-dialog (880px). A .model-panes grid: the left pane holds type, name, label, self-hosted and the API parameters; the right pane (<section aria-label="Prices">) holds the prices, or a note for a self-hosted model.
  • SettingsLlmModelRateFields: each rate is a .price-item. It has a <label htmlFor> with the type's name and a star for a required type, a 110px right-aligned input, and the "not billed" box under it. The input keeps an accessible name that starts with " rate $ / 1M tokens", so the existing tests and a screen reader still read the full meaning.
  • Below 760px the panes stack. The Fit the LLM dialogs to the window and line up their price fields #180 subgrid rules (.rate-grid, .rate-field, .rate-label) are removed; nothing else used them.
  • llmDialogs.contract.test.ts now holds the width, both grids, the stacking breakpoint and the markup.

Verification

  • Visual check: the real dialog rendered with index.css at 1366×768, about 500px tall with no scrolling. Narrow widths were not checked in a browser.
  • UI: 106 files, 940 tests pass; tsc and the production build pass.
  • Mutation check: 7 mutants (dialog width, the panes grid, the price row grid, the 760px stack, the model-dialog class, the panes markup, the rate input's accessible name). Each fails a test. A first try at the panes-grid mutant hit .grid2 (same text) and was re-run on the unique line.

The one-column model dialog was taller than a laptop window, and each
price input was half the dialog wide, far wider than any rate. Of three
mockups, the operator chose two panes.

- The dialog is 880px wide. The model and its API settings are on the
  left; the prices are in their own shaded pane on the right.
- Each price is one row: the type's name, a star when it is required,
  a 110px right-aligned input, and "not billed" under it. The input's
  own name still reads "Input rate $ / 1M tokens, required".
- A self-hosted model shows a note in the prices pane instead.
- Below 760px the prices pane moves under the model.
- The subgrid that lined up the old two-column price fields is removed.
@artyomsv
artyomsv merged commit 9117306 into master Sep 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant