Skip to content

#730: #592-E: GTK live path — paint the AI panel (screen.ai_panel), the 14th and last dropped ScreenLayout field - #740

Merged
JDonaghy merged 1 commit into
developfrom
issue-730-592-e-gtk-live-path-paint-the-ai-panel-s
Sep 2, 2026
Merged

#730: #592-E: GTK live path — paint the AI panel (screen.ai_panel), the 14th and last dropped ScreenLayout field#740
JDonaghy merged 1 commit into
developfrom
issue-730-592-e-gtk-live-path-paint-the-ai-panel-s

Conversation

@JDonaghy

@JDonaghy JDonaghy commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Closes #730

Automated PR opened by coordinator for review of issue #730.

…ayout fields

`render_content`'s sidebar match and `try_route_sidebar_mouse_event` both had
a `PANEL_AI` holdout since #670 scoped only the other four panel surfaces
(quickfix/bottom_tabs/debug_toolbar/panel_hover) and deferred AI to this
follow-up. Selecting the AI panel on GTK painted nothing.

- Add `render::draw_ai_sidebar_panel` — the paint logic lifted out of TUI's
  `render_ai_sidebar` and generalized with the `unit_w`/`unit_h` convention
  `tab_hover_tooltip_paint` (#671) established: `1.0, 1.0` for TUI's
  cell-native space, `char_width, line_height` in pixels for GTK. One
  implementation instead of two — TUI's `render_ai_sidebar` now just
  converts its `Rect` and delegates.
- `render_content` gains a real `PANEL_AI` arm painting through this
  builder and caching the returned `AiSidebarBands` (header/messages/input)
  in a new `cached_ai_bands` field.
- `try_route_sidebar_mouse_event` gains `route_ai_sidebar_event`, mirroring
  `route_sc_sidebar_event`'s git-commit-box pattern: a press anywhere in the
  panel focuses it, a press in the input band also activates text entry —
  resolved against the cached bands, never re-derived (#544/#582/#646).
- `GtkDriver` black-box tests in `src/gtk/testing.rs` assert on rendered
  output (`screen_contains("AI ASSISTANT")`) and on click routing, not on
  state alone. Both verified RED against unfixed develop (git-stashed the
  render.rs/gtk/mod.rs/tui_main/panels.rs hunks, confirmed both new tests
  fail, restored).

cargo build && cargo test (targeted) && cargo clippy -- -D warnings &&
cargo fmt --check all pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@JDonaghy
JDonaghy merged commit cbd17b1 into develop Sep 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#592-E: GTK live path — paint the AI panel (screen.ai_panel), the 14th and last dropped ScreenLayout field

1 participant