Skip to content

TUI: compact tab rail hover card renders behind the session column #67045

Backlog

Description

@tobwen

Description

With the tabs in the vertical rail and the rail narrower than 12 columns, hovering a tab shows the title card. The card is drawn at the rail's right edge and overlaps the session column, but it is painted behind that column. The text is visible over the timeline, which has no background, and is cut off exactly where the composer draws its background.

Cause: OpenTUI sorts zIndex only among siblings. The card's zIndex={2000} orders it inside the rail and cannot lift it above the session column, which is the later sibling in the row.

Expected: the hover card paints above the session column, like any other tooltip.

Plugins

none

OpenCode version

2.4.2 (master)

Steps to reproduce

  1. Set the tabs to the vertical layout: "tabs": { "layout": "vertical" } in opencode.jsonc.
  2. Open a session and drag the rail divider to the left until the rail is narrower than 12 columns (compact rail).
  3. Hover a tab that sits low in the rail, so the card would overlap the composer.
  4. The card's text appears over the timeline and disappears where the composer box starts.

Screenshot

image

Operating System

Debian Trixie

Terminal

PuTTY

Activity

  1. added
    area/tui
    type/bug
    version/v2
    on Nov 28, 2026
  2. opencodejr commented on Nov 28, 2026

    @opencodejr
    Contributor

    Seen with a simulated model or a mock server, not a real provider; a maintainer should confirm.

    Thanks for the precise report. I reproduced this on 2.4.2, and it still happens on the latest dev (d1d46b9), run from source.

    Steps:

    1. Use tabs layout: "vertical" in a 120×16 terminal.
    2. Send one prompt so the session has a user message and some timeline text.
    3. Drag the rail divider left until the rail is compact (7 columns).
    4. Hover the tab.

    What I saw: the title card appears at the rail's right edge, but the session column paints over it. On 2.4.2 only the first letter of the title shows; the user-message box covers the rest, and the timeline text is drawn over the card's lower rows. On dev the timeline text overwrites the card's second row.

    The hover card is still an absolute box with zIndex={2000} inside the rail, and the session column is a later sibling in the row. That fits your explanation that the zIndex only orders siblings, but I haven't confirmed that inside OpenTUI.

    The recording and the screenshots below show it: the first screenshot is 2.4.2, the second is dev. The script below reproduces it. A simulated model supplied the session content; the bug itself is just rendering.

    https://anoma.ly/team/github-bot/media/c4a84a2aa21d47f4fef771a47e5bb6bb49ce5b11e2cb5108b527497ed67fc5e0.mp4

    Screenshot

    Screenshot

    Reproduction script (drive.ts)
    import { Effect, Stream } from "effect"
    import { Llm, OpenCodeDriver } from "opencode-drive"
    
    // Repro for anomalyco/opencode#67045: compact vertical tab rail hover card paints behind the session column.
    export default OpenCodeDriver.use(
      {
        ...(process.env.OC_DEV ? { opencode: { dev: process.env.OC_DEV } } : {}),
        tui: { recording: true, pointerOverlay: true, viewport: { cols: 120, rows: 16 } },
        tuiConfig: { tabs: { mode: "on", layout: "vertical" } },
      },
      ({ ui, llm }) =>
        Effect.gen(function* () {
          yield* llm.serve(() => Stream.make(Llm.text("First answer.")))
          yield* ui.submit("first session")
          yield* Effect.sleep("3 seconds")
          yield* ui.screenshot("01-vertical-rail")
          // drag the rail divider (right edge of the 42-col rail) to the left -> compact rail
          yield* ui.mouse({ action: "move", x: 41, y: 8 })
          yield* ui.mouse({ action: "down", x: 41, y: 8, button: "left" })
          for (const x of [35, 25, 15, 8, 6]) yield* ui.mouse({ action: "move", x, y: 8 })
          yield* ui.mouse({ action: "up", x: 6, y: 8, button: "left" })
          yield* Effect.sleep("500 millis")
          yield* ui.screenshot("02-compact-rail")
          // hover the tab: its title card should paint above the session column
          yield* ui.mouse({ action: "move", x: 3, y: 3 })
          yield* Effect.sleep("700 millis")
          yield* ui.screenshot("03-hover-card")
          yield* Effect.sleep("700 millis")
        }),
    )

    Run it with opencode-drive: opencode-drive run ./drive.ts. It drives opencode from your PATH; set OC_DEV to the path of an OpenCode checkout to run that from source instead.

  3. added
    status/repro-simulated
    on Nov 28, 2026
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

    area/tuiplatform/linuxstatus/repro-simulatedtype/bugversion/v2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions