upstreamable: Refactor built-in menu click handler in `menusToTemplate`
Open
good first issue
tech-debt
triage
- Dominant language
- TypeScript
- Stars
- 102
- Forks
- 25
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 22
Description
Currently, `menusToTemplate` re-attaches click handlers for built-in menu items by ID using a chain of `if/else if` statements. A better approach would be a map of ID -> handler, or a separate click handler registry that survives JSON serialization.
Related: #286
Contributor guide
Research direction
Search the repository for `menusToTemplate` and inspect how built-in menu click handlers are re-attached after JSON serialization. Review related issue #286 for context. The refactor is done when the existing built-in menu behavior is preserved without the current ID-based `if/else if` chain, using a maintainable handler map or registry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100