#671: #592-C: GTK live path — paint the remaining chrome (find_replace, tab_switcher, separated_status_line, tab_tooltip) - #686
Merged
JDonaghy merged 2 commits intoAug 28, 2026
Conversation
…tooltip on GTK's live render_content path Sub-task 3/4 of #592 (chrome/transient surfaces group). These four screen.* fields were populated by the engine the whole time but had no live GTK painter: find_replace and tab_switcher had a dead draw.rs painter to bypass (routed through Backend::draw_find_replace and the already-shared render::tab_switcher_to_quadraui_list_view/Backend:: draw_list instead), while separated_status_line and tab_tooltip never had a GTK painter at all. - render.rs: new shared tab_hover_tooltip_paint adapter (unit_w/unit_h scale, same convention #669 established) — the single-segment StatusBar trick TUI's now-retired draw_rule_row-based render_tab_hover_tooltip used, generalized so GTK can call it with cw/lh pixel scale instead of TUI's 1.0/1.0 cell scale. - tui_main/render_impl.rs: render_tab_hover_tooltip is now a thin 1.0/1.0 wrapper around the shared function — no behavior change, verified via the existing tab_tooltip_agrees_with_click_target_ across_the_bar test. - gtk/mod.rs: render_content now paints all four surfaces — find/ replace via Backend::draw_find_replace directly, the tab switcher via the shared list-view adapter + Backend::draw_list (also feeding the long-existing but never-populated tab_switcher_popup_rect click cache), the separated status line via the same window_status_line_ to_status_bar adapter the per-window status bar already uses, and the tab-hover tooltip via the new render.rs adapter. - gtk/testing.rs: four new GtkDriver black-box tests (chrome_surfaces module) proving each surface actually paints — not just that its screen.* field is populated. Each was verified to fail red by temporarily commenting out its paint call and confirming the pixel- diff assertion panics, then restoring it. No GTK-only painter added; the two surfaces with no prior painter route through a render.rs adapter shared with TUI. TUI behavior unchanged (verified by existing TUI test suites). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The tooltip's Y position was offset by one line height (`lh`), but GTK's tab row is `tab_row_h = (lh * 1.6).ceil()` tall — 1.6x a line height, not 1x like TUI's cell-based tab bar. Offsetting by `lh` alone landed the tooltip's top edge inside the tab row's own vertical span, painting over tab labels instead of sitting in a clean band below the tab bar. Fixed by offsetting by `tab_row_h` (already computed earlier in the same function) instead of `lh`, matching TUI's `area.y + 1` semantics: TUI's `+1` clears exactly one cell row regardless of the breadcrumbs setting, same as `tab_row_h` here (as opposed to `tab_bar_h`, which also reserves the breadcrumb row). Added a positional regression test (`tab_hover_tooltip_paints_below_tab_row_not_inside_it`) that pins the exact paint band rather than just checking "some pixel changed" — the existing `tab_hover_tooltip_paints` test's broad 0-200px scan stayed green with the bug present. Verified the new test fails red against the old `lh`-only offset before confirming it passes with the fix.
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 #671
Automated PR opened by coordinator for review of issue #671.