feat(web): open HTML files in the browser from the files context menu #9533
Closedmrmg(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/9533/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/web/src/components/files/FilePreviewPanel.tsx line 841OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -844,14 +835,7 @@844- });845- if (result._tag === "Success" || isAtomCommandInterrupted(result)) {846- return;847- }848- const error = squashAtomCommandFailure(result);849- toastManager.add(850- stackedThreadToast({851- type: "error",852- title: "Unable to open file in browser",853- description: error instanceof Error ? error.message : "An error occurred.",854- }),855- );856- })();857- }, [absolutePath, createAssetUrl, environmentHttpBaseUrl, openPreview, threadRef]);835+ const handleOpenInBrowser = useCallback(836+ (filePath: string) => {837+ if (!environmentHttpBaseUrl) return;838+ void (async () => {839+ const result = await openFileInPreview({840+ threadRef,841+ filePath: resolvePathLinkTarget(filePath, cwd),
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed