Skip to content

feat(workspaces): add Korean flag shortcode - #11845

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/korean-flag-shortcode
Aug 1, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/korean-flag-shortcode

Conversation

@nwparker

@nwparker nwparker commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add :flag_kr: as a focused workspace emoji shortcode for 🇰🇷
  • cover shortcode search and completed replacement
  • verify the full picker flow in packaged Electron

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm test (42,643 passed; 78 skipped)
  • packaged Electron E2E for the Korean flag shortcode

@nwparker
nwparker merged commit e79304c into stablyai:main Aug 1, 2026
41 of 42 checks passed
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 63788cbf-016c-4e2e-ae19-e0a9f5e4c47e

📥 Commits

Reviewing files that changed from the base of the PR and between 3c05e03 and bfde3e9.

📒 Files selected for processing (3)
  • src/renderer/src/lib/workspace-emoji-shortcodes.test.ts
  • src/renderer/src/lib/workspace-emoji-shortcodes.ts
  • tests/e2e/worktree.spec.ts

📝 Walkthrough

Walkthrough

Added the workspace-specific flag_kr shortcode for the Korean flag and merged it with the standard shortcode catalog. Updated unit tests to cover lookup and replacement, including cursor position. Updated the end-to-end test to verify suggestions, conversion, option dismissal, continued text entry, and workspace name preservation.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and validation, but it omits the required Screenshots, Testing, AI Review Report, Security Audit, and Notes sections. Add all required template sections, including screenshot status, test checklist, cross-platform AI review confirmation, security audit findings, and platform-specific notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding the Korean flag shortcode for workspaces.
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.

@greptile-apps

greptile-apps Bot commented Aug 1, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds 🇰🇷 (South Korean flag) as a workspace-specific emoji shortcode flag_kr, which is absent from the underlying emojibase-data GitHub shortcodes catalog used by the standard entries.

  • workspace-emoji-shortcodes.ts: Introduces a WORKSPACE_EMOJI_SHORTCODE_ADDITIONS constant and merges it with STANDARD_EMOJI_SHORTCODE_ENTRIES so the new shortcode participates in search, exact-match lookup, and replacement without touching any existing logic.
  • workspace-emoji-shortcodes.test.ts: Adds unit tests for search (flag_kr resolves to 🇰🇷) and for completed-shortcode replacement (correct emoji value and cursor position of 4, matching the two-surrogate-pair UTF-16 length of the regional indicator sequence).
  • worktree.spec.ts: Updates the existing shortcode E2E test to exercise :flag_kr: through the full picker flow — suggestion visibility, completion on :, and post-replacement value.

Confidence Score: 5/5

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

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "feat(workspaces): add Korean flag shortc..." | Re-trigger Greptile

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