GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — feat(desktop): open in Windows Terminal and list only installed apps on Windows by Hona · Pull Request #65320 · anomalyco/opencode Conversation
|
| Apps present | Before | After |
|---|---|---|
| VS Code, PowerShell and Windows Terminal | ![]() |
![]() |
| VS Code only | ![]() |
![]() |
Before, every app is listed whether it is installed or not, and Windows Terminal is missing. After, the menu lists File Explorer plus the apps that are found, Windows Terminal included.
No linked issue. Ported from the native Rune desktop build (anomalyco/rune-desktop, features/open-in/src/windows.rs).
Two changes to the file panel's Open in menu on Windows.
Windows Terminal is listed. It opens a new Windows Terminal window in the file's folder (wt -w new -d ., with the folder as the working directory), never a tab in a window the user already has open. The folder is never put on wt's command line, because Windows Terminal splits its arguments on ; even inside quotes, so a repository named a;b would start a second command. The entry has its own drawn mark (windows-terminal.svg) and the English label Windows Terminal; other locales fall back to it until translated.
Only installed apps are listed. checkAppExists answered true for every app on Windows, so VS Code, Cursor, Zed and Sublime Text showed up on machines without them, and picking one failed. It now asks resolveAppPath, which runs the where lookup it already had, and when where finds nothing it also looks in the folder each installer uses (for example %LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe, %ProgramFiles%\Sublime Text\sublime_text.exe, or Windows Terminal's Store alias in %LOCALAPPDATA%\Microsoft\WindowsApps). An app found that way also opens, since openPath resolves the same path.
PowerShell 7 gets no entry of its own: the existing PowerShell entry already opens pwsh when it is installed.
macOS and Linux are unchanged: the Windows Terminal entry is only in WINDOWS_OPEN_APPS, and the new launch and detection code runs only when process.platform === "win32". In app-icon.tsx, typeof document !== "object" became !("document" in globalThis) (same result) because the file was touched and lint:changed flags the old check.
bun test src/main/files/apps.test.ts on Windows, with an empty PATH and scratch LOCALAPPDATA and ProgramFiles: Windows Terminal's alias is found in its installer's folder, and Sublime Text and VS Code are reported missing. On dev the same test fails, because every app reads as installed. It is skipped off Windows.bun run typecheck:tsc in packages/desktop, bun typecheck in packages/gui-plugins and packages/ui, bun run lint:changed origin/dev clean.Added by the opencode bot (AI-generated).
Related: #61678
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I couldn't verify this: everything new only runs on Windows, and my sandbox is Linux. The new test is skipped here. typecheck:tsc passes in packages/desktop, packages/gui-plugins and packages/ui.
Reading the code, the change looks sound:
resolveAppPath, so an app found in its installer's folder also opens.pwsh to powershell.wt's command line.The new menu entry and the always-true → real check on Windows still need a run in the built app. A screenshot of the menu on a Windows machine would help.
Public API: unchanged. The new windows-terminal icon name and the open.app.windowsTerminal key are internal to the desktop UI.
Related: #61678
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The only new commit merges dev. This PR's own diff is identical to the version I reviewed, and none of the merged changes touch the files this PR changes. typecheck:tsc in packages/desktop still passes. I still couldn't run the Windows-only behaviour here. A screenshot of the menu on Windows would still help.
Public API: unchanged.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.