Skip to content

fix(tui): open file links in the default application - #57295

Closed
maharshi365 wants to merge 2 commits into
anomalyco:devfrom
maharshi365:v2
Closed

maharshi365 wants to merge 2 commits into
anomalyco:devfrom
maharshi365:v2

Conversation

@maharshi365

@maharshi365 maharshi365 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Related to #57288 and #54816.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Route explicit file:// links in the TUI through the built-in openPath helper so they open in the system default application. Convert the file URL to a native path with fileURLToPath first.

Both transcript link clicks and the Link component use this dispatcher. HTTP/HTTPS links still use openUrl, with its existing validation unchanged.

This is limited to explicit file:// links. Bare absolute or relative file paths, such as the example in #54816, are not handled by this change. No new launcher dependency or configuration is added.

How did you verify your code works?

  • bun test test/ui/open-link.test.ts from packages/tui: passed.
  • bun run check from the repository root: passed with lint warnings.
  • Regression coverage checks file links (including spaces), HTTP/HTTPS links, and rejected inputs using an isolated launcher mock.

Screenshots / recordings

Recording.2026-10-20.011113.mp4

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Route explicit file URLs through the existing path launcher while preserving web URL handling. Use the shared dispatcher for markdown clicks and Link components.

Add isolated regression coverage for local files, web URLs, and rejected inputs.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot closed this Oct 20, 2026
@opencode-agent

Copy link
Copy Markdown
Contributor

Thanks for picking this up, @maharshi365! I think this duplicates #55769, which is still open (it replaced the closed #54838 for #54816). It changes the same two places, the transcript link click in app.tsx and the Link component, so that local file:// links open with the system default app. It also handles absolute and Windows drive paths.

If your file:// use case from #57288 (images and videos) is missing something there, testing #55769 and commenting or reviewing on it would be the best way to help.

@maharshi365
maharshi365 deleted the v2 branch October 20, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant