Skip to main content
← Back to list
01Issue
BugShippedSwamp CLITeam
Assigneesstack72

Relationships

#1220 Interactive finder preview corrupts: overlapping/stale lines when preview content overflows the pane

Opened by kneel · 7/17/2026· Shipped 7/17/2026

Description

The interactive fuzzy-finder used by swamp model search, swamp model type search, swamp data search (and any * search) renders its right-hand preview pane incorrectly whenever the preview content is taller than the pane. Lines are drawn on top of one another — the widget writes each line without clearing to end-of-line and mis-handles vertical overflow — so the preview becomes unreadable overlapping text. Short previews that fit render perfectly; only overflowing previews corrupt, which is why it looks intermittent.

The same overflow boundary also truncates a full metadata line down to a single character: e.g. Created: 12h ago renders as C… and everything below it (the report body / JSON) is dropped entirely.

This is width-independent — it reproduces at 90, 120, 160, and 200 columns — so it is not a "terminal too narrow" issue; it's a draw/clip bug in the preview renderer (Ink / yoga-layout / marked-terminal stack, cf. #708). Likely related class to #377 ("Terminal rendering breaks at large font sizes").

Steps to reproduce

  1. Run swamp model type search
  2. Type forgejo to select the @shrug/forgejo type (a long preview: many methods)
  3. Observe the preview pane. Actual output:
    Methods: 2026.04.13.1                      <- "version: 2026.04.13.1" overwritten by "Methods:"
      limit (integer)repositories owned by or accessible to the authent…
      repo (string) *requiredda specific repository.
      owner (string) *requiredissue by number.
    Every other logical line is clobbered by the next one.
  4. For contrast, select command/shell (a short preview) — it renders cleanly.

Also reproducible via swamp model search (select forgejo) and swamp data search (select any large-JSON / report entry — this is where Created: → C… and the dropped body appear).

Additionally, in the list-only "compact" layout the same corrupted preview fragments get painted into the bottom of the result list, e.g.:

  blog-deploy (@bixu/github/actions)
           owner(string)*requireda specific repository.ible to the authenticate…
         Arguments:et a specific issue by number.
       get_pull- Get a specific pull request by number.

Expected

Preview content taller than the pane should clip/scroll/ellipsize cleanly (each line cleared before redraw), never overwrite adjacent lines or leak into the list.

Environment

  • swamp 20260716.194319.0-sha.df9fc306
  • Linux (x86_64), zsh
  • Reproduced independently in two terminal emulators — tmux 3.2a and a Python pyte screen emulator — so the corruption is swamp's emitted output, not an emulator quirk.
  • Real-terminal screenshots of swamp data search (showing Created: → C…) available.
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

7/17/2026, 9:22:54 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/17/2026, 6:34:18 PM
Editable. Press Enter to edit.

kneel commented 7/17/2026, 4:11:06 PM

Sibling finding: #1221 covers the responsive-layout side (preview pane dropped on narrow terminals + unstable layout selection). Same finder widget, different fix.

stack72 commented 7/17/2026, 9:23:05 PM

Thanks @kneel for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.