Skip to content

TUI: Migrate window-separator scrollbar drawing + tab drop overlay to quadraui primitives #481

Description

@JDonaghy

Tier: Blocked on quadraui (needs Backend::draw_scrollbar() and a drag-drop visual primitive)unblocked, see 2026-07-11 update below.

Summary

Two remaining hand-rolled paint paths in src/tui_main/render_impl.rs directly mutate the ratatui Buffer because quadraui's TUI backend doesn't expose the relevant primitive yet:

Path Lines What it draws Quadraui gap
Per-window vertical scrollbar in separator column render_impl.rs:1579–1680 (~100) Thumb/track within the 1-column window separator Backend::draw_scrollbar()
Tab drag-and-drop overlay render_impl.rs:1243–1330 (~20 lines of cell painting at 1286–1318) Drop-zone highlight + insertion bar Backend::draw_drag_drop_indicator() (or draw_rectangle())

Both compute geometry locally; the math is duplicated from the shared utilities (render::terminal_scrollbar_geometry(), render::compute_tab_drop_overlay()), but rendering can't route through quadraui because the primitives are missing.

What exists

  • render::terminal_scrollbar_geometry() (render.rs:1820) — geometry only, not rendering.
  • render::compute_tab_drop_overlay() (render.rs:12291) — geometry only.
  • quadraui::fit_thumb() — used internally by both call sites.

What to do

  1. File quadraui issues for:
    • Backend::draw_scrollbar() (or a Scrollbar primitive + draw method) — TUI + GTK both implement it.
    • A drag-drop visual primitive (or Backend::draw_rectangle() if quadraui prefers a more generic painter).
  2. Once landed: replace cell painting at render_impl.rs:1625–1643 and :1286–1318 with calls to the new backend methods. Geometry inputs come from the existing shared computation fns.

Files

  • src/tui_main/render_impl.rs — ~120 lines of manual cell painting removed across the two paths.

Dependencies

  • Blocked on quadraui: scrollbar primitive + drag-drop visual primitive. Both look like simple additions.

Notes

Part of the TUI convergence backlog (#474). Low priority by line count, but valuable for symmetry — every other primitive renders through quadraui now, and these are the last two TUI-specific paint paths in render_impl.rs. The window-separator scrollbar UX is fine today; only the rendering layer needs to converge.

Update (chat session #676, 2026-07-11) — the blocker was already resolved and the migration already written; found orphaned

quadraui shipped both needed primitives (quadraui::Scrollbar::vertical + quadraui::tui::draw_scrollbar,
and quadraui::DropOverlay + quadraui::tui::draw_drop_overlay — still present today in
~/src/quadraui/quadraui/src/tui/{scrollbar,drop_overlay}.rs), and the vimcode-side adoption was
written and pushed on 2026-05-30 to issue-481-tui-migrate-window-separator-scrollbar-d (commit
13ebd820f) — one of four same-evening branches (#454/#459/#468/#481) found orphaned in the same
diagnostic sweep. It was never opened as a PR.

Unlike the other three, this branch has no bundled quadraui-compat-shim noise — it's a clean,
self-contained 2-file diff. Verified with a read-only git merge-tree origin/develop issue-481-...: zero conflicts. Also confirmed current develop still has the old manual
painting this replaces (RColor::Indexed(24), hand-rolled thumb_top/thumb_size math) — nothing
superseded it since.

Full rework instructions (should be closer to a plain rebase than the other three) in
/tmp/rework-briefing-481.md on elitebook. Next step: coord assign elitebook vimcode 481 --rework-of issue-481-tui-migrate-window-separator-scrollbar-d --interactive --briefing-file /tmp/rework-briefing-481.md.

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 pipelineenhancementNew feature or requeststatus:readyRefined and ready to enter the work pipelineuiUI/rendering

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions