Skip to content

Add Slack emoji aliases to worktree creation - #11837

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:more-emoji
Jul 31, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:more-emoji

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

  • Extend worktree-name emoji autocomplete with 624 non-conflicting aliases from the Emojibase Slack catalog.
  • Preserve existing GitHub shortcode meanings when the catalogs disagree.
  • Raise the bounded shortcode parser limit from 40 to 64 characters so every merged alias is reachable.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test (42,624 passed; 80 skipped)
  • pnpm build (not run; data and parser-only change)
  • Added focused catalog, completion, parser-boundary, and component-level regression coverage

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.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: adding Slack emoji aliases to worktree creation.
Description check ✅ Passed The description covers the required sections, testing results, review scope, security audit, platform checks, and remaining build limitation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 676964b and b86868e.

📒 Files selected for processing (4)
  • src/renderer/src/components/new-workspace/SmartWorkspaceNameField.ime-enter.test.tsx
  • src/renderer/src/lib/workspace-emoji-shortcodes.test.ts
  • src/renderer/src/lib/workspace-emoji-shortcodes.ts
  • src/shared/emoji-shortcode-catalog.ts

@nwparker
nwparker merged commit adc56a7 into stablyai:main Jul 31, 2026
43 checks passed
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

This 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.

  • Catalog merge (emoji-shortcode-catalog.ts): GitHub entries are loaded first; Slack entries whose shortcode is already present in the GitHub set are dropped, so no existing shortcode resolves to a different emoji. PRIMARY_SHORTCODE_BY_EMOJI (used for branch-name derivation) is deliberately kept GitHub-only.
  • Parser limit (workspace-emoji-shortcodes.ts): The MAX_SHORTCODE_LENGTH constant replaces the inline literal 40 in both regex patterns and is set to 64, with the 54-char smiling_face_with_smiling_eyes_and_hand_covering_mouth alias covered by a dedicated test.
  • Tests: New cases cover Slack flag aliases, Slack-only aliases absent from GitHub, the parser boundary, completed-alias replacement, and a component-level end-to-end path via :flag-kr:.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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

@nwparker nwparker mentioned this pull request Aug 1, 2026
1 of 5 tasks
nwparker added a commit that referenced this pull request Aug 1, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant