Skip to content

[bug] new panel shows a stray blank first row (needs clear to remove) #2145

Closed

Description

@Xuepoo

Owner report (0.0.24 batch).

Repro

Mod+N / Mod+T new panel, or move a panel to another workspace: the new panel's first row is blank; running clear removes it.

Expected

Fresh/moved panels start with the prompt on row 0, no stray blank line.

Notes

Cosmetic only (one wasted row at top). Possibly scrollback/viewport offset init on panel creation.

Priority: P2 | Area: ui | Labels: bug,P2,area:ui | Milestone: 0.0.24

Activity

  1. added this to the 0.0.24 milestone on Oct 16, 2026
  2. added
    bug
    area:ui
    P2
    on Oct 16, 2026
  3. Xuepoo commented on Oct 17, 2026

    @Xuepoo
    ContributorAuthor

    Audit result: deferred, no reproduction on current origin/main (b1cc7801). No product code or PR opened.

    Evidence:

    • Fresh headed instance was launched with an isolated socket/config and a recorded PID. On the live Hyprland seat, the instance was moved to WS5.
    • Repeated fresh panel creation, workspace creation plus cross-workspace panel move, and in-workspace panel reordering were exercised through the IPC control surface. core.terminal.text for each new/moved terminal began with CTX1281_PRIMARY followed by sh-5.3$; no leading blank row was reported.
    • Headed screenshots captured after split, WS5 workspace move, and in-workspace move show populated first rows in every panel: recording/ctx-1281-headed/after-split.png, ws5-after-move.png, and ws5-after-in-panel-move.png.
    • Targeted deterministic tests passed: bitty-terminal --test test_mode_serves_stable_e2e_surface_end_to_end, bitty-runtime --lib move_focused_within_reorders_panels, bitty-runtime --lib new_switch_prev_next_last_update_queries, and the existing PTY-backed new_split_spawns_private_shell_and_close_tears_it_down.

    The existing ctx-1271 worktree was inspected read-only and was not edited. The issue remains actionable if a future report includes a timestamped screenshot/log and exact trigger timing, shell, compositor, and panel layout; the current evidence does not justify speculative rendering changes.

  4. Xuepoo commented on Oct 17, 2026

    @Xuepoo
    ContributorAuthor

    CTX-1304 current baseline update: no reproduction or source cause found; issue remains open.

    • Replayed the preserved CTX-1271 cases conceptually and recovered their exact evidence: Mod+N/Alt+n fresh panel, Mod+T/Alt+t fresh workspace, split, workspace move, and in-workspace panel move. Recorded terminal text starts at row 0 with fish startup text and the prompt; no leading blank row.
    • Compared current origin/main 662212c against CTX-1281 baseline b1cc780. Recent changes cover PTY lifecycle diagnostics, float focus/paint ordering, workspace close, and primary-session cleanup; none changes shell startup bytes, terminal-state resize, panel creation initialization, or viewport top-row placement.
    • Validation: current just fmt-check passed. Current just pty-gate is blocked by the existing ungated fixture marker at crates/bitty-sandbox/src/lib.rs:676. The focused real_pty/split_live_reflow command was blocked on a concurrent target lock and timed out at 120s; no current-SHA test count is claimed. Prior replay revision recorded 7,099 nextest tests passed, 1 skipped, 55 perf tests passed, and terminal dev suites 27/22 passed.
    • Headed replay was not run: available DISPLAY=:1/WAYLAND_DISPLAY=wayland-1 is the owner desktop, not an isolated VM/display. No desktop or process state was altered.

    Please provide a timestamped screenshot/log with exact shell, compositor, panel layout, and trigger timing for a future reproduction.

  5. Xuepoo commented on Oct 18, 2026

    @Xuepoo
    ContributorAuthor

    Third independent audit (static + headless) finds no bitty-side defect producing the leading blank row.

    Verification performed against fresh origin/main (75ec169f), read-only (no GUI — host-compositor testing is banned):

    • Panel creation builds terminal state at 80x24 then resizes to real pane geometry (crates/bitty-runtime/src/registry/terminal.rs State::new, move_terminal -> state.resize); resize is a no-op on equal dimensions.
    • State::resize (crates/bitty-term-state/src/state.rs) and Grid::resize (crates/bitty-term-state/src/grid.rs) copy the overlapping prefix top-aligned and pad new rows at the bottom — never a blank row at index 0. Height-only and width-reflow paths behave the same.
    • No production code writes an initial newline/clear to a fresh PTY (grep of crates/bitty-runtime/src, crates/bitty-pty/src: PTY writes only in input forwarding, clipboard, tests).

    This matches the two prior audits already recorded here (CTX-1271 headed replay; CTX-1281/CTX-1304 IPC replay), both of which also found no leading blank row. The remaining plausible mechanism is external to bitty: the shell receives the spawn-at-80x24-then-layout-resize SIGWINCH handshake and (fish-class shells) prints a newline before redrawing the prompt; clear erases and homes the cursor, which is why it "removes" the row. That path is shell/compositor-dependent and is not exercised by bitty's deterministic state/render tests.

    Because a valid regression test here would pass on origin/main (i.e. a test that cannot fail), none was added — that would violate the no-fabrication rule.

    To close or reframe, one of:

    1. Owner-provided timestamped screenshot/log with exact shell, compositor, panel layout and trigger timing (headed capture, owner-run), or
    2. Confirm it is the shell's SIGWINCH/anchor-and-redraw behavior and close as not-a-bitty-defect (or re-file against the shell integration).

    Left open pending owner disposition.

  6. Xuepoo commented on Oct 18, 2026

    @Xuepoo
    ContributorAuthor

    Release disposition (CTX-1305, 2026-10-18): not reproduced in the headed/deterministic variants audited so far; no source cause, product fix, or current-SHA green reproduction was established. Recorded as an unreproduced known issue: it stays open on the current milestone and is neither fixed nor silently deferred. It is not treated as an independent P0 blocker on the available evidence. Escalation requires a timestamped reproduction with exact Core revision, shell, compositor, panel layout, trigger sequence, and timing.

  7. modified the milestones: 0.0.24, 0.0.25 on Oct 19, 2026
  8. Xuepoo commented on Oct 19, 2026

    @Xuepoo
    ContributorAuthor

    Owner decision 2026-10-19: move this unreported-reproduction P2 to milestone 0.0.25. This is not a fix, closure, or a claim that the symptom is gone; it remains an unreproduced known issue with the existing evidence boundary. 0.0.24 security gates (#2206, #2213) stay in 0.0.24.

  9. modified the milestones: 0.0.25, 0.0.24 on Oct 20, 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

    P2area:uibug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions