fix(agent-display): remove ZWSP sort prefixes that truncate agent names in terminals#3419
fix(agent-display): remove ZWSP sort prefixes that truncate agent names in terminals#3419fr1sk wants to merge 1 commit into
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.
|
All contributors have signed the CLA. Thank you! ✅ |
|
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.
|
[sisyphus-bot] PR sweep status check on
Approved but blocked on merge conflicts. Please rebase onto current Assigning |
|
[sisyphus-bot] Hi fr1sk. 🙏 Thanks for the ZWSP-truncation fix and the careful regression test. Picking this back up from the 5/16 approval. Because the runtime fix this PR was targeting is now present on Really appreciate the original diagnosis; the truncation symptom was a real pain. |
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.