add a Recent tab - #37
Open
aspiers wants to merge 2 commits into
Open
Conversation
Add a new "Recent" tab which shows recently used emojis. These are filterable just like the "Emojis" tab. Recently used emojis are persisted in a separate `recent_emojis.json` file in the same config directory.
kernc
force-pushed
the
master
branch
2 times, most recently
from
July 24, 2026 23:08
e01c6ea to
5c65879
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new βRecentβ tab to the EF*CK UI that displays and filters recently used emojis, and persists that history to a separate JSON file in the config directory.
Changes:
- Introduce a new
FRecentTab(model/filter/delegate/options) for displaying recent emojis. - Track emoji activations in
EmojiTaband persist recents torecent_emojis.json. - Add unit tests covering the Recent tabβs list model and text filtering.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
efck/tests.py |
Adds tests for the Recent tab model + filtering behavior. |
efck/tabs/recent.py |
Implements the new Recent tab (UI + model/filter + delegate). |
efck/tabs/emoji.py |
Updates emoji activation to record/persist the selection in the recent list. |
efck/config.py |
Adds in-memory recent_emojis plus load/dump helpers for recent_emojis.json. |
Comments suppressed due to low confidence (1)
efck/tests.py:262
- This test mutates the global config.recent_emojis list but never restores it, which can leak state into other tests. Save/restore the prior value via addCleanup (or tearDown) to keep the suite isolated.
from .config import recent_emojis
# Add test emojis to recent list
recent_emojis[:] = ['π', 'π₯', 'π'] # pineapple, avocado, peach
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+93
to
+97
| emoji = self._model.emoji_data[source_row] | ||
| # Get metadata for this emoji (name, alt_name, shortcode, custom_str) | ||
| metadata = self._model.emoji_metadata.get(emoji, ()) | ||
| # Filter by checking if all filter words appear in any of the metadata strings | ||
| return bool(self.first_matching_string(metadata, self.filter_words)) |
Comment on lines
+101
to
+104
| try: | ||
| return json.load(fd) | ||
| except json.JSONDecodeError as e: | ||
| logger.warning('Error decoding recent emojis JSON: %s', e) |
Comment on lines
+225
to
+229
| from .config import recent_emojis | ||
|
|
||
| # Add some test emojis to recent list | ||
| test_emojis = ['π', 'π₯', 'π'] | ||
| recent_emojis[:] = test_emojis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new "Recent" tab which shows recently used emojis. These are filterable just like the "Emojis" tab. Recently used emojis are persisted in a separate
recent_emojis.jsonfile in the same config directory.N.B. This was mostly vibe-coded, so I don't claim the code is necessarily top quality. However it seems to work fine.