Skip to content

UI: add Slack-style emoji shortcode autocomplete to chat (Emre #1 PR) - #13381

Closed
emre6943 wants to merge 17 commits into
openclaw:mainfrom
emre6943:feature/emoji-shortcode-autocomplete
Closed

emre6943 wants to merge 17 commits into
openclaw:mainfrom
emre6943:feature/emoji-shortcode-autocomplete

Conversation

@emre6943

@emre6943 emre6943 commented Feb 10, 2026 •

Copy link
Copy Markdown

Summary

Adds Slack-style :emoji: shortcode autocomplete to the Control UI chat textarea.

What it does

  • Type : followed by 2+ characters to trigger an emoji autocomplete popup
  • Navigate with ↑/↓ arrow keys, select with Enter or Tab, dismiss with Escape
  • Replaces the :shortcode: text with the actual emoji character
  • Supports 200+ common emoji shortcodes (smile, heart, thumbsup, fire, etc.)

Implementation

  • ui/src/ui/emoji-data.ts — Lightweight shortcode→emoji map (~200 entries, no external deps)
  • ui/src/ui/components/emoji-autocomplete.ts — Lit component with keyboard navigation, filtering, and text replacement
  • ui/src/styles/components/emoji-autocomplete.css — Styled using existing CSS variables for theme consistency
  • ui/src/ui/components/emoji-autocomplete.test.ts — Unit tests for filtering, selection, and edge cases
  • ui/src/ui/views/chat.ts — Integration into the chat textarea (input handler + keydown interception)
  • ui/src/styles.css — CSS import added

Design decisions

  • No external emoji libraries — keeps bundle small
  • Minimum 2 chars after : before showing suggestions (reduces noise)
  • Max 8 suggestions shown at a time
  • Uses existing CSS variables (--card, --border, --ring, etc.) for consistent theming
  • Follows existing Lit patterns (legacy decorators, experimentalDecorators)

Testing

  • All existing tests pass (914 files, 5908 tests, 0 failures)
  • New unit tests for the autocomplete component
  • pnpm build && pnpm check && pnpm test all green

Greptile Overview

Greptile Summary

This PR adds a Slack-style :emoji: shortcode autocomplete to the chat compose textarea by introducing a small in-repo shortcode→emoji dataset (ui/src/ui/emoji-data.ts), a pure Lit render/logic module for filtering + keyboard handling (ui/src/ui/components/emoji-autocomplete.ts), styling for the popup (ui/src/styles/chat/emoji-autocomplete.css imported from ui/src/styles/chat.css), and integrates it into the chat view (ui/src/ui/views/chat.ts) via @input updates and @keydown interception.

The overall integration approach fits the existing UI architecture (Lit render functions + state stored in the app render state), but there are a couple of correctness issues to address before merge: the hover behavior in the popup is currently a no-op despite being wired up, the documented “2+ chars after :” trigger doesn’t match the implementation, and the autocomplete state is stored at module scope in chat.ts which can leak/stale across session/tab changes.

Confidence Score: 3/5

  • This PR has user-visible correctness issues that should be fixed before merging.
  • Core functionality and tests look reasonable, but there are confirmed behavior mismatches (hover selection handler is effectively dead code, and the documented minimum trigger length doesn’t match the implementation) plus module-scoped state in the chat view that can persist across session/tab changes and leave stale UI state.
  • ui/src/ui/components/emoji-autocomplete.ts, ui/src/ui/views/chat.ts

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Feb 10, 2026

@greptile-apps greptile-apps 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.

2 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment thread ui/src/ui/views/chat.ts Resolved
@emre6943
emre6943 force-pushed the feature/emoji-shortcode-autocomplete branch from a6316f2 to 2a37a11 Compare February 10, 2026 14:40
@emre6943 emre6943 changed the title UI: add Slack-style emoji shortcode autocomplete to chat UI: add Slack-style emoji shortcode autocomplete to chat (Emre #1 PR) Feb 15, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Mar 10, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Mar 12, 2026
@emre6943

Copy link
Copy Markdown
Author

Fuck open source fuck this !

@emre6943

Copy link
Copy Markdown
Author

I am closing tired of fixing merge conflicts for nothing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant