Repository navigation
Description
Background
The CI Build & Test check on master has been failing with 25 unit-test
failures in jcode-tui. Of those 25:
- 3 are kcode/jcode decollision leftovers → tracked by fix(tui): 3 leftover kcode/jcode decollision test mismatches in helpers + turn_notify #131, fixed by fix(tui): 3 leftover kcode/jcode decollision mismatches #132
- 1 is a
cache_expected_warmpredicate bug → tracked by fix(jcode-tui): cache_expected_warm should return false on is_estimate #133, fixed by fix(jcode-tui): cache_expected_warm returns false on estimates, not just cold #134 - 21 remain as real regressions from TUI refactors
Categories
A. fork_command session splitting (3 tests)
tui::app::tests::test_btw_command_forks_session_with_question
tui::app::tests::test_fork_command_with_prompt_forks_session
tui::app::tests::test_fork_command_without_prompt_forks_idle_session
The tests assert the fork commands emit a session-split hint. The
implementation no longer appends the /resume <new-id> hint. Either
the implementation needs to emit the hint, or the tests need to be
updated to reflect the current behavior. Recommend: implementation
fix because the tests are recent (post-TUI-refactor).
B. session_picker preview/scroll rendering (8 tests)
tui::session_picker::tests::preview_render_cache_is_reused_across_scroll_and_rebuilt_on_selection_change
tui::session_picker::tests::preview_visible_slice_matches_scroll_position
tui::session_picker::tests::preview_without_search_has_no_highlight_and_scrolls_to_bottom
tui::session_picker::tests::search_highlights_match_in_preview_and_scrolls_to_it
tui::session_picker::tests::test_preview_pane_shows_scrollbar_when_overflowing
tui::session_picker::tests::test_preview_sticky_prompt_header_appears_after_scrolling
tui::session_picker::tests::test_preview_sticky_prompt_header_survives_async_preview_load
tui::session_picker::tests::test_session_list_shows_scrollbar_when_overflowing
The session_picker preview pane and session list lost scrollbar and
sticky-prompt rendering after the recent TUI refactor. Likely root
cause: scrollbar widget or sticky-header logic not applied to the
new layout. Could be one root cause or several.
C. terminal_mode ANSI drift (3 tests)
tui::terminal_mode_tests::focus_reapply_preserves_other_modes_without_rearming_focus_reporting
tui::terminal_mode_tests::outside_tmux_keyboard_lifecycle_keeps_kitty_protocol_only
tui::terminal_mode_tests::tmux_keyboard_lifecycle_requests_and_resets_extended_keys
The actual byte sequence is ESC[>1u (protocol push flag 1, the
basic kitty keyboard CSI u). The tests expect ESC[>7u (flag 7,
which adds reporting-all-keys-as-escape-codes to the push).
Note the enable_keyboard_enhancement() doc comment deliberately
excludes REPORT_ALL_KEYS_AS_ESCAPE_CODES ("Avoids REPORT_ALL_KEYS_AS_ESCAPE_CODES:
with it, kitty/Alacritty/Warp report printable keys as base key plus
modifiers instead of the text the active layout produces"). So either:
- The doc comment is right and the tests are wrong (tests were
updated prematurely for a planned behavior change that never landed) - The doc comment is stale and the tests reflect the intended
final behavior
Recommend: implementation fix if enable_keyboard_enhancement()
needs to also enable REPORT_EVENT_TYPES and REPORT_ALTERNATE_KEYS to
match the test expectations — but verify the herdr/conpty panes story
first.
D. overscroll_line rendering (3 tests)
tui::ui::tests::swarm_buffer::overscroll_line_compacts_before_dropping_and_always_keeps_dir_model_context
tui::ui::tests::swarm_buffer::overscroll_line_orders_dir_git_context_then_model_on_the_right
tui::ui::tests::swarm_buffer::overscroll_model_is_pink
The overscroll_line in the swarm buffer UI doesn't render the expected
dir-git-context + model-on-the-right layout, and the model column
isn't pink. Likely a single regression in the overscroll layout code.
E. Visual regressions (3 tests)
tui::app::tests::status_line_is_always_pinned_with_pink_model_on_real_app
tui::app::tests::test_handle_remote_disconnect_flushes_streaming_text_and_sets_reconnect_state
tui::ui::messages::tests::render_system_message_uses_connection_card_for_reconnect_status
status_line_is_always_pinned_with_pink_model_on_real_app— the
pink model indicator is missing from the real-app status line.test_handle_remote_disconnect_*— the disconnect handler no
longer flushes streaming text or sets reconnect state.render_system_message_uses_connection_card_for_reconnect_status—
the assertionplain.contains(\"kcode --resume koala\")fails,
suggesting the reconnect card doesn't reference the resumed session.
F. kitty notification identifier leftover (1 test — overlapping with #131)
tui::app::turn_notify::tests::kitty_notification_is_one_completed_clickable_message
Covered by #132 (decollision leftovers). Will clear once #132 merges.
Next steps
Each category is a candidate for a focused PR. The smallest first
target is probably A (3 tests, single command-emit fix) or F as
an immediate CI improvement via #132. D is also small (single
overscroll layout fix). The bigger buckets are B and C.
Status
- fix(tui): 3 leftover kcode/jcode decollision mismatches #132 will clear 3 of these 25 (categories F and 2 of B).
- fix(jcode-tui): cache_expected_warm returns false on estimates, not just cold #134 will clear 1 of these 25 (category D-adjacent: the
cache_estimate test is intui::testsbut separate from the
overscroll_line issues). - This issue tracks the remaining 21.
Reference
Build & Test (ubuntu-latest) failure log:
https://github.com/KooshaPari/KCode/actions/runs/39213427119/job/117931722514
(2489 passed; 25 failed)
Activity
kilo-code-bot commentedon Oct 19, 2026
This issue appears to be a duplicate of #131.
Similarity score: 90%
This comment was generated by Kilo Auto-Triage.
KooshaPari commentedon Oct 21, 2026
Status re-check against current
master(2aea04dd8) — 2026-10-20This issue was written against an older master. Verifying each of the 21 against current master:
cargo test -p jcode-tui --lib <name>onmaster@2aea04dd8:Already fixed upstream (18/21) — no action needed
B (8/8) session_picker — all 8 pass. The compact-layout gate is
session_picker.rs:2200(height < 20); the tests now useh = 24(session_picker_tests.rs:1982-83, 2038-39, 2102-03, 2166-67, 2533-34), i.e. non-compact.C (3/3) terminal_mode — all 3 pass.
tui/mod.rs:272-292now asserts\\x1b[>1u/\\x1b[=1u, andkeyboard_enhancement_flags()returnsDISAMBIGUATE_ESCAPE_CODESonly. #124 additionally addedtui/keyboard_protocol.rsfor the Windows/native-console path, which the plain[>1uexpectations alone would not have covered.D (3/3) overscroll — all 3 pass. Production
ui.rs:3042gates the compact status bar onchat_area.width >= 80; the layout placesoverscroll(chunks[8]) immediately above it, so the overscroll row isheight-2at width >= 80 andheight-1below that.overscroll_model_is_pinkusesTestBackend::new(200, 18), so unguardedheight-2is correct there.E (3/3) visual — all 3 pass.
commands_review.rs:768emitskcode --resume {};remote/reconnect.rs:117emits⚡ Connection lost - retrying.F (1/1) — passes.
Still failing (3/21) — category A
fork_session_with_prompt_local(commands.rs:1357) callslaunch_forked_session_local; onErrit pushesDisplayMessage::error("Failed to fork session: {}"), but the tests expect thesystemmessage carryingkcode --resume <id>. So the fork path is erroring before it reaches the hint, and the missing hint is a symptom, not the cause.Per the
Recommend: implementation fixnote above, these need an implementation fix — but they need a decision first: whylaunch_forked_session_localis returningErrunderKCODE_HOMEpointed at a tempdir. TheErrpayload is not currently asserted anywhere, so the next step is to surface it.Note on a stale duplicate branch
Branch
fix/tui-refactor-regressions(0f4afc872) exists from earlier work on this issue. It is based onb9886143c, predates #124/#134, and must not be merged — merging it would deletetui/keyboard_protocol.rsand revert #124's Windows keyboard work. It is also not fmt-clean (stalekv_cache_problemre-export block). All of its content is already on master.chore(sdk/typescript): kcode- tmpdir prefixes in launch and live-opti…
fix(sdk/typescript): kcode binary/path names so the SDK tests can run…