feat: add termy terminal#2116
Conversation
Greptile SummaryThis PR adds Termy (termy.sh) as a supported "open in" terminal app, registering it across macOS, Windows, and Linux via URL scheme (
Confidence Score: 3/5The launch path for Termy falls back to an error rather than the openCommands fallbacks whenever the termy:// URL scheme is absent. The openCommands entries across all three platforms appear to be intentional fallbacks for when the URL scheme is not registered, but openInLocal never reaches them — it throws instead. A user with Termy installed via CLI but without the URL scheme handler registered will get an error on every platform. src/shared/openInApps.ts — the Termy platform configs need the openCommands entries either removed (if the URL scheme is always guaranteed) or the openUrls entries removed so the commands-based path is used.
|
| Filename | Overview |
|---|---|
| src/shared/openInApps.ts | Adds Termy terminal app entry; openCommands are unreachable dead code on all three platforms because openInLocal exclusively uses openUrls when that field is present, with no fallback to commands. |
| src/assets/images/termy.png | New icon asset for the Termy terminal app; no issues found. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[openIn called with app=termy] --> B[openInLocal]
B --> C{platformConfig.openUrls defined?}
C -->|Yes - all 3 platforms| D[Try termy://new?dir=path_url]
D -->|shell.openExternal succeeds| E[✅ Termy opens in correct dir]
D -->|shell.openExternal throws| F[❌ Throw: URI scheme not registered]
F --> G[openCommands never reached]
C -->|No| H[Try openCommands with cwd=target]
style G fill:#f99,stroke:#c00
style F fill:#f99,stroke:#c00
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
src/shared/openInApps.ts:288-310
**`openCommands` are unreachable dead code on all three platforms**
`openInLocal` in `service.ts` checks `if (platformConfig?.openUrls)` first and, when that array is present, iterates through every URL then either returns or throws — it never falls through to `openCommands` (lines 337–352 of `service.ts`). Because Termy's darwin, win32, and linux configs all define `openUrls`, the `openCommands` entries will never execute. No other app in the registry mixes both fields for the same platform; warp (the closest analogue) defines only `openUrls` on darwin.
In practice this means: if the `termy://` URL scheme is not registered on a user's machine (e.g. the CLI is installed but the URL handler isn't), the launch attempt will throw `"Termy is not installed or its URI scheme is not registered on this platform."` with no fallback — even though `openCommands` entries exist and appear to handle that case.
Reviews (1): Last reviewed commit: "Add Termy open-in integration" | Re-trigger Greptile
|
doing it like ghostty does it now (lasse fixed that in termy directly :D) |
arnestrickmann
left a comment
There was a problem hiding this comment.
Lasse will be happy
termy.sh