Repository navigation
Commit 98ed186
authored
fix(gui): inset the Claude account-pool warning and threshold field (#2492)
* fix(gui): inset the Claude account-pool warning and threshold field
`.card` carries no padding of its own — `.card-row`, `.card-sub` and
`.setting-row` each supply the 16px inset. The experimental warning box and
the threshold field are none of those, so in the Anthropic account-pool card
they rendered flush against the card border while the title row and the
rotation rows sat 16px in. Measured in the dashboard at 814px card width:
title 17px from the card edge, warning box and threshold input 1px.
The warning takes margin rather than padding: it draws its own border, so
padding insets only its text and leaves the border on the card edge. The
threshold field takes padding because the `.input` inside is full-width, so
the field owns the inset for the label, the control and the help line.
This is the same fix `.account-pool-strategy-card` already carries for the
Codex pool card, applied to the card that still had the gap. Moving the box
styles out of inline `style` is part of it: an inline `padding` outranks any
stylesheet rule, so leaving it there would keep the inset unreachable.
* fix(gui): keep the inset rationale in one place
The stylesheet rule, the test file header, and three per-assertion comments
each restated the same two facts — that `.card` has no padding and that the
warning box needs margin rather than padding. CodeRabbit's slop detector
flagged the repetition, and it was right: the explanation belongs on the CSS
rule, where the values it justifies live.
The test header now points at that rule and keeps only what is specific to
the test — why the assertions read source text rather than measuring, and
the browser measurements the contract is derived from. The comments that
survive per assertion are the ones the CSS does not carry: why the rule
regex is anchored, how a shorthand is read, and why an inline style would
silently disable the fix.1 parent 8c21b69 commit 98ed186
3 files changed
Lines changed: 124 additions & 14 deletions
File tree
- gui
- src
- components/provider-workspace
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 182 | + | |
193 | 183 | | |
194 | 184 | | |
195 | 185 | | |
| |||
199 | 189 | | |
200 | 190 | | |
201 | 191 | | |
202 | | - | |
| 192 | + | |
203 | 193 | | |
204 | 194 | | |
205 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1732 | 1732 | | |
1733 | 1733 | | |
1734 | 1734 | | |
1735 | | - | |
| 1735 | + | |
| 1736 | + | |
1736 | 1737 | | |
1737 | 1738 | | |
1738 | 1739 | | |
| |||
1755 | 1756 | | |
1756 | 1757 | | |
1757 | 1758 | | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
1758 | 1783 | | |
1759 | 1784 | | |
1760 | 1785 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
0 commit comments