Install native macOS menu in generated apps (v0.10.5)#3
Open
Laeyoung wants to merge 10 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Document the design for installing an ApplicationMenu in generated appbun projects so that Cmd+C/V/X/A/Z/Q and right-click Cut/Copy work out of the box. The spec covers menu structure, platform guard, Electrobun API decisions (D1–D6), file-level changes, rollout, and rollback. Reviewed and refined through six parallel-agent passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
안녕하세요. 만들어 주신 거 설치해서 잘 써보고 있습니다.
설치해서 쓰다보니, CMD + C, CMD + V 같은 기본적인 복사 붙여 넣기 단축키가 지원이 안되는거 같더라고요.
그래서, 추가해 보았습니다.
요약
생성된 appbun macOS 앱에 네이티브
NSMenu(App / Edit / View / Window)가 설치되어,Cmd+C/V/X/A/Z/Q/R/F/M단축키와 우클릭 Cut/Copy가 모든 텍스트 입력 필드에서즉시 동작합니다. 신규 CLI 플래그는 추가되지 않았으며, Windows/Linux 동작은
변경되지 않습니다.
dev-docs/native-menu-shortcuts.mddev-docs/2026-05-28-native-menu-shortcuts-plan.md변경 사항
src/lib/templates/shell.ts—generatedBunEntry()가 macOS에서ApplicationMenu.setApplicationMenu([...])를 호출하도록 수정. 빌트인role항목과Reload커스텀액션(임베디드
<electrobun-webview id="remote-app">로 프록시) 포함.if (isMac)가드로 Windows/Linux는무영향.
src/lib/templates/project.ts— 생성되는tsconfig.json에esModuleInterop: true추가 (Electrobun기본 import 호환을 위해).
.github/workflows/scaffold-smoke.yml—ApplicationMenu.setApplicationMenu,process.platform === "darwin",role: "copy"3개 grep 가드 추가.src/__tests__/generator.test.ts— 메뉴 install / Reload 핸들러 / 중복 등록 가드 /tsconfig플래그단위 테스트.
CLAUDE.md,skills/appbun-web-desktop/{SKILL,CLAUDE}.md— 새 grep contract와 macOS 단축키 QualityBar 항목 동기화. (부수적으로 stale한
scaffold.yml→scaffold-smoke.yml파일명 수정.)package.json— 버전0.10.4→0.10.5.검증
자동 검증 (모두 통과):
bun run check— TypeScript strict 통과bun test src— 27/27 통과 (신규 메뉴 테스트 포함)bun run release:check—npm pack --dry-run클린, 새 파일 유출 없음scaffold-smoke.yml와 동일 시퀀스) 로컬 재현 —ApplicationMenu.setApplicationMenu,process.platform === "darwin",role: "copy"모두 생성된src/bun/index.ts에서 발견됨tsc --noEmit— 우리 코드에서 에러 없음 (electrobun 1.18.1의 vendorednode_modules/electrobun/dist/api/bun/index.ts:32에서three타입이 누락된 에러가 1건 보고되나, 동일한에러가
main베이스라인에서도 재현되는 사전 존재 이슈)수동 검증 (스펙 §8.2, 머지 전 완료 권장):
Cmd+C복사 (pbpaste 교차 확인)Cmd+V,Cmd+X,Cmd+A,Cmd+Z,Cmd+Shift+Z동작Cmd+Q앱 종료Cmd+M최소화,Cmd+Ctrl+F풀스크린 토글Cmd+R이 임베디드<electrobun-webview id="remote-app">만 reload (쉘 chrome 깜빡임 없음)#reload-app버튼은 별개 동작 유지Windows / Linux
이번 변경은
if (isMac)가드 안에서만 동작합니다. Windows/Linux 생성 앱의동작은 변경되지 않습니다. Windows 부분 지원(스펙 §10 D5의 single-character
accelerator)은 별도 follow-up PR로 추적합니다.
Rollback
발행 후 회귀가 보고되면, 메뉴 관련 5개 커밋만 revert합니다:
a8b2340Enable esModuleInterop in generated tsconfig669ca15Install native macOS menu in generated bun entry2d22d87Assert native macOS menu lands in generated project (scaffold-smoke)bd1227eDocument menu grep contract and fix scaffold-smoke filename in CLAUDE.mda97b06aRelease v0.10.5skills 문서 2개 커밋(
cef256d,8253211)은 스펙 §9.1에 따라 revert에서 제외합니다 — 제품 기대치문서이며 메뉴 코드와 직교합니다.
bd1227e내scaffold.yml → scaffold-smoke.yml파일명 수정은 독립적정확성 수정이므로 유지하고, grep contract 문단만 되돌리면 됩니다.
Release 후속
머지 후 GitHub UI에서
v0.10.5Release를 publish 하면publish.yml이release: published로 트리거되어check+test+build+npm publish를수행합니다. Release body 텍스트(스펙 §7):