Skip to content

Feat/add dolphin file system extension - #412

Open
egalvis27 wants to merge 8 commits into
feat/add-nemo-file-system-extensionfrom
feat/add-dolphin-file-system-extension
Open

Feat/add dolphin file system extension#412
egalvis27 wants to merge 8 commits into
feat/add-nemo-file-system-extensionfrom
feat/add-dolphin-file-system-extension

Conversation

@egalvis27

Copy link
Copy Markdown

Summary

This PR adds Dolphin file manager integration to Internxt Drive on Linux.

What Changed

  • Added a Dolphin service menu entry to expose a new Copy Internxt Link action.
  • Added the Dolphin helper script that:
    • resolves the selected file path
    • calls the local hydration API
    • copies the generated Internxt link to the clipboard
  • Extended the file manager extension installer to detect Dolphin and install the required assets in the correct KDE locations.
  • Added logic to reload Dolphin after installing or updating the extension.
  • Bumped the file manager extension version so existing installations get the new Dolphin assets.
  • Added and updated tests for the file manager extension install and service behavior.

Notes

  • The Dolphin integration is packaged alongside the app.
  • KDE-specific behavior was adjusted so the menu entry shows correctly and the action runs without permission errors.

Validation

  • Focused Vitest coverage for the file manager extension passes.
  • Packaging succeeds with npm run package.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ac956afa-a8b4-427e-a8db-507966be1468

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-dolphin-file-system-extension

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

const destinationExists = await doesFileExist(destination);
if (destinationExists) {
if (asset.executable) {
await fs.chmod(destination, 0o755);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The permissions granted to this script are strictly those necessary for the extension's features to function properly without compromising the security of the user's device.


await fs.cp(source, destination);
if (asset.executable) {
await fs.chmod(destination, 0o755);
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
Actions=InternxtCopyLink;
X-KDE-Submenu=Internxt Drive
X-KDE-Priority=TopLevel

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Dolphin, new options must be configured using a new .desktop file that directly modifies the system settings.

print("")
sys.exit(0)

relative_path = file_path[len(root_folder):]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality to generate the share link is still present in the app's code and can be accessed through the hydration API. This made it easy for us to create this script, which calls the corresponding endpoint and saves the link to the clipboard.

Since the extension's settings are managed directly through the system settings, it was necessary for the actions to be executed through this script.

@@ -1 +1 @@
export const LATEST_EXTENSION_VERSION = 3;
export const LATEST_EXTENSION_VERSION = 4;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to the extension's version number is intended to force its reinstallation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then add a clarifying comment in the code explaining what you deem its necesary

Comment thread package.json
},
"deb": {
"depends": [
"recommends": [

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installation of this add-on has been changed to “recommended” because in distributions such as Kubuntu that use KDE, this library is not available by default and prevents the application from being installed.

fileManager: [nautilus, nemo, dolphin]

container:
image: ubuntu:24.04

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use either the newest lts or the oldest active, what do you think? (22.04)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

const execAsync = promisify(exec);

export type FileManagerType = 'nautilus' | 'nemo' | null;
export type FileManagerType = 'nautilus' | 'nemo' | 'dolphin' | null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt SupportedFileManager basically this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I replaced it

{ type: 'nautilus', desktopEntry: 'nautilus.desktop', hasBinary: hasNautilusBinary },
];

export async function detectAvailableFileManager(): Promise<FileManagerType> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are making FileManagerType to have null just because this function is returning null and then
type FileManagerCandidate = { type: Exclude<FileManagerType, null>;
Why not rather make this function return FileManagerType | null?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines +49 to +52
export async function isDolphinAvailable(): Promise<boolean> {
return (await detectAvailableFileManager()) === 'dolphin';
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this used for? I see it has no usage

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had added them to generate alerts like the one generated by Nautilus, but now that I think about it, the alert should say that there is no extension available.

return (await detectAvailableFileManager()) === 'dolphin';
}

async function getDefaultDirectoryDesktopEntry(): Promise<string> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make this method directly pass the type of desktop rather than a string??

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature has been removed

Comment on lines +11 to +14
const nautilusExtensionFileName = 'internxt-virtual-drive.py';
const nemoExtensionFileName = 'internxt-virtual-drive.py';
const dolphinMenuFileName = 'internxt-virtual-drive.desktop';
const dolphinHelperFileName = 'internxt-dolphin-actions.sh';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ina consttants files

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if (destinationExists) {
if (asset.executable) {
await fs.chmod(destination, 0o755);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the sonar issues because both sonar and gh are screaming

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The permissions granted to this script are strictly those necessary for the extension's features to function properly without compromising the security of the user's device.

await fs.cp(source, destination);
if (asset.executable) {
await fs.chmod(destination, 0o755);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review last comment

@@ -1 +1 @@
export const LATEST_EXTENSION_VERSION = 3;
export const LATEST_EXTENSION_VERSION = 4;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then add a clarifying comment in the code explaining what you deem its necesary

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
51.1% Coverage on New Code (required ≥ 80%)
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants