Skip to content

Audit src/tui_main/ for per-backend code that can be lifted or removed #474

Description

@JDonaghy

Goal

Identify all code in src/tui_main/ that duplicates logic available in src/render.rs, src/core/, or quadraui primitives — and file individual issues for each dedup opportunity found.

What to look for

  1. Rendering logic that re-derives what render.rs or quadraui already computes (layout math, color mapping, text truncation)
  2. Mouse/click handling that re-implements hit-testing available via cached quadraui layouts (StatusBarLayout, TreeViewLayout, PaletteLayout, etc.)
  3. Event dispatch patterns that could be consolidated into engine methods (similar to how GTK is converging via Migrate GTK event dispatch to ShellApp::handle(UiEvent) #448)
  4. Layout calculations that duplicate render::compute_editor_layout() or similar shared functions
  5. Scroll handling outside of dispatch_scroll — any manual scroll math that should route through quadraui's shared scroll dispatch

What NOT to do

  • Don't fix anything — just audit and file issues
  • Don't touch src/gtk/ or src/core/engine/keys.rs
  • Don't count thin wiring code (1-3 lines calling a shared function) — that's expected per-backend glue

Output

A set of new GitHub issues, each describing:

  • Which function/block in src/tui_main/ is duplicated
  • What shared code already exists (or what quadraui primitive would replace it)
  • Estimated lines removed
  • Any quadraui gaps that would need to be filed first

Context

The GTK side has a clear convergence chain (#447#448#449). The TUI side doesn't have one yet. This audit creates the TUI convergence backlog.

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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions