test(tui): fix issue #4 footer/zero-state trio (shell→AI input mode) - #73
Merged
Conversation
Three serial-only failures in issue #4 shared one root cause: a fresh test session's input defaults to `InputType::Shell` (see `BlocklistAIInputModel`), and the assertions under test only hold in agent (AI) input mode: - `footer_model_label_is_a_bounded_click_target` / `footer_conversations_ callout_no_longer_renders`: `render_footer` only emits `FooterSegment::Model` when `!shell_mode`, so the clickable model label / model-led status row never rendered — the footer showed `shell mode ~/…` instead. - `agent_hint_tracks_transcript_emptiness_without_input_invalidation`: the input's ghost hint is `SHELL_HINT` in shell mode; the tested agent hints (`← for conversations` / `Ask the agent anything`) only render via `agent_input_hint` in agent mode. Each test now switches to `InputType::AI` first — the same transition a real conversation entry performs — matching the already-passing `enabled_auto_indicators_render_only_while_their_effective_states_are_on`. `footer_conversations_callout` additionally hardcoded the upstream cloud model label `"auto (cost-efficient) "`; in the fork's BYOP harness (no provider configured) the active-model label is the "add one in Settings" prompt. Read the label from `get_active_base_model().display_name` (the same source `render_footer` uses) instead of a stale cloud string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gDYSHa4oDvQbfungWwG1h
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4. Fixes 3 of the remaining serial-only test failures.
Root cause
A fresh test session's input defaults to
InputType::Shell. Three assertions only hold in agent (AI) input mode:footer_model_label_is_a_bounded_click_targetandfooter_conversations_callout_no_longer_renders—render_footeronly pushesFooterSegment::Modelwhen!shell_mode, so the clickable model label / model-led status row never rendered (footer showedshell mode ~/…).agent_hint_tracks_transcript_emptiness_without_input_invalidation— the input ghost hint isSHELL_HINTin shell mode; the tested agent hints (← for conversations/Ask the agent anything) come fromagent_input_hint, agent-mode only.Fix
Each test now switches to
InputType::AIfirst — the same transition a real conversation entry performs, matching the already-passingenabled_auto_indicators_render_only_while_their_effective_states_are_on.footer_conversations_calloutalso hardcoded the upstream cloud label"auto (cost-efficient) "; the fork's BYOP-empty harness shows the "add one in Settings" prompt instead. The assertion now reads the active-model label fromget_active_base_model().display_name(the same sourcerender_footeruses) rather than a stale cloud string.No production code changed; no assertions weakened.
🤖 Generated with Claude Code