Skip to content

GTK: route gtk4::FileDialog calls through PlatformServices (Stage G of #493) #572

Description

@JDonaghy

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-7337Msg::OpenFileDialog
  • src/gtk/mod.rs:7338-7355Msg::OpenFolderDialog
  • src/gtk/mod.rs:7362-7376Msg::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#427GtkPlatformServices::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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    coordTracked by coord-tui pipelineenhancementNew feature or requestinfrastructureBuild, CI, distributionstatus:readyRefined and ready to enter the work pipeline

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions