Skip to content

fix(desktop-gpui): count characters, not bytes, at caption boundaries - #2685

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:fix/caption-unicode
Oct 18, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:fix/caption-unicode

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

this is the unicode caption segmentation case from the verify expectations. caption chunking avoids ending a caption on a weak one letter word, but it checked the length in bytes, so a one letter word outside ascii like the french "à" counted as two letters and a caption could end on it.

now it counts characters, which is what the reference model already does. the tests run "à", a decomposed "à" and a cjk character through both the chunk end and short tail paths, the xfail is removed, and the full ascii and unicode segmentation oracles pass.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Changes GPUI caption boundaries to count Unicode characters instead of bytes.

  • Desktop captions keep one-letter Unicode words with nearby words.

No actionable issues found. Tests were inspected, not run.

Reviews (1) · Last reviewed commit: "fix(desktop-gpui): count Unicode charact..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@richiemcilroy
richiemcilroy merged commit 0c00839 into CapSoftware:main Oct 18, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants