Editor: native folder picker for New/Open Project

Stage-10 editor-UX follow-up ("typing the path by hand is very hard to
use"). Both project dialogs gain a Browse… button that opens the native
folder picker via rfd's xdg-portal backend — pure Rust, one build works
on Wayland and X11 through xdg-desktop-portal. The dialog runs on a
helper thread reporting over an mpsc channel (polled once per frame in
Shell::build), so the editor keeps rendering while the picker is up;
one pick at a time, and the typed path field remains as a fallback for
portal-less environments.

GUI piece — needs an eye-check (on both Wayland and Xorg) before
promotion to main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Homer
2026-07-10 20:47:12 +02:00
parent d08bee1361
commit 48003ffea4
5 changed files with 132 additions and 7 deletions
+11
View File
@@ -58,6 +58,17 @@ The typed settings framework serializes its sections to and from these strings,
so a section round-trips through the project file without this module knowing the
section's shape.
## The editor's New / Open dialogs
The editor's **File ▸ New Project… / Open Project…** dialogs wrap
`Project::create`/`Project::open`. Each path field has a **Browse…** button
opening the **native folder picker** (`rfd` with the `xdg-portal` backend — one
pure-Rust build serves both Wayland and X11 through `xdg-desktop-portal`). The
dialog runs on a helper thread so the editor keeps rendering while it is up;
the picked folder lands back in the field, which stays hand-editable — if no
portal service is running the picker simply doesn't appear and the typed path
still works.
## Recent projects
`RecentProjects` is a small most-recently-used list, persisted globally as an