Visitar URL original
feat(desktop): Windows support by waleedlatif1 · Pull Request #9499 · simstudioai/sim · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a4819eb
feat(desktop): package an NSIS x64 installer for Windows
waleedlatif1 Oct 31, 2026
1babb21
feat(desktop): self-update Windows shells through electron-updater's …
waleedlatif1 Oct 31, 2026
3783207
feat(desktop): advertise the shell platform and gate surfaces per pla…
waleedlatif1 Oct 31, 2026
b8dfb41
feat(desktop): build a Windows File/Edit/View/Help menu
waleedlatif1 Oct 31, 2026
9fd011a
feat(desktop): full-colour Windows tray icon that opens Sim on click
waleedlatif1 Oct 31, 2026
9a4b88a
feat(desktop): Windows single-instance focus, AUMID, and native windo…
waleedlatif1 Oct 31, 2026
d0a4ec4
feat(desktop): report the app theme preference and strip the picker m…
waleedlatif1 Oct 31, 2026
41077cf
feat(desktop): serve Windows update feeds alongside macOS
waleedlatif1 Oct 31, 2026
95010d3
feat(desktop): point sim-setup and the docs at the Windows build
waleedlatif1 Oct 31, 2026
50a1ce7
feat(desktop): run the packaged smoke suite on Windows
waleedlatif1 Oct 31, 2026
87cd48d
fix(desktop): validate Windows paths lexically before touching the fi…
waleedlatif1 Oct 31, 2026
57fb0f4
ci(desktop): build, sign, and publish the Windows installer
waleedlatif1 Oct 31, 2026
261bf2c
feat(desktop): document Windows packaging, signing, and updates
waleedlatif1 Oct 31, 2026
822f048
fix(desktop): keep the committed bridge contract snapshot
waleedlatif1 Oct 31, 2026
bafbdae
fix(desktop): close Windows clipboard and file-name gaps in the agent…
waleedlatif1 Oct 31, 2026
92cf233
merge part A
waleedlatif1 Oct 31, 2026
e4c8d87
merge part B
waleedlatif1 Oct 31, 2026
9bb3c50
merge part C
waleedlatif1 Oct 31, 2026
10146e4
fix(desktop): reconcile the Windows parts after merge
waleedlatif1 Oct 31, 2026
6d1af69
test(desktop): run the desktop unit suite on Windows
waleedlatif1 Oct 31, 2026
046a793
fix(desktop): declare per-platform node-pty prebuilds as optional
waleedlatif1 Oct 31, 2026
7563f8b
ci(desktop): let the macOS callers grant the Windows job's OIDC scope
waleedlatif1 Oct 31, 2026
89ad2ea
test(desktop): give the preferences fixture a terminal-capable shell
waleedlatif1 Oct 31, 2026
bb5a1bb
docs(desktop): keep the install step's existing anchor
waleedlatif1 Oct 31, 2026
9f5991e
fix(desktop): address review on Windows gating, prereleases, and renames
waleedlatif1 Oct 31, 2026
b5a2e83
feat(desktop): ship the native local-file tools on Windows
waleedlatif1 Oct 31, 2026
420e9fc
merge Windows native file tools
waleedlatif1 Oct 31, 2026
5a87b83
feat(terminal-protocol): name Windows programs and carry each termina…
waleedlatif1 Oct 31, 2026
2e39dfe
feat(desktop): run and instrument Windows shells in the agent terminal
waleedlatif1 Oct 31, 2026
e5e376a
feat(desktop): stop a Windows terminal command by its process tree
waleedlatif1 Oct 31, 2026
386a0cd
feat(desktop): keep tmux off on Windows
waleedlatif1 Oct 31, 2026
4b6b17b
feat(desktop): ship the agent terminal on Windows
waleedlatif1 Oct 31, 2026
99d67bb
feat(desktop): send Mothership the desktop's platform and each termin…
waleedlatif1 Oct 31, 2026
ba0fbe6
docs(desktop): document the agent terminal on Windows
waleedlatif1 Oct 31, 2026
55c723b
merge Windows agent terminal
waleedlatif1 Oct 31, 2026
6fe2b11
docs(desktop): list local file tools as available on Windows
waleedlatif1 Oct 31, 2026
1f21b02
chore(mothership): sync the desktop platform and terminal shell proto…
waleedlatif1 Oct 31, 2026
954229b
refactor(desktop): drop the terminal and local-file platform gates
waleedlatif1 Oct 31, 2026
c39ccf1
fix(desktop): keep a stopped or silent terminal command from reading …
waleedlatif1 Oct 31, 2026
7c2a4a5
fix(desktop): give Git Bash its MSYS environment and Windows cwd
waleedlatif1 Oct 31, 2026
ee2aca9
feat(desktop): name a Windows program in the close-running-terminal d…
waleedlatif1 Oct 31, 2026
9c8306a
fix(desktop): run Windows terminals on the bundled ConPTY, which keep…
waleedlatif1 Oct 31, 2026
40841c9
test(desktop): keep skipping the unwritable-directory test on Windows
waleedlatif1 Oct 31, 2026
3bb88d5
fix(desktop): answer the bundled ConPTY's startup query so Windows sh…
waleedlatif1 Oct 31, 2026
9e66d97
perf(desktop): interrupt a stopped command before reading its processes
waleedlatif1 Oct 31, 2026
9dec590
perf(desktop): run Git Bash's cygpath only when the directory changes
waleedlatif1 Oct 31, 2026
6f95c59
refactor(desktop): keep node-pty's platform differences in terminal/pty
waleedlatif1 Oct 31, 2026
7fc52bf
refactor(desktop): name shell programs with terminal-protocol's progr…
waleedlatif1 Oct 31, 2026
c7a5094
refactor(desktop): read tmux support from the platform feature table
waleedlatif1 Oct 31, 2026
ff5f251
refactor(desktop): declare each IPC channel's platform feature on its…
waleedlatif1 Oct 31, 2026
2d22635
refactor(desktop): drop copyCredential's repeat of the passwordCopy gate
waleedlatif1 Oct 31, 2026
4a97d8d
refactor(desktop): restore a minimized window inside bringWindowToFront
waleedlatif1 Oct 31, 2026
2d95608
refactor(desktop): drop stagedFileName's unused platform parameter
waleedlatif1 Oct 31, 2026
ae793eb
refactor(desktop): derive win32-path's global name pattern from the s…
waleedlatif1 Oct 31, 2026
4a04693
refactor(desktop): share file identity and entry kinds across the loc…
waleedlatif1 Oct 31, 2026
19081e6
perf(desktop): classify a Windows listing's reparse points sixteen at…
waleedlatif1 Oct 31, 2026
39d8677
refactor(desktop): name the desktop platforms once in desktop-bridge
waleedlatif1 Oct 31, 2026
7d3c850
refactor(desktop): name each platform's update artifacts once in desk…
waleedlatif1 Oct 31, 2026
7efa552
refactor(desktop): read every channel's identity from one shared table
waleedlatif1 Oct 31, 2026
0a02a0e
refactor(desktop): split the application menu into shared items and p…
waleedlatif1 Oct 31, 2026
77b04be
refactor(desktop): share the update routes' error responses and drop …
waleedlatif1 Oct 31, 2026
0e142ce
perf(desktop): hand the Windows tray icon's scales over as PNG buffers
waleedlatif1 Oct 31, 2026
db4837a
refactor(desktop): upload the Windows release artifacts in one ordere…
waleedlatif1 Oct 31, 2026
40c054e
refactor(desktop): keep pty options and file type info private to the…
waleedlatif1 Oct 31, 2026
4352ba7
test(desktop): satisfy the test-pattern and unused-export audits
waleedlatif1 Oct 31, 2026
ad4ec17
test(desktop): leave the Chromium profile readers out of the Windows …
waleedlatif1 Oct 31, 2026
43c5e5c
fix(desktop): stop only the stopped command's processes on Windows
waleedlatif1 Oct 31, 2026
fb3414f
fix(desktop): answer ConPTY's startup query when it arrives split acr…
waleedlatif1 Oct 31, 2026
be091d0
fix(terminal-protocol): read each Windows shell's own escape and quoting
waleedlatif1 Oct 31, 2026
4e03097
docs(desktop): name the platform feature table's actual readers
waleedlatif1 Oct 31, 2026
3680790
fix(desktop): find a Windows command behind a shell launcher
waleedlatif1 Oct 31, 2026
9fa4316
fix(desktop): type the agent's next command only once the prompt is d…
waleedlatif1 Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(desktop): build a Windows File/Edit/View/Help menu
The macOS app-menu shape (hide/hideOthers/unhide, a windowMenu whose Close
item takes Ctrl+W off macOS) is wrong on Windows. Build a Windows template
with the same items and accelerators, Exit via role quit, and hidden
Alt+Left/Alt+Right for history. The macOS template is unchanged.
  • Loading branch information
