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(web): reply labels no longer cut an emoji in half by ck0i · Pull Request #35701 · pingdotgg/t3code Conversation
Contributor
ProblemWhen you reply to an assistant response, the reply's label is cut to 64 UTF-16 units before it is sanitized. If an emoji starts at unit 63, the cut lands between its two surrogates and the label ends in a lone high surrogate. That broken label is what goes into the reply card's accessible name, the inline reference that gets sent, and the text sent to the provider. To reproduce, reply to an assistant response whose selected text has 63 characters followed by an emoji. The label ends in Change
ScopeSmall fix for an obvious bug. #35660 reports it. The triage bot closed it as not planned without running anything, but its own comment confirms from the code that the raw 64-unit slice has no surrogate check and that an emoji at offset 63 leaves a lone high surrogate. The new test below fails on Refs #35660 Verification
Model: Claude Opus 5.5 (claude-opus-5-5), Harness: Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Replying to an assistant response sliced the label to 64 UTF-16 units before sanitizing it, so an emoji at that boundary left a lone high surrogate in the label, the sent reference and the provider prompt. Back off one unit when the cut lands inside a surrogate pair. Refs pingdotgg#35660
|
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Reply labels now avoid cutting an emoji's surrogate pair at the length boundary. The change preserves the underlying citation and existing sanitization, with no material change beyond the shortened label text. You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 |
|---|---|
Response label boundary apps/web/src/lib/composerContextRecords.ts, apps/web/src/lib/composerContextRecords.test.ts |
responseContextRecord uses a helper that truncates at 64 UTF-16 code units and backs up when the last included unit is a high surrogate. A test verifies that the label contains only the 63-character prefix before the emoji. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related issues
responseContextRecord.Possibly related PRs
previewAnnotationContextLabel.Suggested reviewers: maria-rcks, macroscopeapp
461faReply labels no longer end in half an emoji. The change is small and tested, so merge risk is minimal.
Explanation
The title "fix(web): reply labels no longer cut an emoji in half" matches the main change. The change stops the reply label truncation at 64 UTF-16 units from leaving a lone high surrogate when an emoji falls on the boundary. The title is a conventional commit, short, and specific to the web reply label behavior.
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the lone high surrogate and gives reproduction steps. The Change section explains the cut-at-63 fix and why it matches clampContextText. The Scope section explains why this small fix needs no separate request and links #35660. The Verification section lists the new test, the throwaway reproduction, edge-case checks, and test results, and states that no screenshots were taken and that the change was not checked in a running client. The description notes the model and harness, as the template asks. The description does not include a template-specific statement that the author read CONTRIBUTING.md, which is a minor gap.
1427e79a-6cbd-49ce-9f78-b252811b10cbapps/web/src/lib/composerContextRecords.test.tsapps/web/src/lib/composerContextRecords.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.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
b4b1b6e to
459e8ce
Compare
EvidenceReal web app, Chromium, 1280×800, light theme, fresh synthetic state on each commit. Replay supplies 63 lowercase Proven: scenario fails on base and passes on head. Base retains a lone
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.
Brings in upstream through 8656cdb (pingdotgg#35701). The merge had no conflicts. - Azure DevOps scope: upstream checks out pull requests with Git instead of `az repos pr checkout` (pingdotgg#31170), so the scope no longer reads `--remote-name`; the explicit-remote case and its test are gone. - Reviewed against Cody patches with no change needed: T3 Connect device approval (pingdotgg#36419) beside bearer renewal, server browser crash recovery (pingdotgg#36389) keeps Windows sign-in on the replacement tab, mobile final_answer retention (pingdotgg#36116) beside the wrap-up rule, OpenCode fork usage (pingdotgg#23120) and usage cache. - Sync notes: Azure checkout change and version-free Cody AppImage names (pingdotgg#36306).
Co-authored-by: Julius Marminge <[email protected]> (cherry picked from commit 8656cdb)
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.