Pin menu: pinboards with the same name share a React key
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- electron, react, typescript
Research direction
Read src/renderer/src/shelf/shelf-app/components/menu/menu.tsx and menu.types.ts, then trace how pinEntries is built in src/renderer/src/shelf/shelf-app/shelf-app.tsx. Reproduce with two pinboards named Work in pnpm demo. Done means both entries render without a React key warning, each checkbox pins the card to its own board, and other menus behave as before.
Written by the indexing model from the issue text.
Description
Nothing stops two pinboards from having the same name. When they do, the Pin to menu renders both entries with the same React key, and the console shows:
Encountered two children with the same key, `Work`. Keys should be unique so that components
maintain their identity across updates. Non-unique keys may cause children to be duplicated
and/or omitted
To reproduce in pnpm demo: create two pinboards called Work, right-click a card and hover Pin to.
Where to look
src/renderer/src/shelf/shelf-app/components/menu/menu.tsx:<MenuItem key={entry.label} … />src/renderer/src/shelf/shelf-app/components/menu/menu.types.ts: theMenuEntrytypepinEntriesinsrc/renderer/src/shelf/shelf-app/shelf-app.tsx, which builds one entry per pinboard
A menu's entries don't change order while it's open, so the entry's index is a fine key. Adding an optional id to MenuEntry and setting it to the board's id also works.
Done when
- With two pinboards named Work, the menu shows both, there's no key warning, and checking each one pins the card to that pinboard
- The other menus look and behave as before
Whether two pinboards should be allowed to share a name is a separate question. This issue is only about the menu.
Suggested pull request title: fix(shelf): keep same-named pinboards apart in the pin menu
New to OpenPaste? CONTRIBUTING.md covers setup, the code conventions and the checks to run before a pull request (pnpm typecheck, pnpm test, pnpm format, pnpm cleaner). Leave a comment if you're picking this up so nobody doubles up.
Generated by Claude Code
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alexsilver8/openpaste
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
alexsilver8/openpaste#31 ·
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
alexsilver8/openpaste#32 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
alexsilver8/openpaste#30 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
alexsilver8/openpaste#29 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
alexsilver8/openpaste#28 ·
All issues in alexsilver8/openpaste
Similar issues
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
agent-task risk:low
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
guyellis/http-status-check#512 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/playwright#43327 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/TypeScript#64758 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
Maintainers usually reply within 2 days