Skip to content

Delete the tab-bar hit-region shim (570 lines) and adopt TabBarLayout/TabGroupController — the migration it waited for never happened #822

Description

@JDonaghy

Problem

src/render.rs:456-1025 (570 lines) is compute_tab_bar_hit_regions, plus tab_bar_hit_bands at :20309 (89 lines). Its own doc at :574-580 states its lifespan:

"Until TUI / GTK / Win-GUI migrate to consume TabBarLayout directly, this shim is the bridge."

Win-GUI was deleted on 2026-05-11 (3e4bcff). The migration never happened. The shim is now permanent scaffolding for a condition that can no longer be met.

Separately, quadraui ships compose/tab_group.rsTabGroupController (3,130 lines: drag, drop zones, split). vimcode references it once, and that reference is a stale doc comment at src/render.rs:9427 claiming drag is "Handled by TabGroupController" while the code actually uses vimcode's own render::TabDragState.

vimcode's parallel implementation:

  • src/render.rs:4873-5012TabDragState (~140 lines)
  • src/render.rs:21121-21442 — tab drop-zone (~322 lines)

History: #515 deferred full TabGroupController adoption "see quadraui#395". quadraui#395 closed the same day and no follow-up issue was ever filed — this issue is that follow-up.

Fix

  1. Migrate both backends to consume TabBarLayout directly; delete compute_tab_bar_hit_regions and tab_bar_hit_bands (~659 lines).
  2. Adopt TabGroupController for tab drag and drop zones; delete TabDragState and the local drop-zone code (~460 lines).
  3. Fix or delete the false doc comment at src/render.rs:9427.

Ordering: the GTK tab-bar click issue earlier in this chain touches src/gtk/click.rs:434-608. Land that first; this issue assumes it has.

Acceptance

  • Black-box tests required, both backends: tab click, tab close button, tab drag-to-reorder, drag-to-split drop zones.
  • Per feedback_cache_paint_layout, hit-testing must read what paint produced — never re-derive layout in the click handler.
  • State in the PR that the new tests fail against unfixed develop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coordTracked by coord-tui pipelineplatformPlatform-specific (macOS, Windows, Linux)status:readyRefined and ready to enter the work pipeline

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions