Repository navigation
feat(cli): t3 . opens a folder in desktop or a running server #7176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
66a741c
feat(cli): t3 . opens a folder in desktop or a running server
argval b757a32
fix(cli): fall back to server when desktop open stalls
argval bec0fef
fix(cli): do not clear runtime state on the first open probe
argval ecebeb3
Merge branch 'main' into feat/cli-t3-open-directory
argval 904ad82
fix(cli): discover live open targets like t3 pair
argval e9a31ce
fix(cli): do not treat live open failures as soft misses
argval e0059e8
fix(cli): soft-miss transient open dispatch; Effect-back desktop launch
argval a6ee964
fix(cli): discover Linux desktop entries; use catchTags for open misses
argval File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| import * as NodePath from "node:path"; | ||
|
|
||
| import { assert, it } from "@effect/vitest"; | ||
|
|
||
| import { | ||
| DESKTOP_APP_NAMES, | ||
| isT3LinuxDesktopEntry, | ||
| linuxDesktopEntryLaunchIds, | ||
| windowsDesktopExecutableCandidates, | ||
| } from "./desktopLaunch.ts"; | ||
|
|
||
| it("lists stable and nightly desktop app names", () => { | ||
| assert.include(DESKTOP_APP_NAMES as ReadonlyArray<string>, "T3 Code (Alpha)"); | ||
| assert.include(DESKTOP_APP_NAMES as ReadonlyArray<string>, "T3 Code (Nightly)"); | ||
| }); | ||
|
|
||
| it("resolves common Windows install paths under Local AppData", () => { | ||
| const localAppData = "/Users/test/AppData/Local"; | ||
| const candidates = windowsDesktopExecutableCandidates(localAppData); | ||
| assert.include( | ||
| candidates, | ||
| NodePath.join(localAppData, "Programs", "t3-code", "T3 Code (Alpha).exe"), | ||
| ); | ||
| assert.include( | ||
| candidates, | ||
| NodePath.join(localAppData, "Programs", "T3 Code (Nightly)", "T3 Code (Nightly).exe"), | ||
| ); | ||
| }); | ||
|
|
||
| it("recognizes AppImage-minted Linux desktop entries for gtk-launch", () => { | ||
| assert.isTrue( | ||
| isT3LinuxDesktopEntry(`[Desktop Entry] | ||
| Name=T3 Code (Alpha) | ||
| Exec=/home/user/T3-Code-Alpha.AppImage %U | ||
| Type=Application | ||
| `), | ||
| ); | ||
| assert.deepEqual( | ||
| linuxDesktopEntryLaunchIds([ | ||
| { | ||
| fileName: "appimagekit_7f3a-T3_Code_Alpha.desktop", | ||
| contents: `[Desktop Entry] | ||
| Name=T3 Code (Alpha) | ||
| Exec=/tmp/T3-Code-Alpha.AppImage | ||
| `, | ||
| }, | ||
| { | ||
| fileName: "firefox.desktop", | ||
| contents: `[Desktop Entry] | ||
| Name=Firefox | ||
| Exec=firefox | ||
| `, | ||
| }, | ||
| { | ||
| fileName: "com.t3tools.t3code.desktop", | ||
| contents: `[Desktop Entry] | ||
| Name=T3 Code | ||
| StartupWMClass=com.t3tools.t3code | ||
| `, | ||
| }, | ||
| ]), | ||
| ["appimagekit_7f3a-T3_Code_Alpha", "com.t3tools.t3code"], | ||
| ); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.