The best way to control Claude Code, Codex and more from any computer or phone
fix(web): stop wide ordered list markers from clipping (#16523)
Utkarsh Patil committed
Oct 7, 2026 at 01:02 UTC
8c61e254fd07249b8c420c44d62e8ecd72a78a20
1 file changed
+2
-2
apps/web/src/components/ChatMarkdown.tsx
+2
-2
@@ -378,7 +378,7 @@ function findTaskListMarkerOffset(markdown: string, listItemStart: number): numb
378
* The default `1.25rem` marker gutter (`.chat-markdown ol`) fits one-character
379
* markers. Wider markers can extend past it and get clipped by a collapsed
380
* message's overflow. Widen the gutter to fit the widest marker, including a
381
- * negative marker's minus sign.
381
+ * negative marker's minus sign, the period, and the trailing space.
382
*/
383
function orderedListGutterStyle(
384
itemCount: number,
@@ -389,7 +389,7 @@ function orderedListGutterStyle(
389
const lastNumber = firstNumber + Math.max(itemCount - 1, 0);
390
const markerWidth = Math.max(String(firstNumber).length, String(lastNumber).length);
391
if (markerWidth <= 1) return undefined;
392
- return { "--list-gutter": `${markerWidth + 1}ch` };
392
+ return { "--list-gutter": `${markerWidth + 2}ch` };
393
}
394
395
type MarkdownImageHastNode = {