The best way to control Claude Code, Codex and more from any computer or phone
fix(web): composer context strip no longer counts its padding as free space (#13642)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Michał Pierzchała committed
Oct 19, 2026 at 23:09 UTC
4131e6d77685169e57ef7ff9f6437e482e578a64
1 file changed
+8
-3
apps/web/src/components/BranchToolbar.tsx
+8
-3
@@ -426,8 +426,13 @@ function useLabelsOverflow(element: HTMLDivElement | null): boolean {
426
const current = element;
427
const compact = overflows;
428
if (!current) return;
429
- const available = current.clientWidth;
430
- if (available === 0) return;
429
+ const stripWidth = current.clientWidth;
430
+ if (stripWidth === 0) return;
431
+ const stripStyle = getComputedStyle(current);
432
+ const available =
433
+ stripWidth -
434
+ (Number.parseFloat(stripStyle.paddingInlineStart) || 0) -
435
+ (Number.parseFloat(stripStyle.paddingInlineEnd) || 0);
436
const contentWidth = (parent: Element): number => {
437
const gap = Number.parseFloat(getComputedStyle(parent).columnGap) || 0;
438
let width = 0;
@@ -446,7 +451,7 @@ function useLabelsOverflow(element: HTMLDivElement | null): boolean {
451
}
452
return width + gap * Math.max(0, counted - 1);
453
};
449
- const stripGap = Number.parseFloat(getComputedStyle(current).columnGap) || 0;
454
+ const stripGap = Number.parseFloat(stripStyle.columnGap) || 0;
455
let needed = 0;
456
let groups = 0;
457
for (const child of current.children) {