Repository navigation
fix(web): diagnostics process names no longer end in half an emoji - #43397
iamshadmantaqi wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Settings > Diagnostics > Resource history lists each process under a short name. A name over 42 characters is cut to 39 and given
.... When the cut lands inside an emoji, the row shows half of it, so the name ends in a broken character before the.... The row's accessible name ("Child process ...") carries the same broken character.Steps (Linux):
cp "$(command -v sleep)" "/tmp/$(printf 'n%.0s' $(seq 38))😀-long-process-name" && "/tmp/$(printf 'n%.0s' $(seq 38))😀-long-process-name" 600n, a broken character, then.... Expected: 38nthen....The cut came in #2685. The same kind of cut elsewhere in the app already keeps characters whole with
splitsSurrogatePair(for example #42244, #41901).Change
formatProcessNameandformatShortProcessNameunchanged fromDiagnosticsSettings.tsxintoDiagnosticsSettings.logic.ts, so the cut can be tested, and add the test.formatShortProcessName, cut at 38 instead of 39 when 39 would split an emoji. Short names and other long names are cut exactly as before.If you would rather keep the helpers in the component, the fix on its own is 3 lines.
Scope
Small fix of an obvious bug, steps reproduce it, so it needs no issue.
Verification
New test in
DiagnosticsSettings.logic.test.ts, "keeps a character whole when a long process name is cut".Test commit alone, on main 0df7907:
With the fix:
vp run check:changed: format, lint, knip, typecheck (2 packages), test (1 file) and React Compiler (2 files) all pass.Not verified: I did not run the steps in the real app; the broken character on screen is inferred from the test, not seen.
Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.