[PR #4743] [GUI] settings: let a long help line wrap instead of squeezing every field #5159

Open
opened 2026-11-07 16:33:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4743
Author: @au70ma70n
Created: 10/30/2026
Status: 🔄 Open

Base: main ← Head: gui-settings-field-width


📝 Commits (1)

  • 145e349 [GUI] settings: let a long help line wrap instead of squeezing every field

📊 Changes

2 files changed (+46 additions, -2 deletions)

View changed files

➕ serve/test_totals.py (+41 -0)
📝 serve/web/app.css (+5 -2)

📄 Description

Branch gui-settings-field-width → main @ 870aedd9. A focused fix, so it needs no scope agreement, and it is the first of the four to land; the three costing pull requests (#4745, #4746, #4747) are stacked behind it in that order and wait on scope agreement in #4742.

Problem and result

On the page's Settings view every field collapsed to about the width of its own spinner arrows — twenty unusable boxes in one column. The card is a two-column grid whose label column was sized to max-content and whose field column had a floor of 0, so a single long help line took the whole card and left the fields nothing. After: the label column is the one that gives way (minmax(min(180px, 100%), 1fr)) and the field column has a floor and a cap of its own (minmax(11rem, 360px), the cap matching the input's existing max-width: 360px). Long help wraps onto two lines; every field is 360 px wide, or full width in the stacked layout under 1000 px.

none found; reported by the user on the Model settings card. A focused fix can go straight to a pull request, so no scope agreement is needed. No layout or settings-card issue surfaced in the sampled searches.

Approach

Layout only: the card sized its label column to max-content and gave the field column no floor, so one long help line took the card and left every field the width of its own spinner arrows. minmax(min(180px, 100%), 1fr) lets the label wrap and minmax(11rem, 360px) gives the field a width of its own at every width the card is shown at; the media query keeps 1fr where the card already stacks. The words are guarded beside the style: the longest help line on main is mtp at 137 characters, so a second test holds every help line to 140 and no row added later can lay the card out beside a wall of text again. Nothing in this pull request shortens a help line — the two longest rows that have ever been written for this card (173 and 191 characters) price the cache rates, and they arrive in #4747 already inside the limit.

Validation

Passed: headless Edge on the page's own markup, the real app.css and the real help rows, fresh profile — at 1290 px the broken layout measured 994px / 0px tracks and a field box of 30×38 (the reported squeeze), the fix 634px / 360px and 360×38; at 1100 px 587px / 360px; at 640 px the card stacks and the field is 519×40. serve.test_totals 32 tests OK and the six-module serve suite 73 tests OK, skipped 2 (node is not installed; symlinks without privilege), on four consecutive runs (16.13–16.28 s) on Windows 11, Python 3.10.11. A mutation check: put the old grid tracks back and the layout test fails; lengthen one help line and the length test fails; the tree was byte-identical after the check.

Failed: none observed.

Not run: a live capture of the unlocked card in a browser with an API key — a fresh headless profile has none and GET /config answers 401, so the card stays hidden and the numbers above come from a render of the real markup and CSS, not from the running page; a real phone width (640 px viewport only); npm test (no node in this environment).

Limits

The CSS is served no-cache, so a refresh picks the layout up; the length test reads the help rows the Python server writes, so a help line that grows wants a restart, not a refresh. Under about 560px of viewport the card stacks, where this rule never applied. The field's own max-width: 360px is untouched, so a field is no wider here than it was on a desktop.


Stack notes. Merge order is #4743 → #4745 → #4746 → #4747; until the branch before it merges, a later pull request's diff also shows those commits and shrinks on its own as they merge. serve/test_totals.py is added whole by the first branch to land and the later branches only append their own classes, so the four do not fight over one new file. The evidence about keeping the counts was added to #4631 rather than a fifth thread: --totals-reset is still a flag and not the button that issue asks for, and whether that button may move the Prometheus counters is the maintainer's call.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4743 **Author:** [@au70ma70n](https://github.com/au70ma70n) **Created:** 10/30/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `gui-settings-field-width` --- ### 📝 Commits (1) - [`145e349`](https://github.com/Niko1221/Strata/commit/145e349444f39c6c7dae300f40a15223098e173b) [GUI] settings: let a long help line wrap instead of squeezing every field ### 📊 Changes **2 files changed** (+46 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `serve/test_totals.py` (+41 -0) 📝 `serve/web/app.css` (+5 -2) </details> ### 📄 Description Branch `gui-settings-field-width` → `main` @ `870aedd9`. A focused fix, so it needs no scope agreement, and it is the first of the four to land; the three costing pull requests (#4745, #4746, #4747) are stacked behind it in that order and wait on scope agreement in #4742. ## Problem and result On the page's Settings view every field collapsed to about the width of its own spinner arrows — twenty unusable boxes in one column. The card is a two-column grid whose label column was sized to `max-content` and whose field column had a floor of `0`, so a single long help line took the whole card and left the fields nothing. After: the label column is the one that gives way (`minmax(min(180px, 100%), 1fr)`) and the field column has a floor and a cap of its own (`minmax(11rem, 360px)`, the cap matching the input's existing `max-width: 360px`). Long help wraps onto two lines; every field is 360 px wide, or full width in the stacked layout under 1000 px. ## Related discussion none found; reported by the user on the Model settings card. A focused fix can go straight to a pull request, so no scope agreement is needed. No layout or settings-card issue surfaced in the sampled searches. ## Approach Layout only: the card sized its label column to `max-content` and gave the field column no floor, so one long help line took the card and left every field the width of its own spinner arrows. `minmax(min(180px, 100%), 1fr)` lets the label wrap and `minmax(11rem, 360px)` gives the field a width of its own at every width the card is shown at; the media query keeps `1fr` where the card already stacks. The words are guarded beside the style: the longest help line on `main` is `mtp` at 137 characters, so a second test holds every help line to 140 and no row added later can lay the card out beside a wall of text again. Nothing in this pull request shortens a help line — the two longest rows that have ever been written for this card (173 and 191 characters) price the cache rates, and they arrive in #4747 already inside the limit. ## Validation **Passed:** headless Edge on the page's own markup, the real `app.css` and the real help rows, fresh profile — at 1290 px the broken layout measured `994px / 0px` tracks and a field box of `30×38` (the reported squeeze), the fix `634px / 360px` and `360×38`; at 1100 px `587px / 360px`; at 640 px the card stacks and the field is `519×40`. `serve.test_totals` 32 tests OK and the six-module serve suite 73 tests OK, skipped 2 (`node is not installed`; symlinks without privilege), on four consecutive runs (16.13–16.28 s) on Windows 11, Python 3.10.11. A mutation check: put the old grid tracks back and the layout test fails; lengthen one help line and the length test fails; the tree was byte-identical after the check. **Failed:** none observed. **Not run:** a live capture of the unlocked card in a browser with an API key — a fresh headless profile has none and `GET /config` answers 401, so the card stays hidden and the numbers above come from a render of the real markup and CSS, not from the running page; a real phone width (640 px viewport only); `npm test` (no node in this environment). ## Limits The CSS is served `no-cache`, so a refresh picks the layout up; the length test reads the help rows the Python server writes, so a help line that grows wants a restart, not a refresh. Under about 560px of viewport the card stacks, where this rule never applied. The field's own `max-width: 360px` is untouched, so a field is no wider here than it was on a desktop. --- Stack notes. Merge order is #4743 → #4745 → #4746 → #4747; until the branch before it merges, a later pull request's diff also shows those commits and shrinks on its own as they merge. `serve/test_totals.py` is added whole by the first branch to land and the later branches only append their own classes, so the four do not fight over one new file. The evidence about keeping the counts was added to #4631 rather than a fifth thread: `--totals-reset` is still a flag and not the button that issue asks for, and whether that button may move the Prometheus counters is the maintainer's call. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5159
No description provided.