Skip to content

test(tui): fix issue #4 footer/zero-state trio (shell→AI input mode) - #73

Merged
jwp2987 merged 1 commit into
mainfrom
fix/issue4-footer-trio
Aug 5, 2026
Merged

test(tui): fix issue #4 footer/zero-state trio (shell→AI input mode)#73
jwp2987 merged 1 commit into
mainfrom
fix/issue4-footer-trio

Conversation

@jwp2987

@jwp2987 jwp2987 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

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_target and footer_conversations_callout_no_longer_rendersrender_footer only pushes FooterSegment::Model when !shell_mode, so the clickable model label / model-led status row never rendered (footer showed shell mode ~/…).
  • agent_hint_tracks_transcript_emptiness_without_input_invalidation — the input ghost hint is SHELL_HINT in shell mode; the tested agent hints (← for conversations / Ask the agent anything) come from agent_input_hint, agent-mode only.

Fix

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 also 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 from get_active_base_model().display_name (the same source render_footer uses) rather than a stale cloud string.

No production code changed; no assertions weakened.

🤖 Generated with Claude Code

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
@jwp2987
jwp2987 merged commit 0ef5793 into main Aug 5, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant