GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — fix(server): keep emoji intact in review guide comment summaries by jadelike-wine · Pull Request #42549 · pingdotgg/t3code Conversation
Contributor
ProblemWhen Write guide summarizes a resolved or outdated review thread, it can cut an emoji in half in the opening comment. For example, with 199 ChangeBack up one UTF-16 code unit when the 200-unit cutoff falls between the two halves of a surrogate pair. An emoji that fits at the end of the excerpt stays intact. ScopeThis fixes the server-side comment excerpt used by Write guide. The same line was noted in #35082. Its linked fix, #35111, covered Web hover previews. VerificationI passed GitHub review-thread fixtures through the review guide input builder and the Claude text-generation adapter. A local stand-in for the Claude CLI recorded its UTF-8 stdin. These are the characters after the ASCII prefix in the captured prompt:
The 199-character regression case failed on the upstream implementation. Both boundary cases passed with the fix. Model: GPT-6. Harness: Codex Desktop.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Surrogate-safe truncation and tests apps/server/src/pullRequest/pullRequestReviewGuideInput.ts, apps/server/src/pullRequest/PullRequestReviewGuideService.test.ts |
oneLine keeps 199 code units when the 200-character boundary splits a surrogate pair, then appends an ellipsis. Tests cover emoji after 198- and 199-character prefixes. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
75935This change stops review-thread excerpts from being cut in the middle of an emoji. It is narrowly scoped and has regression tests, so merge risk is minimal.
Explanation
The title names the main change: review guide comment summaries no longer split emoji at the truncation boundary. It follows the conventional commit format and matches the server-side fix in the changed truncation logic.
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The problem, the surrogate-pair fix, the linked issue and PR, and the before/after verification table are all provided. The model and harness are named at the end, as the template asks. The description does not use the template's HTML comment prompts, and it has no screenshots. The UI-screenshot rule does not apply because the change is server-side.
27774d3e-7619-4dd4-ad2c-9fc697f185f5apps/server/src/pullRequest/PullRequestReviewGuideService.test.tsapps/server/src/pullRequest/pullRequestReviewGuideInput.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
EvidenceGenerated review guides through each commit’s real server using the same resolved GitLab diff comment and real Claude Haiku 5.5. Captured stdin forwarded unchanged to
Seed and driver scripts with reproduction instructions. Not shown:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.