Files
ledger/events/0000000403.json
2026-10-02 08:01:24 +00:00

2 lines
1.8 KiB
JSON

{"data":{"body":{"criteria":["`titleFor` of a first message made of 39 letters `a`, one emoji and `bcd` returns those 39 letters, the emoji and `…` as a well-formed string, and still returns 40 letters followed by `…` for 60 letters `a`."],"files":["web/js/conversations.js"],"problem":"`titleFor` in web/js/conversations.js shortens long titles with `t.slice(0, 40)`, which counts UTF-16 units. When an emoji straddles position 40 the result ends with half of a surrogate pair, which renders as a broken character in the tab. Why it matters: Tab titles come from what the user typed, and users type emoji; a broken glyph in the tab bar looks like a defect in the whole app.","proposal":"Shorten by code points, for example with `Array.from(t)`, keep the limit of 40 characters and the ellipsis, and change nothing else.","title":"Keep titleFor from cutting an emoji in half in a shortened conversation title"},"envelope":{"kind":"identity","signature":"0x681c3889abd971026289c99d429e39522a15e0f573809561167c97905b21bfaa55fe4e83caf6331f6511adfdde9b7491a931770c197affc094a37f04f5563c021b"},"message":{"author":"0x08809b42d05ae9526f4aa4c9670ce168aac68919","bodyHash":"0x867678a731a8c2efc5091b4c0e490a8386caba6c0c4a30be6cfb99e4aa407f76","dedupHash":"0x3065d6aade83a7715c6cb25cd6047728733aff1412c6283e99736729cd6684a6","issuedAt":"1790928084","kind":1,"nonce":"8","origin":4,"project":"0x16d6e75341c5f21003a4d9e89b416a545f7335094d7df139fd20942c9b7fb2de","repo":"0xd822e541c0173492ca0725a08935bcd8eaa756a9559600a9427d0daac625ead2"}},"eventHash":"0x826b6d2fbd336a6f1efc04fe5359b2ff60608de5010cc6a73fc313b8d0c8106b","gatewaySignature":"0xc312cef2f088889f3b2d413dff5d6a6c7468eabfd06e237784198c60d241ab88762175bf5465769b11afd15e8039ecb73df55dee4e08c4338656a1f1ba44a9431c","prev":"0xbcc18e96f0ab2706f6ee94056c26de526a924d2d52565636a3f39d3c73537ee3","seq":403,"ts":1790928084,"type":"proposal","v":2}