Repository navigation
fix(settings): keep the This device badge whole beside a long device name (#1179) - #2187
Conversation
…name (#1179) At 390 px the pill beside "iPhone · Safari" broke between its two words, its first half at the end of the name's line and its second on the next. It is now one inline box: beside a name that fills the line it moves to the next line whole. Its words still wrap inside it in a column narrower than the pill (a phone's row with Revoke? open), so it never runs under the row's buttons. The demo regression checks both: one box one line high beside names of every length, and inside a column as narrow as the pill's widest word.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merging 2c99503: omo-native-code-reviewer and Codex both pass this head. The change is one CSS declaration ( |
What it does
Settings → Phone & devices → Devices keeps the "This device" badge in one piece beside a device's name on a phone. Before, at 390 px the pill beside "iPhone · Safari" broke between its two words: "THIS" at the end of the name's line and "DEVICE" on the next (#1179, item 1).
Why
.devices-currentwas a plain inline span, so the line breaker split it like any text. It is nowdisplay: inline-block: an atomic inline box is never split across lines, so beside a name that fills the line it moves to the next line whole. Its own words still wrap inside it when the column is narrower than the pill (a 320 px phone in Japanese with the row's Revoke? open), so it never runs under the row's buttons. This is how chip-style labels behave in the apps we compare against (the GitHub and Linear label chips, iOS Settings' badges): a chip moves as a unit and is never cut across two lines.A first version also had
white-space: nowrap; Codex's review showed it could overflow a narrow column (MEDIUM), so it was dropped.The other items in #1179, checked on main d9050a0
.xtermcount equalled the remaining tab's panes,document.hasFocus()was true and no "Paused while you use another window" banner showed, also 2.5 s later (pastRELEASE_AFTER_MS).routeWebSocket) until the pane showed "Reconnecting to Ovis…". A tap on the grid then focusedxterm-helper-textareain both the auto and the line input modes, and typed text showed as "Input held" in the banner.Closes #1179
How it was verified
scripts/device-security-demo-regression.ts(the watching-device block) now sets the current device's name, in place, to every prefix of a long name and checks the pill is one box, one line high as beside a one-letter name. It then narrows the name column to the pill's widest word plus its margin and checks the pill stays inside it. Mutation runs: the old CSS fails the first check at 390; thenowrapversion fails the second; this change passes at 390 and 1440, light and dark, and Korean at 390.bun run check fast: success on 2c99503 (7925 pass, 0 fail).