fix(web): show text input for adding projects on Linux desktop#1075
fix(web): show text input for adding projects on Linux desktop#1075eggfriedrice24 wants to merge 2 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip Migrating from UI to YAML configuration.Use the |
|
@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... |
apps/web/src/components/Sidebar.tsx
Outdated
| const removeFromSelection = useThreadSelectionStore((s) => s.removeFromSelection); | ||
| const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor); | ||
| const shouldBrowseForProjectImmediately = isElectron; | ||
| const isLinuxDesktop = isElectron && /linux/i.test(navigator.platform); |
There was a problem hiding this comment.
extract Linux matcher to helper. We already have for Windows and Mac
There was a problem hiding this comment.
Done, thanks!
7a794ef to
9757ff5
Compare
|
rebased on latest main, ready for another look |
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
isElectron && /linux/i.test(navigator.platform))Test plan
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
isLinuxPlatformto utils.ts and uses it in Sidebar.tsx to setshouldBrowseForProjectImmediatelytofalseon Linux Electron.Macroscope summarized 9757ff5.