Repository navigation
[Bug]: Custom viewport size input focus ring is clipped on macOS #13607
Description
Activity
Triage report: #13607
Verdict: Valid cosmetic bug. Still present on
main(86054b6df2). Not fixed afterv0.0.43-nightly.20260925.2237; the toolbar and input files are unchanged since that nightly.Severity: Low. Focus, typing, and applying a custom size still work. Only the focus ring is clipped.
Duplicate: None. Same class of bug as #10175 (file-tree search ring) and #13301 (composer chip rings), different surface.
What happened
In the desktop in-app browser, focusing a custom viewport width or height field clips the light purple outer focus ring on the top and bottom. The solid inner purple border stays visible. The field sits against the toolbar’s bottom divider. Reported on macOS with
1920 × 1080in the height field. Cosmetic only.Diagnosis
The device toolbar is a 32px horizontal scroll container, so it also clips vertically. The size fields are compact inputs whose focus ring is 3px and does not fit in that bar.
BrowserDeviceToolbarsetsheight: BROWSER_DEVICE_TOOLBAR_HEIGHT(32) andoverflow-x-auto(apps/web/src/browser/BrowserDeviceToolbar.tsx). With one axisautoand the other leftvisible, CSS computes the visible axis toauto. The bar clips descendant ink, including box-shadows, even when nothing is scrolling horizontally. The scrollbar is hidden; clipping still happens.The width and height controls are
InputwithnativeInput,size="compact", andfont="mono". The focus treatment is on the wrapper (apps/web/src/components/ui/input.tsx):- Inner border:
has-focus-visible:border-ring(the solid purple edge that stays visible). - Outer ring:
ring-ring/24plushas-focus-visible:ring-[3px](the lighter purple ring, drawn outside the border box).
The inner field is
h-7(28px) and does not shrink at thesmbreakpoint (sm:h-7). The wrapper adds a 1px border on every side and no fixed height, so the bordered control is 30px. The toolbar’s 32px height is border-box and includes its 1px bottom border, leaving a 31px content box. A centered 30px control has about half a pixel of room on each side. The 3px ring is clipped on both edges, flush with the divider. That matches the report.Neighboring controls are shorter at desktop size, so they are not the ones in the crop. The preset trigger is
size="xs"/variant="ghost"(sm:h-6, 2px ring). The lock, rotate, and close buttons aresize="icon-xs"(sm:size-6, 2px ring plus 1px offset). Both have enough room in the 31px content box. The numeric fields are the ones that stay 30px.This is the desktop Electron host only.
ElectronBrowserHostreturns null outside Electron, and the toolbar is rendered fromHostedBrowserWebview. The CSS is shared, so Windows and Linux desktop builds should clip the same way. The website and mobile app do not mount this toolbar. Settings → Integrations usesNumberFieldin a normal settings row, not this 32px bar.BROWSER_DEVICE_TOOLBAR_HEIGHTalso offsets the guest (viewportY) and shrinks the framed area inresolveBrowserDeviceViewportLayout.browserViewportLayout.test.tsexpectsviewportY: 32and a framed height of858inside a900pxpanel (900 - 32 - 10rail).Steps to reproduce
- Open the in-app browser in the desktop app.
- Turn on the device toolbar (any non-fill viewport, including a custom size such as
1920 × 1080). - Focus the viewport width or height field.
- The light outer ring is clipped on the top and bottom; the inner border is not.
Suggested fix
Keep
overflow-x-auto(narrow panels still need it).overflow-y-visiblewill not stick beside it.Give the toolbar a content box tall enough for a 30px bordered compact input plus a 3px ring on both sides (at least 36px of content, so a border-box height of 37px or more). Bump
BROWSER_DEVICE_TOOLBAR_HEIGHTby the same amount and updateresolveBrowserDeviceViewportLayoutplus theviewportY: 32test. A CSS-only height change would overlap the guest or leave a gap.Shrinking these two fields to
h-6would barely clear the ring and would make the size fields smaller than they are today. #10175 fixed the same pattern by giving the ring room.Evidence
- Toolbar:
apps/web/src/browser/BrowserDeviceToolbar.tsx(fixed 32px height,overflow-x-auto, compact numeric inputs). - Ring:
apps/web/src/components/ui/input.tsx(ring-ring/24,has-focus-visible:ring-[3px], compacth-7). - Layout constant:
apps/web/src/browser/browserViewportLayout.ts(BROWSER_DEVICE_TOOLBAR_HEIGHT = 32). - Nightly
v0.0.43-nightly.20260925.2237and currentmainmatch for these files.
No local patch, commit, or pull request.
Filed by Grok 4.7 via Cursor.
- Inner border:
- addedvia-triageFiled through npx t3 triageFiled through npx t3 triagebugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.acceptedfeature request acceptedfeature request accepted
on Sep 25, 2026
Before submitting
Area
apps/desktop — in-app browser custom viewport sizing controls.
Steps to reproduce
1920 × 1080entered).These steps are based on the reporter's screenshot and description; I did not independently replay them.
Expected behavior
The outer focus ring is fully visible around the focused size field, including its top and bottom edges.
Actual behavior
The lighter purple outer ring around the focused
1080field is cut off at both the top and bottom. The inner purple border remains visible. The crop also shows the bottom of the control meeting the toolbar's horizontal divider, consistent with vertical clipping in that row.Impact
Cosmetic issue. The screenshot establishes clipped focus styling; it does not show a failure to enter or apply a custom size.
Version or commit
The locally installed T3 Code (Nightly) app reports
0.0.43-nightly.20260925.2237. The exact build used when the screenshot was captured has not been independently confirmed.Environment
macOS 27.2, T3 Code desktop app, in-app browser custom viewport size controls. The supplied screenshot is a cropped 316 × 104 PNG at 2× scale. Appearance and display scaling beyond the image's 2× capture are not confirmed.
Screenshots, recordings, or supporting files
The reporter supplied a cropped screenshot in the originating T3 Code thread, captured on 2026-09-25 at 11:30. It shows the
1920 × 1080controls and the clipped lighter purple ring around1080. The screenshot could not be transferred to GitHub through the available issue connector.Workaround
None established.