Skip to content

feat: show floating panes in the minimap, selectable when hidden #110

Description

@GeneralD

agent type complexity estimate AI scope

Motivation

The minimap currently depicts only the tiled terminal layout. is_tiled_terminal drops is_plugin || is_floating || is_suppressed panes (src/projection.rs:30-32), so floating panes are invisible in the bar — you can't see they exist, and the wheel-walk (#80) / click-to-focus (#74) never reach them. docs/design.md:367 already lists separate-layer rendering of floating panes as deferred work; this issue formalizes it.

Two distinct asks:

  1. Show floating panes in the tabmap. Represent the floating layer so a user can see, at a glance, that a tab has floating panes — and how many.
  2. Make a floating pane selectable even while the floating layer is hidden. When the float layer is toggled off, the panes still exist but have no on-screen footprint. We want a UI affordance that can still target them.

Good news: the focus primitive already supports this

focus_terminal_pane(id, should_float_if_hidden, should_be_in_place_if_hidden) is already in use (src/lib.rs:377-388). The existing call passes should_float_if_hidden: false because every tiled pane is always visible. For a hidden floating pane we'd pass should_float_if_hidden: true, which both focuses and reveals it. So the "selection" half is mostly a matter of giving each floating pane a hit target in the bar; the reveal comes for free.

Proposal — pick a representation for the float layer

The hard part is rendering: floating panes overlap the tiled layout, and hidden ones have no useful geometry, so they can't simply join the same minimap grid. Options:

Option A — overlay markers on top of the tiled minimap

Draw each floating pane as a small inset/badge composited over the tiled minimap at its (scaled) float position.

  • ➕ Spatially faithful — shows where the float sits.
  • ➖ Clutters small minimaps; breaks for hidden floats (no current position), which is exactly the case we care about.
Option B — a dedicated float strip / chip row (recommended)

Render floating panes as a separate compact row of geometry-independent markers (dots/chips), one per floating pane, appended to the active tab's block (or the bar edge). Each chip is a click + wheel target.

  • ➕ Works identically whether the float layer is shown or hidden — no geometry needed.
  • ➕ Clean hit-test, reuses the pane_atfocus_terminal_pane(id, should_float_if_hidden=true, …) path.
  • ➖ Costs a little vertical space; needs a minimum bar height.
Option C — a single float-count badge + cycle

Show one badge per tab (e.g. ◰3) for the float count; clicking toggles/cycles the float layer.

  • ➕ Minimal footprint.
  • ➖ Can't select a specific floating pane — only toggles the group. Falls short of the "selectable" requirement.

Leaning Option B (or a B/A hybrid: chips when hidden, overlay when shown), since it's the only one that satisfies "select a hidden one".

Open questions / investigation

  • How does PaneInfo report a hidden floating pane? Is it still listed with is_floating == true, and does it carry a usable id while the layer is off? (Determines whether B is even feasible.) Verify with the eprintln oracle harness (.claude/rules/zellij-plugin-development.md §4).
  • Is there a "float layer visible" signal in PaneManifest / TabInfo, or must we infer it? Needed to switch B↔A in the hybrid and to style "hidden" chips differently.
  • Scope of is_suppressed — the ask names floating panes; should suppressed/background panes get the same treatment, or stay out for now?
  • Config gating — opt-in flag (e.g. floating = "strip" | "overlay" | "off"), defaulting off to keep the default bar unchanged?
  • Interaction wiring — floating chips should join the mouse: scroll the tab bar to switch tabs or walk panes (tab/pane modes) #80 wheel-walk set and the mouse: click a minimap pane to focus it (position -> pane hit-test) #74 click set; decide their order relative to tiled panes.

Relevant code

  • src/projection.rs:30-32is_tiled_terminal, the single filter that excludes floats; both project and pane_ids_in_reading_order flow through it.
  • src/lib.rs:377-404focus_or_switch_at / pane_at hit-test; the focus primitive with the should_float_if_hidden flag.
  • src/minimap.rs, src/tab_block.rs — where a strip/overlay would be drawn (and unit-tested off-wasm, per the renderer-stays-dependency-free rule).

Relates to

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinteractionMouse / keyboard interactionrenderingMinimap / color / label rendering

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions