#583·jcode

Info widgets jump/hide/disappear as content scrolls, causing visual flicker

Author: alecuba16Created Jul 24, 2026Updated Oct 1, 2026
Labelsbugpriority: mediumtriage: unclearneeds-info

Problem

Info widgets (model, context, usage, KV cache) jump between positions, hide, and reappear as transcript content scrolls. Three competing display systems — margin HUD overlays, overscroll status line, and right fact stack — each render the same info fields independently, causing visual flicker and unstable placement.

Root cause

  1. Margin HUD: floating widget placements whose position depends on transcript content width, which changes on every frame during streaming.
  2. Overscroll status line: only visible during elastic overscroll reveal (transient), showing model/provider/context.
  3. Right fact stack: only visible when idle (not processing), showing model/provider/context in the transcript margin.

These three systems competed for the same screen real estate and rendered duplicate information. As the transcript scrolled or streamed, the available margin width changed, causing widgets to jump between positions or disappear entirely.

Solution

Consolidates all info fields into a single fixed Overview panel that is always visible. No competing margin widgets, no transient reveals, no fact stack.

What changed

  • Single fixed Overview panel: All info fields rendered in one fixed panel (top-right of messages area), always visible. The previous separate floating widgets (ModelInfo, ContextUsage, UsageLimits, KvCache) are suppressed when the status line is active.
  • 5-line layout: Session count+name, working dir+git branch, provider+model (2 lines), context bar, cost+tokens+avg t/s.
  • Panel always opaque: Dark background (rgb(30,30,35)) on both Block and Paragraph so transcript text cannot bleed through.
  • Rolling avg t/s: Average over last 5 completed turns, always visible. Uses ⌀ symbol to distinguish from live streaming t/s. Fixed bug where remote mode never called record_turn_tps() at turn-end, causing avg t/s to always show 0.
  • Memory and swarm always shown: Uses master's emoji icons (, ).
  • OverscrollStatusMode default = On: Always-on by default instead of elastic overscroll reveal.
  • Removed overscroll status line: The transient status line below the input is removed from the layout entirely.
  • Stripped optional features: ThrottledInfo struct, /status_line slash command, /info_refresh command, preview_test.rs, config setters (set_info_widget_throttle_ms, set_overscroll_status), info_widget_throttle_ms config field — all removed for minimal clean diff.

Files changed (33 files, +1353/-272)

File Summary
crates/jcode-config-types/src/lib.rs OverscrollStatusMode default changed from Overscroll to On
crates/jcode-base/src/config/default_file.rs Default config comment updated
crates/jcode-tui/src/tui/info_widget.rs Single overview widget, fixed placement, dark bg, cost/tokens/t-s line, has_data_for suppression, render_sections rewrite
crates/jcode-tui/src/tui/info_widget_overview.rs Height estimators for new 5-line layout
crates/jcode-tui/src/tui/info_widget_model.rs 2-line provider/model split, render_model_info_supplementary
crates/jcode-tui/src/tui/info_widget_usage.rs Suppress CostBased/Copilot when status line active
crates/jcode-tui/src/tui/info_widget_swarm_background.rs Full-word swarm stats format
crates/jcode-tui/src/tui/info_widget_layout.rs Anchor persistence for transient data gaps
crates/jcode-tui/src/tui/ui.rs Removed overscroll status line slot from layout
crates/jcode-tui/src/tui/ui_input.rs draw_overscroll_status marked dead_code
crates/jcode-tui/src/tui/app.rs tps_history (VecDeque), last_displayed_tps fields
crates/jcode-tui/src/tui/app/misc_ui.rs record_turn_tps(), avg_tps(), last_displayed_tps cache
crates/jcode-tui/src/tui/app/tui_state.rs avg_tokens_per_second, status_line_active/pinned: true, mcp_servers, available_skills
crates/jcode-tui/src/tui/app/remote/server_events.rs record_turn_tps() + reset_streaming_tps() at all turn-end paths (fix for avg t/s = 0 bug)
crates/jcode-tui/src/tui/app/local.rs record_turn_tps() at local turn end
crates/jcode-tui/src/tui/app/commands.rs last_displayed_tps = None at turn start
crates/jcode-tui/src/tui/app/commands_improve.rs last_displayed_tps = None at turn start
crates/jcode-tui/src/tui/app/commands_overnight.rs last_displayed_tps = None at turn start
crates/jcode-tui/src/tui/app/input.rs last_displayed_tps = None at turn start (2 sites)
crates/jcode-tui/src/tui/app/remote.rs record_turn_tps() at disconnect
crates/jcode-tui/src/tui/app/remote/input_dispatch.rs record_turn_tps() at split launch
crates/jcode-tui/src/tui/app/replay.rs last_displayed_tps = None at replay turn start
crates/jcode-tui/src/tui/app/tests/scroll_copy_01/part_01.rs Scroll tests set Overscroll/Off mode explicitly
crates/jcode-tui/src/tui/app/tests/scroll_copy_03.rs Test fixture update
crates/jcode-tui/src/tui/info_widget_tests.rs Test assertions updated for new format
Other files Minor import/export updates

Branch

fix/info_fields on fork alecuba16/jcode

Single commit: b0903ca8 — 33 files, +1353/-272 lines