#754: Converge the mouse ladder slice 4: panels — activity bar, sidebar, terminal, bottom tabs, quickfix - #771
Merged
JDonaghy merged 3 commits intoSep 2, 2026
Conversation
…owner + hover Slice 4 of the #733 mouse ladder. WIP: production convergence, tests follow. New shared API (`src/render.rs`, "Panels rung (#754)"): - `quickfix_panel_rows` — one statement of the quickfix band height, the painter's. - `BottomPanelMetrics` / `BottomPanelRoute` / `route_bottom_panel_click` / `apply_bottom_panel_route` / `terminal_scrollback_drag_target` — the tab-strip / toolbar / split / pane ladder, once. - `SidebarOwner` / `sidebar_owner` — who owns the sidebar body, once. - `apply_activity_panel_switch` — the activity-bar icon activation, once. - `SidebarBodyGeometry` / `route_sidebar_hover` — the SC + ext-panel hover rung, which existed only on TUI. Both backends' bespoke arms are deleted in this commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Four tests, all asserting on rendered output (CLAUDE.md rule 1) and all
verified RED against the unfixed code (rule 2).
TUI (`TuiDriver` via `driver_with_shell`, in `tui_main::shell_app`):
- `bottom_panel_tab_strip_click_switches_the_painted_panel_via_shell_app` —
clicking the Debug Output tab must repaint the panel body with the debug
output. RED with `apply_bottom_panel_route`'s `TabBar` arm stubbed.
- `empty_quickfix_does_not_displace_the_terminal_band_via_shell_app` — with
`:copen` on an empty list, a right-click three rows above the painted
terminal must still open the editor context menu. RED with
`quickfix_panel_rows` reverted to `if quickfix_open { 6 }`.
GTK (`GtkDriver`, in `gtk::testing`):
- `bottom_panel_tab_strip_click_switches_the_painted_panel` — the same claim
on this backend, aimed at the `slot_positions` the frame painted. RED with
`route_bottom_panel_click`'s `TabBar` zone mis-resolved.
- `source_control_toolbar_button_highlights_on_hover` — pixel probe across
the button's own painted bounds, before and after the pointer arrives.
RED with the new `route_sidebar_hover` call gated off, which is exactly
develop's state: GTK painted `button_hovered` and nothing ever set it.
Also: replace a single-arm `match` with `matches!` for clippy.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… backends The blocking finding: try_route_sidebar_mouse_event's per-panel arms (explorer_ui_event, route_debug_sidebar_event, route_sc_sidebar_event, route_ai_sidebar_event) and mouse.rs's owner match were byte-for-byte duplicated business logic behind a shared "who owns the sidebar" check — not converged, contrary to the issue's hard exit condition and the PR's own commit message. Shared, in render.rs, now called from both backends: - route_explorer_tree_event: the TreeController populate/handle/resolve- context-menu dispatch (GTK's explorer_ui_event, TUI's mouse.rs Explorer arm and TuiShellApp's explorer intercept all call it). - dispatch_dap_sidebar_body_event + dap_sidebar_action_click_at: the Debug panel's body dispatch and chrome (title/action-row) hit test. - route_sc_sidebar_click (+ ScSidebarClickOutcome): the Git panel's header/commit-input/toolbar/content dispatch, using the same absolute coordinate frame sc_panel_layout/sc_button_hit already hit-test in on both backends (TUI's own sidebar_row-relative shortcut is gone). - route_ai_sidebar_click: the AI panel's dispatch logic (GTK-only wiring for now — TUI never cached bands for this panel; that's a real, separate gap, documented on the function). Along the way, found and fixed a second unconverged copy: TUI's real activity-bar click path (TuiShellApp::on_shell_event -> activate_ext_panel, driven by quadraui's own AppShell widget) never called apply_activity_panel_switch at all — it was a fourth hand-rolled copy that still reset ext_panel_selected/re-fired plugin_event on every re-activation even after the "shared function" claim. Converged it too. Second blocking finding: apply_activity_panel_switch's two documented behavior fixes (#637 focus-clear now on GTK, re-entry guard now on TUI) had no black-box coverage. Added: - GTK: switching_to_a_plugin_panel_clears_stale_marketplace_focus (gtk/testing.rs) — drives a real activity-bar click through GtkDriver, verified RED against the unfixed clear_sidebar_focus() call. - TUI: reactivating_the_open_plugin_panel_does_not_reset_its_scroll_position (tui_main/shell_app.rs) — drives on_shell_event twice, verified RED against the unconverged activate_ext_panel. cargo build / clippy (both feature lanes) / fmt clean. Targeted suites: tui_main:: 169 passed, gtk:: 102 passed, render:: 150 passed. 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 #754
Automated PR opened by coordinator for review of issue #754.