Commit 828a655
fix(#103): capability-hidden tiles staying visible (CSS specificity bug)
Root cause: my new flex-fill rule
#charts-grid .grid-stack-item-content { display: flex; ... }
has higher specificity (0,1,2,0) than Tailwind's .hidden utility
(0,0,1,0) and was winning the cascade. So when applyCapabilities()
correctly added .hidden to capability-not-installed cards (caddy /
traefik / nginx / apache on a HAProxy-only host like light-hugger),
the display: flex from my rule overrode display: none from .hidden
— the cards stayed visible with their titles + empty chart areas.
The agent's probes and the JS hide logic were both doing the right
thing the whole time; the override was silent because dev-tools'
computed-style panel just shows "display: flex" without flagging
which rule it lost to.
Fix: scope the flex-fill rule with :not(.hidden) so .hidden wins
the cascade for capability-hidden cards. Now display: none kicks
in as intended, the tile vanishes visually, and the container-
height recompute brings the bottom edge up to whatever the last
*visible* tile ends — no more ghost slots reserving space below
the layout.
Same bug would have hit no-HAProxy hosts (the HAProxy cards
would stay visible despite haproxyAvailable=false). Catching it
before that footgun lands in front of a real user.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c44b5e1 commit 828a655
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
459 | 463 | | |
460 | 464 | | |
461 | 465 | | |
| |||
0 commit comments