Skip to content

bug(ask): stale transcript frame bleeds into ask_user_question dialog right after reading an image #1297

Description

@grivper

Description

When an image was just read/attached into context (e.g. via the read tool on a screenshot) and an ask_user_question dialog is triggered immediately after, the dialog renders with leftover content from the previous transcript frame bleeding through above/around it (stray divider lines, fragments of earlier chat text) instead of a clean redraw. It self-corrects as soon as any redraw-triggering interaction happens (scroll, resize, moving focus).

Steps to reproduce

  1. In a fullscreen session with the sidebar active, use read on an image file so its preview/reference card renders in the transcript.
  2. Immediately trigger a tool call that opens ask_user_question.
  3. Observe stale content (old transcript lines, divider artifacts) overlapping/bleeding into the area where the question dialog renders.
  4. Interact with the UI (scroll, resize) — the glitch clears and the dialog renders correctly.

Expected behavior

The ask_user_question dialog should render on a fully cleared/fresh frame regardless of what was rendered immediately before it (image card or otherwise).

Screenshot

Not embedded here — the GitHub REST API used to file this issue cannot attach images. I have a screenshot showing the question dialog rendering below leftover chat content and stray vertical divider lines that don't belong to the current frame; can add it as a comment via drag-and-drop.

Possibly related

Likely connected to #1141 (fixed) / #1274 (merged 2026-09-20, the day before this was observed): ask_user_question was just changed from an overlay to a "dock-swap" mount specifically so the transcript stays scrollable while a question is on screen. This stale-frame bleed-through right at that same mount point, triggered specifically after an image card renders, looks like an edge case not covered by that very recent change rather than a long-standing issue.

Possibly related code

Likely related to the same frame/section caching in lib/shell-sidebar-layout.ts (prepared/sectionCache, "reuses its last frame until something it paints changes") not being invalidated when an image-bearing tool result is followed by a dialog-owning component. Could also be a pi-tui core interaction rather than something owned by gentle-pi — worth flagging as possibly cross-cutting.

Environment

  • Package: gentle-pi (repo: gentle-shell)
  • Fullscreen mode, sidebar active, 140+ columns
  • Trigger: ask_user_question fired right after an image read

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions