Skip to content

fix(web): show text input for adding projects on Linux desktop#1075

Open
eggfriedrice24 wants to merge 2 commits intopingdotgg:mainfrom
eggfriedrice24:feat/linux-manual-project-path
Open

fix(web): show text input for adding projects on Linux desktop#1075
eggfriedrice24 wants to merge 2 commits intopingdotgg:mainfrom
eggfriedrice24:feat/linux-manual-project-path

Conversation

@eggfriedrice24
Copy link
Contributor

@eggfriedrice24 eggfriedrice24 commented Mar 14, 2026

Summary

On Linux/Wayland, the GTK file picker is broken for folder selection in Electron apps, completely blocking adding projects. This shows the web-style text input on Linux desktop instead of immediately opening the native file picker.

Closes #966
Closes #270

Changes

  • Skip the immediate file picker open on Linux desktop (isElectron && /linux/i.test(navigator.platform))
  • Linux users now see the path text input with an Add button (same UX as web mode)
  • Mac/Windows behavior is unchanged

Test plan

  • On Linux desktop: clicking "+" shows text input instead of opening file picker
  • On Mac/Windows desktop: clicking "+" still opens native file picker immediately
  • On web: behavior unchanged
  • Typing a path and pressing Enter adds the project

Note

Show text input for adding projects on Linux desktop in Sidebar

On Linux Electron, the native file browser dialog cannot be used to add projects, so the text input path entry is shown instead. Adds isLinuxPlatform to utils.ts and uses it in Sidebar.tsx to set shouldBrowseForProjectImmediately to false on Linux Electron.

Macroscope summarized 9757ff5.

image

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

Important

Review skipped

Auto reviews are disabled on this repository. 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 870fc8f7-e9a7-457e-9693-ea4ec40fa73c

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
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 14, 2026
@eggfriedrice24
Copy link
Contributor Author

@juliusmarminge sorry for tagging I know you are busy but can you take a look at this? One line change, closes 2 issues and helps linux users, thanks...

const removeFromSelection = useThreadSelectionStore((s) => s.removeFromSelection);
const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor);
const shouldBrowseForProjectImmediately = isElectron;
const isLinuxDesktop = isElectron && /linux/i.test(navigator.platform);
Copy link
Member

Choose a reason for hiding this comment

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

extract Linux matcher to helper. We already have for Windows and Mac

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks!

@eggfriedrice24 eggfriedrice24 force-pushed the feat/linux-manual-project-path branch from 7a794ef to 9757ff5 Compare March 18, 2026 01:58
@eggfriedrice24
Copy link
Contributor Author

rebased on latest main, ready for another look

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: allow manual directory path entry when adding projects Stuck on "Picking folder..." and "Adding..." when selecting project

3 participants