Skip to content

[FEATURE] Switch locations of Top / Center / Bottom panes #136

@Firstp1ck

Description

@Firstp1ck

Summary: Add configurable top/center/bottom pane reordering while preserving semantic pane behavior, persistent settings, and compatibility with height customization. Related planning: dev/IMPROVEMENTS/FEATURE_PRIORITY.md (v0.7.3 pane reorder).

Problem / motivation

Users differ on whether search should be top or bottom; some prefer package details docked to a different edge for muscle memory or secondary monitor placement.

Goals

  • Allow permutation of the three logical panes (Search, Results, Package Info) in the vertical stack without rewriting the whole UI.
  • Persist choice in config; default remains current order.
  • Focus and keybind behavior should follow semantic pane identity, not screen position (search is still “search” after reorder).

Recommended implementation

1) Semantic pane IDs

  • Define an enum e.g. MainPaneRole::Search | Results | PackageInfo.
  • Rendering pipeline maps ordered Vec<MainPaneRole> to physical top→bottom slots.

2) Config

  • layout.main_pane_order = [search, results, package_info] using stable string tokens; validate permutation (no duplicates, length 3).

3) Focus and navigation

  • Existing next_pane / prev_pane should traverse visual order or logical order — pick one and document; recommend visual order for predictability.
  • Ensure status bar labels still describe the active semantic pane.

4) Composability with adjustable heights

  • Heights should attach to semantic pane, not slot index: if Results moves to top, its height config still applies to Results.

Acceptance criteria

  • All six permutations (or documented subset if some are disallowed) render without panic and with usable minimum sizes.
  • Saved order survives restart and interacts correctly with height settings.
  • No orphaned keybinds after reorder.

Testing

  • Table-driven test: for each permutation, assert constraint generation order matches config.
  • Regression test: default order matches pre-feature layout exactly.

Risks

  • Assumptions in code that “pane 0 is search” — requires audit of magic indices.

Tracking: dev/ROADMAP/PRIORITY_pane_layout_reordering.md

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions