#549: Unify tab-bar draw loop's split-group/single-group duplication (GTK + TUI) - #561
Merged
JDonaghy merged 1 commit intoJul 5, 2026
Conversation
Add render::tab_bar_draw_targets(), analogous to #547's breadcrumb_draw_targets(), collapsing the skip-condition + rect-math duplication that both GTK's render_content and TUI's draw_frame independently re-derived in their split-group/single-group tab-bar branches. Each backend keeps its own draw call and hit-test-geometry recovery (GTK's Rc<RefCell<...>> pixel-hit caches, TUI's visible-tab counts), which isn't shareable. Also closes a latent gap: GTK's split-group loop never filtered zero-width group bounds (the build_screen_layout fallback for a group with no matching window rects during a transient split mutation), unlike TUI's pre-existing `tab_w > 0` guard. The shared helper filters it uniformly, same as breadcrumb_draw_targets did for breadcrumbs. No behavior change otherwise: existing tab-bar tests pass unmodified, plus a new direct unit test for the helper covering single-group pass-through, split-group reserved-height/offset math, is_tab_bar_hidden filtering, and the zero-width filter.
3 tasks
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 #549
Automated merge from the coordinator for assignment a22265d48115 on issue #549.
Worker branch:
issue-549-unify-tab-bar-draw-loop-s-split-group-si→develop.