Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: a narrow-screen header, a one-row terminal badge strip and no sideways page scroll at 360px

There was no width media query anywhere. At 360px the header wrapped into three rows covering a third of the screen, an agent card's trailing controls pushed the page 100px wider than the screen, and the terminal's state badges wrapped onto its first rows of text. At 40em or less the brand and the menus share the first header row, the nav is one row that scrolls sideways (its indicator accounts for the scroll), a card's header line wraps and its icon is smaller, and the state badges over a terminal are one row that scrolls sideways.
This commit is contained in:
iris 2026-11-19 19:05:19 +01:00 • committed by mara
commit 2a719a52e8
3 changed files with 63 additions and 3 deletions

View file

@ -29,3 +29,10 @@
width: 1.3em;
border-radius: 3px;
}
/* A narrow screen: a smaller square, so a card's text keeps its width. */
@media (max-width: 40em) {
.ui-agent-icon {
width: 3.5em;
}
}

View file

@ -3,8 +3,9 @@
message arrangement inside one. */
.ui-agent-card-line1 {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6em;
gap: 0.4em 0.6em;
}
.ui-agent-card-name {
font-weight: 600;

View file

@ -137,3 +137,20 @@
border-radius: 0 0 0.5em 0.5em;
overflow: hidden;
}
/* A narrow screen: the state badges stay one row that scrolls sideways, so the
row over the terminal keeps the height its padding reserves instead of
wrapping onto the first rows of text. */
@media (max-width: 40em) {
.ui-agent-term-preview-header-badges {
flex-wrap: nowrap;
overflow-x: auto;
scrollbar-width: none;
}
.ui-agent-term-preview-header-badges::-webkit-scrollbar {
display: none;
}
.ui-agent-term-preview-header-badges > * {
flex: none;
}
}