Skip to content

Fit the LLM dialogs to the window and line up their price fields - #180

Merged
artyomsv merged 2 commits into
masterfrom
fix/llm-model-dialog
Sep 27, 2026
Merged

artyomsv merged 2 commits into
masterfrom
fix/llm-model-dialog

Conversation

@artyomsv

Copy link
Copy Markdown
Owner

Why

Operator feedback (2026-09-27): the Add model dialog did not fit a laptop window. Its Cancel and Add buttons were only partly visible, and the price inputs sat at different heights and "jumped" between lines.

What changed

  • Fits the window. The model and provider dialogs (.modal.tall) are capped at 100vh - 40px. Their fields scroll inside; the buttons are sticky at the bottom.
  • Price fields line up. Each rate field spans three rows of a CSS subgrid (label, input, check box). The two labels of a row share one track and sit at its bottom, so both inputs are on one line whether or not a label wraps for its "optional" marker. The <label> is display: contents, so its text and input each take a row and it still labels the input.
  • llmDialogs.contract.test.ts holds the rules and the markup (layout cannot be measured in jsdom).

Verification

  • Visual check: the real SettingsLlmModelForm rendered with index.css at 1366×768. Buttons visible at top and bottom of the scroll; paired inputs at the same height in every row.
  • UI: 106 files, 940 tests pass; tsc and production build pass.
  • Mutation check: 5 mutants (subgrid rows, display: contents, the max-height, modal tall on the model form, the rate-field class) — each fails the contract test.

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.
The rate grid replaced .field-row-2, so the 560px breakpoint that stacks
the other field rows no longer reached the price fields: at 320px each
input was 116px wide. Add .rate-grid to that breakpoint, and hold it in
the dialog contract test.
@artyomsv
artyomsv merged commit 762fc84 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