Skip to content

Migrate GTK widget tree to quadraui AppShell + run_with_shell() #447

Description

@JDonaghy

Summary

Replace vimcode's hand-built GTK widget tree — struct App (~456 lines of widget refs), fn init (~2,122 lines of widget creation), and the view macro (~814 lines) — with quadraui::gtk::run_with_shell(). The AppShell creates the standard editor layout (title bar, activity bar, sidebar revealer, editor DA, bottom panel, status bar, command line) from a config struct.

What exists in quadraui

  • quadraui::compose::AppShell — widget tree builder with dynamic panel registration (add_panel, remove_panel)
  • quadraui::shell::ShellApp trait — apps implement setup(), render_content(), handle()
  • quadraui::gtk::shell_runner::run_with_shell() — wraps ShellApp in AppShell, drives GTK event loop
  • ShellConfig — declares panels, sidebar width, activity bar items

What to do

  1. Implement ShellApp for vimcode's GTK entry point
  2. Build a ShellConfig describing vimcode's panels (Explorer, Search, Git, Debug, Extensions, AI)
  3. Replace fn init + view macro with run_with_shell(config, app)
  4. Delete struct App widget refs (replaced by AppShell-owned handles)
  5. Keep platform services wiring (clipboard via setup_gtk_clipboard(), file dialogs)

Files

  • src/gtk/mod.rs — bulk of the deletion (~3,392 lines from init/view/App struct)
  • Possibly new src/gtk/app.rs for the ShellApp impl

Dependencies

Notes

This is issue 2 of 4 in the GTK AppShell consumption series. Depends on #446.

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions