Skip to content

fix(workspaces): guarantee Korean flag 🇰🇷 shortcode - #11858

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/fix-kr-shortcode
Aug 1, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/fix-kr-shortcode

Conversation

@nwparker

@nwparker nwparker commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make :kr: an explicit workspace emoji shortcode for 🇰🇷
  • remove the unnecessary :flag_kr: workspace addition
  • cover :kr: suggestion and replacement in unit and packaged Electron tests

Validation

  • packaged Electron E2E: :kr: appears visibly and resolves to 🇰🇷
  • pnpm lint
  • pnpm typecheck
  • pnpm test (42,643 passed; 78 skipped)

@nwparker
nwparker merged commit 5738d61 into stablyai:main Aug 1, 2026
41 checks passed
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 39f49be7-80a5-4b8e-9681-a7b995e13854

📥 Commits

Reviewing files that changed from the base of the PR and between a53c5d3 and 8658a7c.

📒 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

The Korean flag workspace shortcode changes from flag_kr to kr. Unit tests now cover Korean flag search and completed-shortcode replacement with kr. The E2E test updates its description, typed shortcode, expected suggestion, and post-selection assertion to use kr.


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 replaces the workspace emoji shortcode for the Korean flag 🇰🇷 from :flag_kr: to :kr:, which aligns with the shortcode used in Slack and most other chat platforms. Unit tests and the packaged Electron E2E test are updated consistently.

  • workspace-emoji-shortcodes.ts: Swaps the single WORKSPACE_EMOJI_SHORTCODE_ADDITIONS entry from flag_kr to kr.
  • workspace-emoji-shortcodes.test.ts: Updates the unit-test expectations (search query, shortcode label, and cursor position) to match :kr:.
  • tests/e2e/worktree.spec.ts: Updates the E2E test that types :kr into the workspace name input and verifies the suggestion and final replacement.

Confidence Score: 5/5

Safe to merge — the change is a one-line string swap with consistent test coverage at both unit and E2E levels.

The only production change is swapping the shortcode string from 'flag_kr' to 'kr' in a read-only constant. The lookup Map correctly gives workspace additions priority over standard entries (last-write wins), so even if 'kr' appeared in the standard catalog it would resolve to 🇰🇷 as intended. Cursor arithmetic in the updated unit test (4 for ':kr:') is correct. All three test files are updated consistently.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
src/renderer/src/lib/workspace-emoji-shortcodes.ts Single shortcode string changed from 'flag_kr' to 'kr'; the rest of the file is untouched and the logic is correct.
src/renderer/src/lib/workspace-emoji-shortcodes.test.ts Unit tests updated to search/replace ':kr:' (cursor 4) instead of ':flag_kr:' (cursor 9); cursor arithmetic is correct.
tests/e2e/worktree.spec.ts E2E test description and typed input updated from ':flag_kr' to ':kr'; assertions and interaction sequence are consistent.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User types ':kr'"] --> B["getActiveWorkspaceEmojiShortcode\nreturns query = 'kr'"]
    B --> C["searchWorkspaceEmojiShortcodes('kr')"]
    C --> D["SHORTCODE_ENTRIES filtered\n(STANDARD + WORKSPACE_ADDITIONS)"]
    D --> E["Workspace addition:\n{ emoji: '🇰🇷', shortcode: 'kr' } matched"]
    E --> F["Suggestion: ':kr:' shown in dropdown"]
    F --> G["User types ':'"]
    G --> H["replaceCompletedWorkspaceEmojiShortcode(':kr:', 4)"]
    H --> I["EXACT_SHORTCODE.get('kr') → 🇰🇷"]
    I --> J["Input replaced with 🇰🇷, cursor at 4"]
Loading

Reviews (1): Last reviewed commit: "fix(workspaces): guarantee Korean flag k..." | 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