Skip to content

Adopt promoted quadraui helpers: driver tab geometry + SidebarSystem reveal #659

Description

@JDonaghy

What

Delete vimcode's private tab_center / tab_close_center test helpers and consume the promoted
quadraui versions (quadraui #594). Likewise re-express explorer_reveal_path on top of
SidebarSystem::reveal / TreeController::reveal (quadraui #595).

Why now

Both helpers were written here first and were promoted into quadraui because they are generic
src/gtk/testing.rs:130-160 is the literal source for quadraui #594, and
src/core/engine/explorer_ops.rs:75-91 is the reference composition for quadraui #595.

Promotion without migration is the worst outcome: the logic now exists twice, and the copy that
gets fixed is whichever one the next bug happens to land in. coord-tui will consume the quadraui
versions from day one, so leaving vimcode on its originals guarantees divergence between the two
apps this framework exists to unify.

Design

Test harness (quadraui #594):

  • Remove tab_center and tab_close_center from src/gtk/testing.rs.
  • Point callers at the driver-provided versions, keyed by the tab bar's WidgetId rather than
    vimcode's GroupId — a mechanical translation at each call site.
  • The None-when-no-close-button case (#448-F: GTK tab click (activate/close) dead when only ONE tab group exists #553) is preserved by the quadraui version; assert it still
    holds.

Reveal (quadraui #595):

  • explorer_reveal_path keeps its vimcode-specific half — resolving a filesystem path to ancestors
    and expanding them — and delegates the select-and-scroll half to the shared reveal.
  • Its existing behaviour is the contract: expand ancestors, rebuild rows, select, scroll into view.

Acceptance criteria

  • src/gtk/testing.rs contains no tab-geometry arithmetic of its own.
  • Every test that previously called the local helpers passes unchanged in its assertions.
  • explorer_reveal_path no longer calls TreeController::scroll_to_visible directly.
  • Revealing a file below the fold still scrolls it into view (existing behaviour, existing tests).
  • cargo build && cargo test EXIT=0.

Files

  • src/gtk/testing.rs
  • src/core/engine/explorer_ops.rs
  • Cargo.toml (quadraui pin bump, separate commit)

Depends on

quadraui #594 (driver tab geometry) and quadraui #595 (SidebarSystem::reveal).

Out of scope

  • Behaviour changes to reveal or to the harness.
  • The preview-tier migration, filed separately.

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 pipeline

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions