Repository navigation
feat(workspaces): add Korean flag shortcode - #11845
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdded the workspace-specific 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the change is narrow and additive, touching only the workspace shortcode layer with no modifications to existing entries or lookup logic. The new WORKSPACE_EMOJI_SHORTCODE_ADDITIONS array is merged after the standard catalog, so no existing shortcodes can be overwritten. The Korean flag is confirmed absent from the emojibase-data GitHub shortcodes catalog, making the addition non-redundant. The cursor value of 4 in the replacement test is correct given the two-surrogate-pair UTF-16 encoding of the regional indicator sequence. Unit and E2E coverage directly exercise search, exact-match replacement, and the full picker flow. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/src/lib/workspace-emoji-shortcodes.ts | Introduces WORKSPACE_EMOJI_SHORTCODE_ADDITIONS with flag_kr → 🇰🇷 and merges it with the standard catalog; logic for search, exact-match lookup, and replacement is unchanged. |
| src/renderer/src/lib/workspace-emoji-shortcodes.test.ts | Adds two unit tests: one for search finding flag_kr and one for replaceCompletedWorkspaceEmojiShortcode returning the correct emoji and cursor position (4, matching the 2-surrogate-pair length of 🇰🇷). |
| tests/e2e/worktree.spec.ts | Replaces the existing 😉 shortcode E2E test with an equivalent test for :flag_kr:, covering picker visibility, autocomplete, and full replacement flow. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User types ':flag_kr'] --> B[getActiveWorkspaceEmojiShortcode]
B --> C{regex match?}
C -- yes --> D[searchWorkspaceEmojiShortcodes 'flag_kr']
D --> E[Filter SHORTCODE_ENTRIES]
E --> F[STANDARD_EMOJI_SHORTCODE_ENTRIES]
E --> G[WORKSPACE_EMOJI_SHORTCODE_ADDITIONS\nflag_kr → 🇰🇷]
F & G --> H[Sort & deduplicate by emoji]
H --> I[Show suggestion ':flag_kr:']
I --> J[User types ':']
J --> K[replaceCompletedWorkspaceEmojiShortcode]
K --> L[EXACT_SHORTCODE map lookup 'flag_kr']
L --> M[replaceWorkspaceEmojiRange\nstart=0 end=cursor emoji=🇰🇷]
M --> N[Return value='🇰🇷' cursor=4]
Reviews (1): Last reviewed commit: "feat(workspaces): add Korean flag shortc..." | Re-trigger Greptile
Summary
:flag_kr:as a focused workspace emoji shortcode for 🇰🇷Validation
pnpm lintpnpm typecheckpnpm test(42,643 passed; 78 skipped)