#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 intoSep 2, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #730
Automated PR opened by coordinator for review of issue #730.