Info widgets jump/hide/disappear as content scrolls, causing visual flicker
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
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
- Margin HUD: floating widget placements whose position depends on transcript content width, which changes on every frame during streaming.
- Overscroll status line: only visible during elastic overscroll reveal (transient), showing model/provider/context.
- 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 calledrecord_turn_tps()at turn-end, causing avg t/s to always show 0. - Memory and swarm always shown: Uses master's emoji icons (🧠, 🐝).
OverscrollStatusModedefault =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_lineslash command,/info_refreshcommand,preview_test.rs, config setters (set_info_widget_throttle_ms,set_overscroll_status),info_widget_throttle_msconfig 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing fix/info_fields branch and commit b0903ca8, starting with crates/jcode-tui/src/tui/info_widget.rs, info_widget_overview.rs, and info_widget_tests.rs. Run the listed TUI scroll tests and inspect the remote and local turn-end paths; done means the single Overview panel remains stable without duplicate or transient info widgets and the updated tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 15/100