Repository navigation
Add Slack emoji aliases to worktree creation - #11837
Conversation
📝 WalkthroughWalkthroughThe shared emoji catalog now combines GitHub and Slack shortcode datasets while retaining GitHub entries for primary emoji-to-shortcode lookup. Workspace shortcode detection and replacement use shared patterns that support names up to 64 characters. Tests cover Slack aliases, Korean flag aliases, completed replacements, long shortcodes, and input replacement behavior. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 362ca782-42a9-4296-80d3-af261c00a2c6
📒 Files selected for processing (4)
src/renderer/src/components/new-workspace/SmartWorkspaceNameField.ime-enter.test.tsxsrc/renderer/src/lib/workspace-emoji-shortcodes.test.tssrc/renderer/src/lib/workspace-emoji-shortcodes.tssrc/shared/emoji-shortcode-catalog.ts
Greptile SummaryThis PR extends the worktree-name emoji autocomplete by merging 624 non-conflicting Slack (iamcal) shortcode aliases into the catalog, raises the regex parser limit from 40 to 64 characters to cover the longest 54-character Slack alias, and preserves all existing GitHub shortcode meanings for reverse emoji-to-branch-name mapping.
Confidence Score: 5/5Safe to merge — pure catalog and parser-limit change with no logic alterations to branch-name derivation, authentication, or IPC paths. All four changed files are data, regex constants, and tests. The catalog merge correctly gives GitHub shortcodes priority and keeps PRIMARY_SHORTCODE_BY_EMOJI GitHub-only so branch names are unaffected. The limit bump to 64 is justified by the 54-char longest alias and is covered by an explicit test. Cursor arithmetic for multi-codepoint flag emojis is correct. No pre-existing or new correctness issues were found. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/shared/emoji-shortcode-catalog.ts | Adds Slack (iamcal) catalog import and merges non-conflicting aliases after GitHub entries; extracts shared toEmojiShortcodeEntries helper; PRIMARY_SHORTCODE_BY_EMOJI deliberately stays GitHub-only for reverse mapping. |
| src/renderer/src/lib/workspace-emoji-shortcodes.ts | Raises MAX_SHORTCODE_LENGTH from 40 to 64 (covering the 54-char longest Slack alias) and extracts regex patterns as named module-level constants; no logic changes beyond the limit bump. |
| src/renderer/src/lib/workspace-emoji-shortcodes.test.ts | Adds targeted tests for Slack flag aliases, Slack-only aliases, longest alias parser boundary, and completed Slack-only flag replacement; coverage is thorough. |
| src/renderer/src/components/new-workspace/SmartWorkspaceNameField.ime-enter.test.tsx | Swaps the component-level shortcode regression from 😉 to :flag-kr: (a new Slack alias) to exercise the end-to-end Slack path; selection range updated correctly to 16. |
Reviews (1): Last reviewed commit: "feat(workspaces): add Slack emoji aliase..." | Re-trigger Greptile
…tablyai#11843) This reverts commit 2097f4f.
Summary
Screenshots
No visual change.
Testing
AI Review Report
Reviewed catalog collision behavior, autocomplete and exact-completion paths, parser constraints, and the existing branch-name derivation behavior. Review flagged that nine Slack aliases exceeded the prior 40-character parser cap; the cap is now 64 and the longest current 54-character alias has active/completion coverage.
Cross-platform compatibility was explicitly checked for macOS, Linux, and Windows. This change is platform-neutral Unicode/catalog parsing and does not alter shortcuts, labels, paths, shell behavior, SSH/folder-workspace behavior, or Electron platform integrations.
Security Audit
The catalog remains static bundled data and the user-input regex remains length-bounded. No command execution, path handling, authentication, secrets, dependency versions, network access, or IPC surfaces changed. Existing GitHub mappings remain the source for branch-name derivation, avoiding unexpected branch/path renames.
Notes
The current GitHub catalog already includes 🇰🇷, and that path passes focused tests on main. This PR adds Slack-only alternatives such as :flag-kr: and :mostly_sunny: plus 622 others; it does not claim to fix a reproducible failure of the pre-existing 🇰🇷 alias.