You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GTK4: perry_ui_open_folder_dialog not wired — blocks docs/examples/ui/dialogs/snippets.ts on Linux CI #216
docs/examples/ui/dialogs/snippets.ts declares // platforms: macos, linux, windows and imports openFolderDialog from perry/ui to demonstrate the folder-picker pattern. The example compiles + links cleanly on macOS but fails on the GTK4-on-Ubuntu doc-tests CI runner with:
/usr/bin/ld: perry_llvm_*.ll:(.text+...): undefined reference to `perry_ui_open_folder_dialog'
Origin/main is currently red on the gtk4 doc-tests gate because of this and two layout FFIs (filed separately).
What's missing
FFI
macOS
GTK4
perry_ui_open_folder_dialog
✅ wired (NSOpenPanel with canChooseDirectories: YES, canChooseFiles: NO)
❌ missing
Recommended GTK4 implementation
gtk::FileChooserDialog with Action::SelectFolder is the direct mapping. Mirror the existing GTK4 file-picker pattern (search crates/perry-ui-gtk4/src/ for FileChooserNative / FileChooserDialog) — fold this in by changing the action to SelectFolder and removing the file-filter setup. The TS callback signature is (path: string) => void; on cancel pass an empty string to match the macOS implementation's contract.
Acceptance
perry_ui_open_folder_dialog exported as #[no_mangle] pub extern "C" fn in crates/perry-ui-gtk4/src/lib.rs.
If a styling-matrix row applies to this FFI (it might not — folder dialog is more "system" than "styling"), flip the GTK4 cell from Missing to Wired.
cargo build --release -p perry-ui-gtk4 succeeds.
After re-running the doc-tests harness, docs/examples/ui/dialogs/snippets.ts compiles + links cleanly on Linux. Verify by inspecting the linker output (the example's runtime test mode exits before opening any modal, so PERRY_UI_TEST_MODE=1 is sufficient).
No regression on the macOS doc-tests gate.
Pointers
macOS implementation: search crates/perry-ui-macos/src/ for perry_ui_open_folder_dialog.
GTK4 file-picker reference (closest existing analogue): search crates/perry-ui-gtk4/src/ for whatever already wires openFileDialog / saveFileDialog. Add the SelectFolder variant alongside.
Failing doc-test: docs/examples/ui/dialogs/snippets.ts (banner declares all 3 platforms; line invokes openFolderDialog).
Activity
fix(ui-gtk4): wire 7 missing FFIs blocking Linux doc-tests gate (v0.5…