Skip to content
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

Consider TerminalLinkProvider contributions recursively #15177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xpomul
Copy link
Contributor

@xpomul xpomul commented Mar 12, 2025

What it does

Fixes #15050 by considering the TerminalLinkProvider contributions also recursively (i.e., consider TerminalLinkProvider contributions bound in the root container).

For a thorough analysis of the issue see #15050 (comment)

How to test

See #15050 description.
In short:

  • npm run build:browser
  • npm run download:plugins
  • npm run start:browser
  • Start frontend and make sure a folder is opened
  • Command Palette: Terminal: Create new Terminal
  • In the terminal, execute ls -l
  • Try to hover over a file (e.g., package.json)

Without the fix, there is no link provided, with the fix, the link is there and clicking leads to the file being opened in an editor.

Notes:

  1. I am not 100% sure whether this is the correct fix. It could also be a bug that plugin-ext binds the TerminalServiceMainImpl in the child container, not the parent (root) container. So, maybe someone with knowledge in this area should have a second look. (Again, see the linked comment in the issue for details)
  2. I tried to write a unit test but failed because importing the terminal-link-provider from the test results in a phosphor error (ReferenceError: navigator is not defined). So I am not sure how to mock the UI dependencies correctly and I haven't found a similar example/test case in the code base...

Review checklist

Reminder for reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

Terminal File Links Not Working in Theia 1.58.x
1 participant