Summary
Route vimcode's remaining direct gtk4::FileDialog usage through
quadraui's PlatformServices trait instead of constructing GTK dialogs
in-line. This is Stage G from the wave plan in #493 — split out as its
own narrowly-scoped issue after #493 was closed as superseded (its core
ask, collapsing 14 DrawingAreas to 1 and stripping Relm4, already shipped
via #447/#448).
Current state
Three call sites in src/gtk/mod.rs build gtk4::FileDialog directly and
drive its async callback API:
src/gtk/mod.rs:7319-7337 — Msg::OpenFileDialog
src/gtk/mod.rs:7338-7355 — Msg::OpenFolderDialog
src/gtk/mod.rs:7362-7376 — Msg::SaveWorkspaceAsDialog
This is exactly the kind of per-backend platform code the
Platform-Neutrality Rule flags — it's GTK-only, has no TUI equivalent, and
belongs behind the shared PlatformServices seam instead.
Blocked on
quadraui#427 — GtkPlatformServices::show_file_open_dialog /
show_file_save_dialog are currently hard stubs returning None
(quadraui/src/gtk/services.rs:40-46). GTK4's FileDialog API is
async-only, which is why this was never filled in — see quadraui#427 for
the full analysis and proposed nested-mainloop adapter. This vimcode issue
can't land until that ships.
Acceptance
- All three call sites above go through
PlatformServices::show_file_open_dialog() /
show_file_save_dialog() (via whatever engine/backend accessor
ShellApp/Backend already expose for services) instead of constructing
gtk4::FileDialog directly.
- Zero direct
gtk4::FileDialog (or other native file-chooser) references
remain anywhere in src/gtk/.
- TUI backend unaffected (it already returns
None from the stub path per
the trait doc comment, and provides its own in-TUI picker).
Related
Summary
Route vimcode's remaining direct
gtk4::FileDialogusage throughquadraui's
PlatformServicestrait instead of constructing GTK dialogsin-line. This is Stage G from the wave plan in #493 — split out as its
own narrowly-scoped issue after #493 was closed as superseded (its core
ask, collapsing 14 DrawingAreas to 1 and stripping Relm4, already shipped
via #447/#448).
Current state
Three call sites in
src/gtk/mod.rsbuildgtk4::FileDialogdirectly anddrive its async callback API:
src/gtk/mod.rs:7319-7337—Msg::OpenFileDialogsrc/gtk/mod.rs:7338-7355—Msg::OpenFolderDialogsrc/gtk/mod.rs:7362-7376—Msg::SaveWorkspaceAsDialogThis is exactly the kind of per-backend platform code the
Platform-Neutrality Rule flags — it's GTK-only, has no TUI equivalent, and
belongs behind the shared
PlatformServicesseam instead.Blocked on
quadraui#427 —
GtkPlatformServices::show_file_open_dialog/show_file_save_dialogare currently hard stubs returningNone(
quadraui/src/gtk/services.rs:40-46). GTK4'sFileDialogAPI isasync-only, which is why this was never filled in — see quadraui#427 for
the full analysis and proposed nested-mainloop adapter. This vimcode issue
can't land until that ships.
Acceptance
PlatformServices::show_file_open_dialog()/show_file_save_dialog()(via whatever engine/backend accessorShellApp/Backendalready expose for services) instead of constructinggtk4::FileDialogdirectly.gtk4::FileDialog(or other native file-chooser) referencesremain anywhere in
src/gtk/.Nonefrom the stub path perthe trait doc comment, and provides its own in-TUI picker).
Related
run_with_shellmigration thisissue's prerequisite section referenced.