waleedlatif1 committed Oct 31, 2026
commit b8dfb41aeff2c1c6795f0facc891629ef5e9443f
59 changes: 49 additions & 10 deletions apps/desktop/src/main/menu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { MenuItemConstructorOptions } from 'electron'
import type { ConfigStore } from '@/main/config'
import { buildMenuTemplate, type MenuDeps } from '@/main/menu'

function makeDeps(origin = 'https://sim.ai'): MenuDeps {
function makeDeps(platform: NodeJS.Platform = 'darwin', origin = 'https://sim.ai'): MenuDeps {
return {
config: {
filePath: '/tmp/settings.json',
Expand All @@ -29,20 +29,59 @@ function makeDeps(origin = 'https://sim.ai'): MenuDeps {
signOut: vi.fn(),
checkForUpdates: vi.fn(),
openDiagnostics: vi.fn(),
platform,
}
}

function submenu(
template: MenuItemConstructorOptions[],
label: string
): MenuItemConstructorOptions[] {
return (template.find((item) => item.label === label || item.role === label.toLowerCase())
?.submenu ?? []) as MenuItemConstructorOptions[]
/** Every item at any depth, so hidden resource items count too. */
function flatten(items: MenuItemConstructorOptions[]): MenuItemConstructorOptions[] {
return items.flatMap((item) => [
item,
...(Array.isArray(item.submenu) ? flatten(item.submenu as MenuItemConstructorOptions[]) : []),
])
}

function accelerators(template: MenuItemConstructorOptions[]): Set<string> {
return new Set(
flatten(template).flatMap((item) =>
typeof item.accelerator === 'string' ? [item.accelerator] : []
)
)
}

describe('buildMenuTemplate', () => {
it('never exposes developer tools in the application menu', () => {
const view = submenu(buildMenuTemplate(makeDeps()), 'View')
expect(view.some((item) => item.role === 'toggleDevTools')).toBe(false)
it.each(['darwin', 'win32'] as const)('never exposes developer tools on %s', (platform) => {
const items = flatten(buildMenuTemplate(makeDeps(platform)))
expect(items.some((item) => item.role === 'toggleDevTools')).toBe(false)
})

it('keeps every macOS shortcut working on Windows', () => {
const windows = accelerators(buildMenuTemplate(makeDeps('win32')))
for (const accelerator of accelerators(buildMenuTemplate(makeDeps('darwin')))) {
expect(windows).toContain(accelerator)
}
expect(windows).toContain('Alt+Left')
expect(windows).toContain('Alt+Right')
})

it('builds the Windows menu without macOS-only app roles', () => {
// windowMenu is excluded too: off macOS it adds a Close item on Ctrl+W
// that would steal the hidden Close Tab accelerator.
const roles = flatten(buildMenuTemplate(makeDeps('win32'))).map((item) => item.role)
for (const role of ['hide', 'hideOthers', 'unhide', 'services', 'windowMenu', 'appMenu']) {
expect(roles).not.toContain(role)
}
expect(roles).toContain('editMenu')
expect(roles).toContain('quit')
})

it('binds each Windows accelerator to exactly one item', () => {
const counts = new Map<string, number>()
for (const item of flatten(buildMenuTemplate(makeDeps('win32')))) {
if (typeof item.accelerator === 'string') {
counts.set(item.accelerator, (counts.get(item.accelerator) ?? 0) + 1)
}
}
expect([...counts].filter(([, count]) => count > 1)).toEqual([])
})
})
Loading