Skip to content

Migrate GTK event dispatch to ShellApp::handle(UiEvent) #448

Description

@JDonaghy

Summary

Status: parent/tracking issue. The original scope — replace vimcode's Relm4 message dispatch (enum Msg, fn update, handle_key_press) with ShellApp::handle(UiEvent) — is done, landed via phases A/B/C below. This issue now tracks the regression fallout discovered after the flip (sub-issues D–J) until they're all closed.

Milestone: #8 GTK ShellApp Event Dispatch (carved out of #7 Platform-Neutral to keep that milestone from growing unbounded).

What exists in quadraui

  • quadraui::UiEvent — unified event enum (KeyPressed, MouseDown, MouseMove, Scroll, Resize, etc.)
  • GTK shell runner automatically wires GDK event controllers and translates to UiEvent
  • ShellApp::handle(&mut self, event: UiEvent, ctx: ShellContext, backend: &mut dyn Backend) -> Reaction
  • ShellContext — provides active_panel_id, sidebar_visible, zone detection helpers

Original migration (done)

The original scope was too large for a single agent session (mod.rs is 10,485 lines) — a first attempt burned its whole token budget on analysis before writing any code. Split into three sequential phases, each leaving the codebase compiling:

Phase Issue Scope Status
A #538 Extract fn dispatch() from fn update; replace 45 sender.input() calls in impl App — mechanical, no logic changes ✅ closed
B #539 Write dormant impl ShellApp for App — compiles alongside Relm4, not wired up yet ✅ closed
C #540 Flip pub fn run() to ShellApp runner; delete enum Msg, fn init, fn update, Relm4 dep ✅ merged (PR #543) — issue itself pending close

Remaining scope — regressions found after the flip

This issue closes when D, F, G, H, I, J are all closed and #540 is closed out.

Dependencies

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, distribution

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions