@devries-cameron20 / t3code-1 / commits / ea493ec1d8
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): composer list markers no longer clip in wider prompt fonts (#18972)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Jyrki De Neve committed Oct 20, 2026 at 04:56 UTC ea493ec1d8888cdc8d47278d0fcaebdfe9315ab0
2 files changed +53 -1
apps/web/src/composer-rich-text-doc.ts
+11 -1
@@ -262,8 +262,18 @@ const ComposerListItemExtension = ListItem.extend({
262 Delete: () => deleteAcrossList(this.editor),
263 };
264 },
265 + // ProseMirror can reuse the parent list when only an item's marker changes.
266 + // Item metadata lets CSS resize its gutter through CommonMark's nine-digit limit.
267 renderHTML({ node, HTMLAttributes }) {
266 - return ["li", mergeAttributes(HTMLAttributes, { "data-marker": node.attrs.marker }), 0];
268 + const marker = String(node.attrs.marker);
269 + return [
270 + "li",
271 + mergeAttributes(HTMLAttributes, {
272 + "data-marker": marker,
273 + "data-marker-width": Math.min(marker.length, 10),
274 + }),
275 + 0,
276 + ];
277 },
278 });
279
apps/web/src/index.css
+42
@@ -1869,6 +1869,48 @@ code {
1869 content: attr(data-marker) " ";
1870 }
1871
1872 +/* The prompt font and size can differ from the interface, so its gutter must
1873 + also follow the prompt's font metrics. */
1874 +.composer-tiptap ol {
1875 + --list-gutter: max(1.25rem, 3ch);
1876 +}
1877 +
1878 +.composer-tiptap ol:has(> li[data-marker-width="3"]) {
1879 + --list-gutter: max(1.25rem, 4ch);
1880 +}
1881 +
1882 +.composer-tiptap ol:has(> li[data-marker-width="4"]) {
1883 + --list-gutter: max(1.25rem, 5ch);
1884 +}
1885 +
1886 +.composer-tiptap ol:has(> li[data-marker-width="5"]) {
1887 + --list-gutter: max(1.25rem, 6ch);
1888 +}
1889 +
1890 +.composer-tiptap ol:has(> li[data-marker-width="6"]) {
1891 + --list-gutter: max(1.25rem, 7ch);
1892 +}
1893 +
1894 +.composer-tiptap ol:has(> li[data-marker-width="7"]) {
1895 + --list-gutter: max(1.25rem, 8ch);
1896 +}
1897 +
1898 +.composer-tiptap ol:has(> li[data-marker-width="8"]) {
1899 + --list-gutter: max(1.25rem, 9ch);
1900 +}
1901 +
1902 +.composer-tiptap ol:has(> li[data-marker-width="9"]) {
1903 + --list-gutter: max(1.25rem, 10ch);
1904 +}
1905 +
1906 +.composer-tiptap ol:has(> li[data-marker-width="10"]) {
1907 + --list-gutter: max(1.25rem, 11ch);
1908 +}
1909 +
1910 +.composer-tiptap ul {
1911 + padding-left: max(1.25rem, 2ch);
1912 +}
1913 +
1914 :is(.chat-markdown, .composer-tiptap) ul ul {
1915 list-style-type: circle;
1916 }