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
Both TUI and GTK at 100% on quadraui::Backend. After B.5c, every primitive that has runtime usage either has a trait method that's used end-to-end, OR has a documented reason for not (e.g. backend-specific UX that genuinely doesn't fit the cross-backend contract). The runner crates (B.5e) depend on this being clean.
Context
B.5b shipped the GTK runtime migration (closed at #249 after 13 stages on develop), but uncovered concrete trait-coverage gaps that aren't bugs — they're architectural:
Trait methods that return () but call sites need hit-region info.Backend::draw_status_bar returns (); call sites in both backends use Vec<StatusBarHitRegion> from the legacy direct shims. Same for draw_tab_bar (returns TabBarHits). Fix: redesign return types — either return the data, or split into draw + query.
GTK trait impls that are forward-compat stubs because the rasteriser takes legacy render::Theme.Backend::draw_activity_bar and draw_terminal on GTK currently unimplemented!() because the existing rasterisers in crate::gtk::quadraui_gtk::* take render::Theme instead of quadraui::Theme. Fix: lift those rasterisers into quadraui::gtk::* (see Lift TUI + GTK rasterisers out of vimcode and into the quadraui crate #223).
TUI bypasses the trait for half the draws. TUI's draw_frame calls quadraui::tui::draw_* directly. After the return-type redesign in (1), route TUI through the trait method so future generic paint::<B> consumers exercise the same code path GTK does.
Primitives that don't have a trait method at all. Tooltip, dialog, context_menu, rich_text_popup, completions, find_replace — all 6 have rasterisers in quadraui::*::* but no Backend::* method. Both backends call the rasterisers directly. Fix: extend the trait per-primitive (some need return types for hit info: dialog needs button rects, rich_text_popup needs link rects).
Suggested stage order
Stage
Goal
B5c.1
Redesign Backend::draw_status_bar to return Vec<StatusBarHitRegion>. Update both backend impls. Migrate all GTK + TUI call sites onto the trait. Validates the return-type pattern before applying to others.
B5c.2
Same shape for draw_tab_bar (returns TabBarHits).
B5c.3
Same shape for draw_text_display (no hit data — straightforward).
B5c.4
TUI draw_tree + draw_form migration onto trait method (no trait change; mechanical mirror of GTK B5b.8).
B5c.5
Lift quadraui_gtk::draw_activity_bar + draw_terminal_cells into quadraui::gtk::* with quadraui::Theme. Wire GTK trait impls to call them.
B5c.6
Trait extension + impls for the 6 currently-trait-less primitives. Group by complexity: text_display already done (B5c.3 reuses); dialog and rich_text_popup need return types; the rest are straightforward.
B5c.7
Final parity sweep + smoke tests on both backends.
src/gtk/draw.rs, src/gtk/mod.rs, src/tui_main/render_impl.rs — call sites to migrate.
Why first
The runner-crate work (B.5e) needs every primitive to have a stable cross-backend trait surface. Doing the runner crates first would force the runner API to expose backend-specific hatches, defeating the boilerplate-elimination goal.
PLAN.md "🎯 NEXT FOCUS" section has the full context.
Goal
Both TUI and GTK at 100% on
quadraui::Backend. After B.5c, every primitive that has runtime usage either has a trait method that's used end-to-end, OR has a documented reason for not (e.g. backend-specific UX that genuinely doesn't fit the cross-backend contract). The runner crates (B.5e) depend on this being clean.Context
B.5b shipped the GTK runtime migration (closed at #249 after 13 stages on develop), but uncovered concrete trait-coverage gaps that aren't bugs — they're architectural:
Trait methods that return
()but call sites need hit-region info.Backend::draw_status_barreturns(); call sites in both backends useVec<StatusBarHitRegion>from the legacy direct shims. Same fordraw_tab_bar(returnsTabBarHits). Fix: redesign return types — either return the data, or split into draw + query.GTK trait impls that are forward-compat stubs because the rasteriser takes legacy
render::Theme.Backend::draw_activity_baranddraw_terminalon GTK currentlyunimplemented!()because the existing rasterisers incrate::gtk::quadraui_gtk::*takerender::Themeinstead ofquadraui::Theme. Fix: lift those rasterisers intoquadraui::gtk::*(see Lift TUI + GTK rasterisers out of vimcode and into the quadraui crate #223).TUI bypasses the trait for half the draws. TUI's
draw_framecallsquadraui::tui::draw_*directly. After the return-type redesign in (1), route TUI through the trait method so future genericpaint::<B>consumers exercise the same code path GTK does.Primitives that don't have a trait method at all. Tooltip, dialog, context_menu, rich_text_popup, completions, find_replace — all 6 have rasterisers in
quadraui::*::*but noBackend::*method. Both backends call the rasterisers directly. Fix: extend the trait per-primitive (some need return types for hit info:dialogneeds button rects,rich_text_popupneeds link rects).Suggested stage order
Backend::draw_status_barto returnVec<StatusBarHitRegion>. Update both backend impls. Migrate all GTK + TUI call sites onto the trait. Validates the return-type pattern before applying to others.draw_tab_bar(returnsTabBarHits).draw_text_display(no hit data — straightforward).draw_tree+draw_formmigration onto trait method (no trait change; mechanical mirror of GTK B5b.8).quadraui_gtk::draw_activity_bar+draw_terminal_cellsintoquadraui::gtk::*withquadraui::Theme. Wire GTK trait impls to call them.text_displayalready done (B5c.3 reuses);dialogandrich_text_popupneed return types; the rest are straightforward.Pickup files
quadraui/src/backend.rs— trait definition.quadraui/src/gtk/,quadraui/src/tui/— rasterisers.src/gtk/quadraui_gtk.rs— in-tree shims to lift.src/gtk/draw.rs,src/gtk/mod.rs,src/tui_main/render_impl.rs— call sites to migrate.Why first
The runner-crate work (B.5e) needs every primitive to have a stable cross-backend trait surface. Doing the runner crates first would force the runner API to expose backend-specific hatches, defeating the boilerplate-elimination goal.
PLAN.md "🎯 NEXT FOCUS" section has the full context.