Skip to content

fix(web): diagnostics process names no longer end in half an emoji - #43397

Open
iamshadmantaqi wants to merge 3 commits into
pingdotgg:mainfrom
iamshadmantaqi:fix/diagnostics-process-name-emoji-cut
Open

iamshadmantaqi wants to merge 3 commits into
pingdotgg:mainfrom
iamshadmantaqi:fix/diagnostics-process-name-emoji-cut

Conversation

@iamshadmantaqi

Copy link
Copy Markdown
Contributor

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):

  1. In a T3 Code terminal: cp "$(command -v sleep)" "/tmp/$(printf 'n%.0s' $(seq 38))😀-long-process-name" && "/tmp/$(printf 'n%.0s' $(seq 38))😀-long-process-name" 600
  2. Open Settings > Diagnostics and wait for Resource history to pick the process up.
  3. The row reads 38 n, a broken character, then .... Expected: 38 n then ....

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

  • Test commit: move formatProcessName and formatShortProcessName unchanged from DiagnosticsSettings.tsx into DiagnosticsSettings.logic.ts, so the cut can be tested, and add the test.
  • Fix commit: in 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:

FAIL  formatShortProcessName > keeps a character whole when a long process name is cut
Tests  1 failed | 1 passed (2)

With the fix:

Tests  2 passed (2)

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.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change moves process-name formatting and truncation into shared logic. Truncation avoids splitting a surrogate pair. The diagnostics settings component imports the shared helpers, and a test covers truncation near an emoji.

Changes: Process-name formatting

Layer / File(s) Summary
Formatting helpers and validation
apps/web/src/components/settings/DiagnosticsSettings.logic.ts, apps/web/src/components/settings/DiagnosticsSettings.logic.test.ts
The shared logic formats process names and truncates names longer than 42 characters. Truncation adjusts its boundary to avoid splitting a surrogate pair. A test checks truncation when an emoji follows 38 characters.
Diagnostics settings integration
apps/web/src/components/settings/DiagnosticsSettings.tsx
The component imports the shared formatting helpers and removes its local implementations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: macroscopeapp, juliusmarminge

Merge Risk: Minimal · up to 3e638

Merge Risk: ⚪ Minimal · up to 3e638

This fixes broken emoji in truncated process names in the diagnostics resource history. The change is small, limited to display formatting, and covered by a unit test. There is no meaningful merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: process names in Settings > Diagnostics no longer end in half an emoji. It follows the conventional commit form and is specific. It matches the raw summary, which adds…
Description check Passed The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives expected behavior and reproduction steps. The Change section explai…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: process names in Settings > Diagnostics no longer end in half an emoji. It follows the conventional commit form and is specific. It matches the raw summary, which adds a truncation rule that avoids splitting a surrogate pair, and the PR objectives, which describe the same fix.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives expected behavior and reproduction steps. The Change section explains the move of helpers and the cut rule fix. The Scope section explains why no issue is linked. The Verification section gives focused test output and the observed results. It also states what was not checked and names the model and harness. The template's Problem and Change sections are fully filled. The Scope section cites a bug and gives a reason for no issue, which meets the template's requirement.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 147028a and 643e39a.

Files selected for processing: 3

  • apps/web/src/components/settings/DiagnosticsSettings.logic.test.ts
  • apps/web/src/components/settings/DiagnosticsSettings.logic.ts
  • apps/web/src/components/settings/DiagnosticsSettings.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). takeover:in-progress A takeover lead is working on this PR vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants