ReviewOS

craft-native/craft

NativeMenus.setApplicationMenu targets a transport nothing serves, and isn't exported anyway

#32
Closed glennmichael123 opened this 11 days ago ·
11 days ago

packages/typescript/src/bridge/core.ts declares NativeMenus.setApplicationMenu(menu: MenuItem[]), which sends bridge.request('menu.setApplicationMenu', { menu }) — a request-style call no zig handler serves (the menu bridge dispatches fire-and-forget actions named setAppMenu etc., see #27). The class is also not re-exported from the package index, so it is unreachable through the public API — which is the only reason nobody has hit the dead transport.

Related: docs/advanced/cross-platform.md shows mac.systemMenu.setApplicationMenu(menu), an API that exists nowhere in the codebase, and docs/BRIDGE_API.md documents only the tray menu — the app menu bar (the thing #27/#29 made real) is undocumented.

Suggest: delete NativeMenus from core.ts, fix the cross-platform doc to show the real surface (window.craft.menu.set({menus}) / onAction), and give the app menu a section in BRIDGE_API.md.

🤖 Generated with Claude Code

Sign in to comment on this issue.