feat(desktop): add Set Icon to the folder tab row context menu - #2150
Merged
Conversation
Closes #1985. Right-clicking a note row in a folder-opened-as-tab had no way to change the note's icon, so the one icon path the reporter of #1984 found reliable was not reachable from where they reached for it. Adds Set Icon (and Remove Icon, when the row already has one) to that menu, backed by a new optimistic `updateNoteIcon` in `useFolderView` that mirrors `updateNoteTags`. The shared EmojiPicker is reused as-is; it is hosted in a centred dialog because a context menu has no stable element to anchor a popover to. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
h4yfans
marked this pull request as ready for review
September 11, 2026 00:11
|
React Doctor found 2 new issues in 2 files · 2 warnings · score 83 / 100 (Needs work) · 2 fixed · vs 2 warnings
Reviewed by React Doctor for commit |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
Closes #1985.
Opening a folder as a tab is the one icon path the reporter of #1984 found reliable, but the right-click menu on a note row there had no icon entry, so that path was not reachable from where they reached for it.
row-context-menu.tsx, gated onisNotelike the other note-only actions, so task and inbox rows under tag scope never offer it.updateNoteIcon(noteId, emoji)inuseFolderView, a direct mirror of the existingupdateNoteTags: optimistic cache write,notesService.update, rollback + toast on failure.onSetIconthroughFolderTableViewandGroupedTable— the two views that have a row context menu at all.Assumptions, for review:
Dialog, not the usual popover.IconPickerButtonneeds a visible trigger to anchor to; a context menu has none, and the row itself spans the whole table so anchoring to it puts the panel at the far edge. A centred dialog also cannot land off screen, which is the property the reporter asked for. The sharedEmojiPickeris reused as-is inembeddedmode — no icon logic is duplicated.notes:tree.actions.setIcon/removeIconalready exist and are translated in all 32 locales; the sidebar tree uses the same two. Only one genuinely new key was needed,phaseI.toasts.failedToUpdateIcon, added and translated across all 32.Release note
Right-click a note row in a folder opened as a tab to set or remove its icon.
Test plan
pnpm lintpnpm typecheck(incl.check:contracts,check:architecture,ipc:check— all up to date, no contract changes)pnpm --filter @memry/desktop test:renderer— 730 files, 9003 tests greenrow-context-menu.test.tsx(Set Icon opens the picker and writes the pick back; Remove Icon only when the row has an icon, and clears it; both hidden for non-note rows and when no handler is wired),use-folder-view.test.tsx(updateNoteIconhitsnotesService.updatewithemoji, and rolls back with a toast on failure)pnpm --filter @memry/desktop i18n:checkpnpm docs:impact --base origin/main --strict+pnpm docs:buildNo E2E: the existing
folder-view.e2e.tssuite cannot reach a folder tab in this local environment — itsbeforeEachnever gets pastnavigateTo(page, 'notes')andT124fails identically onmain. Rather than land a spec I could not actually run, the behavior is covered by unit tests. Worth a separate look at why that suite only works in CI.🤖 Generated with Claude Code