feat(renderer): register menu commands in AppShell (Phase 6 wiring)

- useRegisterMenuCommands: registers file.open, file.save, file.closeTab,
  tab.next, tab.prev, view.toggleSidebar, view.togglePreview in command store
- useBridgeNativeMenu: useMenuAction for 13 native-menu channels
  (file-save, toggle-preview, load-template-menu, etc.)
- AppShell calls both on mount
- integration test mock extended to include ipc.menu.on
- 145/145 tests pass (was 105)
This commit is contained in:
Amit Haridas
2026-06-05 15:56:32 +05:30
parent cdd370c62d
commit 1717b2e8c0
4 changed files with 225 additions and 0 deletions
+3
View File
@@ -37,6 +37,9 @@ vi.mock('@/lib/ipc', () => ({
pickFile: vi.fn().mockResolvedValue({ ok: true, data: '/root/README.md' }),
onChange: vi.fn(() => () => {}),
},
menu: {
on: vi.fn(() => () => {}),
},
},
}));