Skip to content

Factor tab-bar and breadcrumb-bar render wrappers #347

Description

@JDonaghy

Context

Both backends have nearly identical wrapper functions for rendering the tab bar and breadcrumb bar:

Tab bar (~35 lines TUI, ~40 lines GTK):

  1. Call render::build_tab_bar_primitive()
  2. Compute bounds
  3. Call quadraui::draw_tab_bar()
  4. Handle diff toolbar buttons

Breadcrumb bar (~22 lines TUI, ~40 lines GTK):

  1. Call render::breadcrumbs_to_quadraui_status_bar()
  2. Compute bounds
  3. Call quadraui::draw_status_bar()

The only backend-specific parts are coordinate conversion and measurement.

What to do

Investigate whether a thin shared dispatcher in render.rs (or a trait method) can eliminate the duplicated call sequences. The wrappers are small enough that the win is more about consistency than line count.

Current locations

  • TUI: src/tui_main/render_impl.rs:1638-1701
  • GTK: src/gtk/draw.rs:1025-1164

Priority

Low — small wrappers, minimal bug risk, but contributes to the "one place to change" goal.

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

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions