fix(agent-display): remove ZWSP sort prefixes that truncate agent names in terminals#3419
Open
fr1sk wants to merge 1 commit intocode-yeongyu:devfrom
Open
fix(agent-display): remove ZWSP sort prefixes that truncate agent names in terminals#3419fr1sk wants to merge 1 commit intocode-yeongyu:devfrom
fr1sk wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
…es in terminals Set AGENT_LIST_SORT_PREFIXES values to empty strings. The zero-width space (U+200B) prefixes caused agent name truncation in VS Code integrated terminal, WezTerm, and Linux terminal emulators. Sorting already relies on the order field injected by CANONICAL_CORE_AGENT_ORDER in agent-priority-order.ts. Stripping utilities are preserved for backward compatibility with sessions that still contain ZWSP-prefixed names.
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Safely removes invisible characters causing terminal truncation. Sorting logic has been moved to the order field as noted. Tests are updated to reflect the change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENT_LIST_SORT_PREFIXESvalues to empty strings to eliminate agent name truncation in VS Code, WezTerm, and Linux terminalsstripInvisibleAgentCharacters,stripAgentListSortPrefix) for backward compatibility with old sessionsFixes #3418
Also addresses #3337, #3347, #3379 (same root cause)
Problem
AGENT_LIST_SORT_PREFIXESprepends 1-4\u200B(zero-width space) characters to core agent display names for UI list ordering. Terminals that don't treat ZWS as zero-width (VS Code integrated terminal, WezTerm, Linux emulators) clip the visible agent name, producing truncated labels likeltraworkerinstead ofUltraworker.Ghostty handles ZWS correctly and is unaffected.
Fix
The ZWSP prefixes are redundant —
CANONICAL_CORE_AGENT_ORDERinagent-priority-order.tsalready handles sorting via theorderfield injection. Setting prefix values to empty strings removes the visual corruption while keeping the map shape intact for callers.Changes
src/shared/agent-display-names.ts""src/shared/agent-display-names.test.tsTesting
PR Checklist
bun run typecheckpassesbun run buildsucceedspackage.jsonSummary by cubic
Remove zero‑width space sort prefixes from core agent display names to stop truncation in VS Code, WezTerm, and Linux terminals. Sorting now relies on the canonical order field so names render cleanly. Fixes #3418; also addresses #3337, #3347, #3379.
AGENT_LIST_SORT_PREFIXESto empty strings for core agents.stripInvisibleAgentCharactersandstripAgentListSortPrefixfor backward compatibility.Written for commit 12eb7d0. Summary will update on new commits.