Review feedback from @malenacaroline on #3915: the theme pass carried too
many comments, and they explain decisions rather than code.
Remove 64 lines of rationale prose across 12 files. Everything taken out
described *why* a value was chosen - which palette entry MUI derives what
from, why a weight stays put, why a gradient lifts off `main`. That belongs
in the PR description and commit history, not in an `sx` block where it
goes stale the moment the palette moves.
Two comments deliberately stay:
- `StatusBox`: alpha() *replaces* the alpha channel rather than multiplying,
so the faint grid depends on `divider` being an opaque hex. That is a live
trap, not a design note.
- `Table`: the `isRowSelected` JSDoc documents a real limitation of the prop
(desktop table only), which a caller needs to know.
Section labels (// Blues, // Hooks) are untouched.
Also name the last bare number beside CONTROL_HEIGHT: the header icon links
were `width: 36` next to `height: CONTROL_HEIGHT`. Now ICON_CONTROL_WIDTH.
The other two `width: 36` sites are a switch track and a logo tile - same
number, unrelated concepts, left alone.
Gates: tsc clean, build ✓, format-check clean, lint unchanged from develop
(12 errors, all pre-existing in untouched files).
Buttons, inputs, selects, pickers, toggles and tabs all declared 34 while
IconButton and the PageHeader action sat at 32, so anything mixing them
in a row was 2px out of alignment.
Everything now reads CONTROL_HEIGHT (32) from constants, so the number
lives in one place instead of nine.
Two content-box fixes were needed to make 32 safe, both measured in the
browser rather than assumed:
- MUI's button line-height is 1.75 - 22.75px at our 13px base - which
with 6px padding needs 34.75px. It was already over its own box at 34
and would have clipped at 32. Now 1.2, which leaves headroom for the
taller scripts we ship (ar, th, vi, ja, zh).
- MUI pads the inner input 8.5px top and bottom, so an input's content
needed 35.7px inside a 32px shell and was being cut off by
overflow:hidden. Padding is zeroed in the theme for both the input and
the Select's div, which centres instead.
Verified in the DOM: button, select and input all render at exactly 32
with scrollHeight equal to height, so nothing is clipped.
Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
Two mismatches in the monitor detail header:
- The action button icons rendered at the shared Icon default of 20px,
while the sidebar clamps the same lucide icons to 16px in CSS. The
buttons were therefore 25% larger than every other icon in the app,
and taller than the cap height of the 13px label beside them. Now 16px
at all eight call sites. Left at full opacity - the sidebar dims to
0.81 because nav is recessive, but these are active controls.
- ToggleButton went to fontWeight 500 when selected while Button is a
flat 400, so the time range group sat heavier than the button row
above it. Weight now stays at 400 and the tinted fill plus text.primary
ink carry the selected state; that is a 2.9x difference in ink against
the unselected label, so selection is still obvious. It also stops the
label reflowing as you switch range.
Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
The 6% primary tint that read fine in light mode disappeared against dark backgrounds. Use a 22% tint in dark mode (30% on hover) and keep the lighter 6/10% in light mode.
Selected segment uses a 6% primary alpha rather than the previous green tint, and the per-button border override is gone so adjacent segments share one clean divider line.