Skip to content

linux: drop macos dialog message and allow creating folders - #3139

Open
thedhruvhegde wants to merge 1 commit into
generalaction:mainfrom
thedhruvhegde:fix/linux-directory-dialog
Open

linux: drop macos dialog message and allow creating folders#3139
thedhruvhegde wants to merge 1 commit into
generalaction:mainfrom
thedhruvhegde:fix/linux-directory-dialog

Conversation

@thedhruvhegde

@thedhruvhegde thedhruvhegde commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

summary

electron on linux does not support message on showOpenDialog, so the directory picker could fail or look broken. createDirectory was also false, so you could not make a new folder from the picker.

message stays on darwin. linux/win get createDirectory: true without that option.

closes #2336

test plan

  • linux: add workspace / pick directory and confirm the dialog opens
  • linux: create a folder from the picker
  • macos: still shows the extra message on the directory dialog

@greptile-apps

greptile-apps Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes native open-dialog options platform-specific for directory and audio-file selection.

  • Retains caller-provided dialog messages on macOS while omitting the unsupported option elsewhere.
  • Attempts to enable directory creation on Linux and Windows, but applies a macOS-only Electron option to those platforms.

Confidence Score: 4/5

The PR should not merge until the directory-creation implementation is corrected because the targeted Linux workflow remains unfixed.

The message handling matches Electron's platform contract, but the new createDirectory branch is inverted relative to that contract and therefore cannot deliver the stated behavior.

Files Needing Attention: apps/emdash-desktop/src/main/core/app/service.ts

Important Files Changed

Filename Overview
apps/emdash-desktop/src/main/core/app/service.ts Introduces platform-specific dialog options, with createDirectory guarded for the platforms where Electron does not support it.
Prompt To Fix All With AI
### Issue 1
apps/emdash-desktop/src/main/core/app/service.ts:609-612
**Unsupported folder creation option**

Electron's `createDirectory` option is macOS-only, but this branch adds it only on Linux and Windows, where it is ignored, and omits it on macOS, where it is supported. As a result, the directory picker still cannot create folders in the targeted Linux flow, so the reported bug remains unresolved.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "stop passing macos-only dialog message o..." | Re-trigger Greptile

Comment on lines +609 to +612
properties:
process.platform === 'darwin'
? ['openDirectory']
: ['openDirectory', 'createDirectory'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Unsupported folder creation option

Electron's createDirectory option is macOS-only, but this branch adds it only on Linux and Windows, where it is ignored, and omits it on macOS, where it is supported. As a result, the directory picker still cannot create folders in the targeted Linux flow, so the reported bug remains unresolved.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/emdash-desktop/src/main/core/app/service.ts
Line: 609-612

Comment:
**Unsupported folder creation option**

Electron's `createDirectory` option is macOS-only, but this branch adds it only on Linux and Windows, where it is ignored, and omits it on macOS, where it is supported. As a result, the directory picker still cannot create folders in the targeted Linux flow, so the reported bug remains unresolved.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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.

[bug]: crashes on linux when adding a new project from directory after fresh install

1 participant